From 9c8cc480baae7304d69e821b7c565c77b4391c01 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 13 Feb 2020 15:45:39 +0100 Subject: [PATCH 001/201] Fix Azure MacOS build --- azure/macos/job.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure/macos/job.yml b/azure/macos/job.yml index 2b179aff5fe5a..1a6aefd63372e 100644 --- a/azure/macos/job.yml +++ b/azure/macos/job.yml @@ -25,8 +25,8 @@ jobs: --enable-fpm \ --with-pdo-mysql=mysqlnd \ --with-mysqli=mysqlnd \ - --with-pgsql \ - --with-pdo-pgsql \ + --with-pgsql=/usr/local/opt/libpq \ + --with-pdo-pgsql=/usr/local/opt/libpq \ --with-pdo-sqlite \ --without-pear \ --enable-gd \ From 80392253e006171896b29c6e43aa5e3efb9a810d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 13 Feb 2020 16:39:45 +0100 Subject: [PATCH 002/201] Add arginfo for HashContext::__construct() Arginfo was already generated, just not referenced. --- ext/hash/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/hash/hash.c b/ext/hash/hash.c index e4b28c0e6b315..e4f8537676b08 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -908,7 +908,7 @@ static PHP_METHOD(HashContext, __construct) { /* }}} */ static const zend_function_entry php_hashcontext_methods[] = { - PHP_ME(HashContext, __construct, NULL, ZEND_ACC_PRIVATE) + PHP_ME(HashContext, __construct, arginfo_class_HashContext___construct, ZEND_ACC_PRIVATE) PHP_FE_END }; From e99d5d39239c611e1e7304e79e88545c4e71a073 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 13 Feb 2020 16:37:49 +0100 Subject: [PATCH 003/201] Add stubs for zend_test --- ext/zend_test/test.c | 26 +++----------------------- ext/zend_test/test.stub.php | 18 ++++++++++++++++++ ext/zend_test/test_arginfo.h | 28 ++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 ext/zend_test/test.stub.php create mode 100644 ext/zend_test/test_arginfo.h diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 64db2a380e52d..6c495b5a7f59c 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -22,6 +22,7 @@ #include "php_ini.h" #include "ext/standard/info.h" #include "php_test.h" +#include "test_arginfo.h" static zend_class_entry *zend_test_interface; static zend_class_entry *zend_test_class; @@ -29,27 +30,6 @@ static zend_class_entry *zend_test_child_class; static zend_class_entry *zend_test_trait; static zend_object_handlers zend_test_class_handlers; -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_zend_test_array_return, IS_ARRAY, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_zend_test_nullable_array_return, IS_ARRAY, 1) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_zend_test_void_return, IS_VOID, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_zend_test_deprecated, IS_VOID, 0) - ZEND_ARG_INFO(0, arg1) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_zend_terminate_string, 0, 0, 1) - ZEND_ARG_INFO(1, str) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_zend_leak_variable, 0, 0, 1) - ZEND_ARG_INFO(0, variable) -ZEND_END_ARG_INFO() - ZEND_FUNCTION(zend_test_func) { RETVAL_STR_COPY(EX(func)->common.function_name); @@ -336,9 +316,9 @@ static const zend_function_entry zend_test_functions[] = { ZEND_FE(zend_test_nullable_array_return, arginfo_zend_test_nullable_array_return) ZEND_FE(zend_test_void_return, arginfo_zend_test_void_return) ZEND_DEP_FE(zend_test_deprecated, arginfo_zend_test_deprecated) - ZEND_FE(zend_create_unterminated_string, NULL) + ZEND_FE(zend_create_unterminated_string, arginfo_zend_create_unterminated_string) ZEND_FE(zend_terminate_string, arginfo_zend_terminate_string) - ZEND_FE(zend_leak_bytes, NULL) + ZEND_FE(zend_leak_bytes, arginfo_zend_leak_bytes) ZEND_FE(zend_leak_variable, arginfo_zend_leak_variable) ZEND_FE_END }; diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php new file mode 100644 index 0000000000000..f86f061d77a48 --- /dev/null +++ b/ext/zend_test/test.stub.php @@ -0,0 +1,18 @@ + Date: Fri, 14 Feb 2020 09:21:13 +0100 Subject: [PATCH 004/201] Fix typo in recent bugfix --- NEWS | 2 +- ext/dom/tests/bug77569.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 672ce054059b7..63349d3e813c9 100644 --- a/NEWS +++ b/NEWS @@ -3,7 +3,7 @@ PHP NEWS ?? ??? 2020, PHP 7.2.28 - DOM: - . Fixed bug #77569: (Write Acess Violation in DomImplementation). (Nikita, + . Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita, cmb) 23 Jan 2020, PHP 7.2.27 diff --git a/ext/dom/tests/bug77569.phpt b/ext/dom/tests/bug77569.phpt index f0f356670807d..9eef2af65a788 100644 --- a/ext/dom/tests/bug77569.phpt +++ b/ext/dom/tests/bug77569.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #77569 (Write Acess Violation in DomImplementation) +Bug #77569 (Write Access Violation in DomImplementation) --SKIPIF-- Date: Fri, 14 Feb 2020 16:49:43 +0100 Subject: [PATCH 005/201] Clarify that token_get_all() never returns false It can only fail in TOKEN_PARSE mode, in which case it will throw. --- ext/tokenizer/tokenizer.c | 4 +++- ext/tokenizer/tokenizer.stub.php | 2 +- ext/tokenizer/tokenizer_arginfo.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index cf5be9422673d..1ac5275ff09a3 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -274,7 +274,9 @@ PHP_FUNCTION(token_get_all) zend_clear_exception(); } - if (!success) RETURN_FALSE; + if (!success) { + RETURN_THROWS(); + } } /* }}} */ diff --git a/ext/tokenizer/tokenizer.stub.php b/ext/tokenizer/tokenizer.stub.php index f42825d7dc3b8..63a6c2e72ca76 100644 --- a/ext/tokenizer/tokenizer.stub.php +++ b/ext/tokenizer/tokenizer.stub.php @@ -1,5 +1,5 @@ Date: Sat, 15 Feb 2020 13:43:31 +0100 Subject: [PATCH 006/201] Update bundled config.guess and config.sub --- build/config.guess | 79 ++++++++++++++++++++++++++-------------------- build/config.sub | 33 ++++++++----------- 2 files changed, 58 insertions(+), 54 deletions(-) diff --git a/build/config.guess b/build/config.guess index 4cd9454b35c4a..45001cfecde8f 100755 --- a/build/config.guess +++ b/build/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2019 Free Software Foundation, Inc. +# Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2019-04-28' +timestamp='2020-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2019 Free Software Foundation, Inc. +Copyright 1992-2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -99,6 +99,8 @@ tmp= trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || @@ -262,6 +264,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" + exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; @@ -271,12 +276,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -918,7 +926,7 @@ EOF echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -1325,38 +1333,39 @@ EOF echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; diff --git a/build/config.sub b/build/config.sub index f53af5a2da7d1..f02d43ad500ca 100755 --- a/build/config.sub +++ b/build/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2019 Free Software Foundation, Inc. +# Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2019-01-05' +timestamp='2020-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2019 Free Software Foundation, Inc. +Copyright 1992-2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -337,17 +337,14 @@ case $1 in basic_machine=m88k-harris os=sysv3 ;; - hp300) + hp300 | hp300hpux) basic_machine=m68k-hp + os=hpux ;; hp300bsd) basic_machine=m68k-hp os=bsd ;; - hp300hpux) - basic_machine=m68k-hp - os=hpux - ;; hppaosf) basic_machine=hppa1.1-hp os=osf @@ -360,10 +357,6 @@ case $1 in basic_machine=i386-mach os=mach ;; - vsta) - basic_machine=i386-pc - os=vsta - ;; isi68 | isi) basic_machine=m68k-isi os=sysv @@ -612,6 +605,10 @@ case $1 in basic_machine=vax-dec os=vms ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; vxworks960) basic_machine=i960-wrs os=vxworks @@ -1172,7 +1169,7 @@ case $cpu-$vendor in | asmjs \ | ba \ | be32 | be64 \ - | bfin | bs2000 \ + | bfin | bpf | bs2000 \ | c[123]* | c30 | [cjt]90 | c4x \ | c8051 | clipper | craynv | csky | cydra \ | d10v | d30v | dlx | dsp16xx \ @@ -1346,11 +1343,11 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | kopensolaris* | plan9* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | knetbsd* | mirbsd* | netbsd* \ - | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ @@ -1368,7 +1365,8 @@ case $os in | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*) + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix) # Remember, each alternative MUST END IN *, to match a version number. ;; qnx*) @@ -1452,9 +1450,6 @@ case $os in ns2) os=nextstep2 ;; - nsk*) - os=nsk - ;; # Preserve the version number of sinix5. sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` From d76f7c6c636b8240e06a1fa29eebb98ad005008a Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sat, 15 Feb 2020 20:52:19 -0800 Subject: [PATCH 007/201] Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress --- ext/session/session.c | 10 +++++--- ext/session/tests/bug79221.phpt | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 ext/session/tests/bug79221.phpt diff --git a/ext/session/session.c b/ext/session/session.c index f470067faf047..54dce54c0654e 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -3219,10 +3219,12 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo if (PS(rfc1867_cleanup)) { php_session_rfc1867_cleanup(progress); } else { - SEPARATE_ARRAY(&progress->data); - add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1); - Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; - php_session_rfc1867_update(progress, 1); + if (!Z_ISUNDEF(progress->data)) { + SEPARATE_ARRAY(&progress->data); + add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1); + Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; + php_session_rfc1867_update(progress, 1); + } } php_rshutdown_session_globals(); } diff --git a/ext/session/tests/bug79221.phpt b/ext/session/tests/bug79221.phpt new file mode 100644 index 0000000000000..b0972c4697054 --- /dev/null +++ b/ext/session/tests/bug79221.phpt @@ -0,0 +1,45 @@ +--TEST-- +Null Pointer Dereference in PHP Session Upload Progress +--INI-- +error_reporting=0 +file_uploads=1 +upload_max_filesize=1024 +session.save_path= +session.name=PHPSESSID +session.serialize_handler=php +session.use_strict_mode=0 +session.use_cookies=1 +session.use_only_cookies=0 +session.upload_progress.enabled=1 +session.upload_progress.cleanup=0 +session.upload_progress.prefix=upload_progress_ +session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS +session.upload_progress.freq=1% +session.upload_progress.min_freq=0.000000001 +--COOKIE-- +PHPSESSID=session-upload +--POST_RAW-- +Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="PHPSESSID" + +session-upload +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" + +ryat +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; file="file"; ryat="filename" + +1 +-----------------------------20896060251896012921717172737-- +--FILE-- + Date: Sun, 16 Feb 2020 14:29:36 +0100 Subject: [PATCH 008/201] Fix arginfo These parameters accept int|float, since they are parsed with `Z_PARAM_NUMBER`. --- ext/standard/basic_functions.stub.php | 6 ++-- ext/standard/basic_functions_arginfo.h | 44 ++++++++++++++------------ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 2a427b8ab8444..1d2179fe62cda 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1018,11 +1018,11 @@ function mail(string $to, string $subject, string $message, string|array $additi function abs(int|float $number): int|float {} -function ceil(float $number): float {} +function ceil(int|float $number): float {} -function floor(float $number): float {} +function floor(int|float $number): float {} -function round($number, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float {} +function round(int|float $number, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float {} function sin(float $number): float {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 93e2a5bda69f5..98c7ff77f7794 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1584,49 +1584,51 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_abs, 0, 1, MAY_BE_LONG|MAY_BE_DO ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ceil, 0, 1, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0) + ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE) ZEND_END_ARG_INFO() #define arginfo_floor arginfo_ceil ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_round, 0, 1, IS_DOUBLE, 0) - ZEND_ARG_INFO(0, number) + ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE) ZEND_ARG_TYPE_INFO(0, precision, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_sin arginfo_ceil +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sin, 0, 1, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0) +ZEND_END_ARG_INFO() -#define arginfo_cos arginfo_ceil +#define arginfo_cos arginfo_sin -#define arginfo_tan arginfo_ceil +#define arginfo_tan arginfo_sin -#define arginfo_asin arginfo_ceil +#define arginfo_asin arginfo_sin -#define arginfo_acos arginfo_ceil +#define arginfo_acos arginfo_sin -#define arginfo_atan arginfo_ceil +#define arginfo_atan arginfo_sin -#define arginfo_atanh arginfo_ceil +#define arginfo_atanh arginfo_sin ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_atan2, 0, 2, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) ZEND_END_ARG_INFO() -#define arginfo_sinh arginfo_ceil +#define arginfo_sinh arginfo_sin -#define arginfo_cosh arginfo_ceil +#define arginfo_cosh arginfo_sin -#define arginfo_tanh arginfo_ceil +#define arginfo_tanh arginfo_sin -#define arginfo_asinh arginfo_ceil +#define arginfo_asinh arginfo_sin -#define arginfo_acosh arginfo_ceil +#define arginfo_acosh arginfo_sin -#define arginfo_expm1 arginfo_ceil +#define arginfo_expm1 arginfo_sin -#define arginfo_log1p arginfo_ceil +#define arginfo_log1p arginfo_sin #define arginfo_pi arginfo_lcg_value @@ -1648,25 +1650,25 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pow, 0, 0, 2) ZEND_ARG_INFO(0, exp) ZEND_END_ARG_INFO() -#define arginfo_exp arginfo_ceil +#define arginfo_exp arginfo_sin ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_log, 0, 1, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, base, IS_DOUBLE, 0) ZEND_END_ARG_INFO() -#define arginfo_log10 arginfo_ceil +#define arginfo_log10 arginfo_sin -#define arginfo_sqrt arginfo_ceil +#define arginfo_sqrt arginfo_sin ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hypot, 0, 2, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) ZEND_END_ARG_INFO() -#define arginfo_deg2rad arginfo_ceil +#define arginfo_deg2rad arginfo_sin -#define arginfo_rad2deg arginfo_ceil +#define arginfo_rad2deg arginfo_sin ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bindec, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE) ZEND_ARG_TYPE_INFO(0, binary_string, IS_STRING, 0) From d9b80efb57ad46a5ba80581d823957471bfe4db0 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sat, 15 Feb 2020 17:49:18 -0500 Subject: [PATCH 009/201] [skip ci] Fix typos in UPGRADING Closes GH-5183 --- UPGRADING | 2 +- UPGRADING.INTERNALS | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UPGRADING b/UPGRADING index 574ab6a9639c9..e71bc5332a215 100644 --- a/UPGRADING +++ b/UPGRADING @@ -370,7 +370,7 @@ PHP 8.0 UPGRADE NOTES . It is now possible to fetch the class name of an object using `$object::class`. The result is the same as `get_class($object)`. RFC: https://wiki.php.net/rfc/class_name_literal_on_object - . New and instanceof can now be used with arbitary expressions, using + . New and instanceof can now be used with arbitrary expressions, using `new (expression)(...$args)` and `$obj instanceof (expression)`. RFC: https://wiki.php.net/rfc/variable_syntax_tweaks . Some consistency fixes to variable syntax have been applied, for example diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 297d1d7b2ccc1..6381b22d37486 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -12,7 +12,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES i. get_closure() object handler j. compare_objects() and compare() object handlers k. The 'I' length modifier - l. Some VM instructions switched to IS_TMP_VAR result insted of IS_VAR + l. Some VM instructions switched to IS_TMP_VAR result instead of IS_VAR 2. Build system changes a. Abstract @@ -91,7 +91,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES The 'v' format from the custom snprintf and spprintf implementations has been removed. Use the standard 's' format instead. - l. Some VM instructions switched to IS_TMP_VAR result insted of IS_VAR. + l. Some VM instructions switched to IS_TMP_VAR result instead of IS_VAR. Actually, all assignments (ZEND_ASSIGN, ZEND_ASSIGN_DIM, ZEND_ASSIGN_OBJ, ZEND_ASSIGN_STATIC_PROP), all compound assignments (ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSIGN_OBJ_OP, ZEND_ASSIGN_STATIC_PROP_OP) and all From 6ee6097688a8c64e0e0ba166d48b16a93bf107a2 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 16 Feb 2020 16:41:43 +0100 Subject: [PATCH 010/201] Constrain number parameter of numfmt_format to int|float This is inline with similar changes to the math functions. Especially, array to number conversion makes no sense here, and is likely to hide a programming error. To make that feasible, we introduce the `n` specifier for classic ZPP so we can stick with `zend_parse_method_parameters()`. We also remove a test case, which has been degenerated to a ZPP test. --- Zend/zend_API.c | 12 +++++++++++- Zend/zend_API.h | 2 +- docs/parameter-parsing-api.md | 1 + ext/intl/formatter/formatter.stub.php | 4 ++-- ext/intl/formatter/formatter_arginfo.h | 4 ++-- ext/intl/formatter/formatter_format.c | 8 +------- ext/intl/tests/bug48227.phpt | 19 ++++++++++--------- ext/intl/tests/bug53735.phpt | 2 ++ ext/intl/tests/bug79212.phpt | 18 ------------------ 9 files changed, 30 insertions(+), 40 deletions(-) delete mode 100644 ext/intl/tests/bug79212.phpt diff --git a/Zend/zend_API.c b/Zend/zend_API.c index a3e452bf7d9c5..ed8440f1047ea 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -522,6 +522,16 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons } break; + case 'n': + { + zval **p = va_arg(*va, zval **); + + if (!zend_parse_arg_number(arg, p, check_null)) { + return "number"; + } + } + break; + case 's': { char **p = va_arg(*va, char **); @@ -793,7 +803,7 @@ static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va, case 'f': case 'A': case 'H': case 'p': case 'S': case 'P': - case 'L': + case 'L': case 'n': max_num_args++; break; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 70879fe2a8013..2f1b58eb75528 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -1384,7 +1384,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *e #define Z_PARAM_LONG_OR_NULL(dest, is_null) \ Z_PARAM_LONG_EX(dest, is_null, 1, 0) -/* no old equivalent */ +/* old "n" */ #define Z_PARAM_NUMBER_EX(dest, check_null) \ Z_PARAM_PROLOGUE(0, 0); \ if (UNEXPECTED(!zend_parse_arg_number(_arg, &dest, check_null))) { \ diff --git a/docs/parameter-parsing-api.md b/docs/parameter-parsing-api.md index e038a20dee3cd..6bf035673b54f 100644 --- a/docs/parameter-parsing-api.md +++ b/docs/parameter-parsing-api.md @@ -75,6 +75,7 @@ f - function or array containing php method call info (returned as h - array (returned as HashTable*) H - array or HASH_OF(object) (returned as HashTable*) l - long (zend_long) +n - long or double (zval*) o - object of any type (zval*) O - object of specific type given by class entry (zval*, zend_class_entry) p - valid path (string without null bytes in the middle) and its length (char*, size_t) diff --git a/ext/intl/formatter/formatter.stub.php b/ext/intl/formatter/formatter.stub.php index 8d976f79e2270..2edc28d6fd4c4 100644 --- a/ext/intl/formatter/formatter.stub.php +++ b/ext/intl/formatter/formatter.stub.php @@ -8,7 +8,7 @@ public function __construct(string $locale, int $style, string $pattern = "") {} public static function create(string $locale, int $style, string $pattern = "") {} /** @return string|false */ - public function format($value, int $type = NumberFormatter::TYPE_DEFAULT) {} + public function format(int|float $value, int $type = NumberFormatter::TYPE_DEFAULT) {} /** @return int|float|false */ public function parse(string $value, int $type = NumberFormatter::TYPE_DOUBLE, &$position = null) {} @@ -58,7 +58,7 @@ public function getErrorMessage() {} function numfmt_create(string $locale, int $style, string $pattern = ""): ?NumberFormatter {} -function numfmt_format(NumberFormatter $fmt, $value, int $type = NumberFormatter::TYPE_DEFAULT): string|false {} +function numfmt_format(NumberFormatter $fmt, int|float $value, int $type = NumberFormatter::TYPE_DEFAULT): string|false {} function numfmt_parse(NumberFormatter $fmt, string $value, int $type = NumberFormatter::TYPE_DOUBLE, &$position = null): int|float|false {} diff --git a/ext/intl/formatter/formatter_arginfo.h b/ext/intl/formatter/formatter_arginfo.h index 313d0dd714dce..eced76d82b428 100644 --- a/ext/intl/formatter/formatter_arginfo.h +++ b/ext/intl/formatter/formatter_arginfo.h @@ -9,7 +9,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_NumberFormatter_create arginfo_class_NumberFormatter___construct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_format, 0, 0, 1) - ZEND_ARG_INFO(0, value) + ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -73,7 +73,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_format, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) - ZEND_ARG_INFO(0, value) + ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) ZEND_END_ARG_INFO() diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c index 8c6a567eb2b78..4f87a981f29a8 100644 --- a/ext/intl/formatter/formatter_format.c +++ b/ext/intl/formatter/formatter_format.c @@ -39,7 +39,7 @@ PHP_FUNCTION( numfmt_format ) FORMATTER_METHOD_INIT_VARS; /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Oz|l", + if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "On|l", &object, NumberFormatter_ce_ptr, &number, &type ) == FAILURE ) { RETURN_THROWS(); @@ -48,12 +48,6 @@ PHP_FUNCTION( numfmt_format ) /* Fetch the object. */ FORMATTER_METHOD_FETCH_OBJECT; - if(Z_TYPE_P(number) != IS_ARRAY) { - convert_scalar_to_number_ex(number); - } else { - convert_to_long(number); - } - if(type == FORMAT_TYPE_DEFAULT) { switch(Z_TYPE_P(number)) { case IS_LONG: diff --git a/ext/intl/tests/bug48227.phpt b/ext/intl/tests/bug48227.phpt index 42a4ffaf867a2..a5946e035f578 100644 --- a/ext/intl/tests/bug48227.phpt +++ b/ext/intl/tests/bug48227.phpt @@ -6,16 +6,17 @@ Bug #48227 (NumberFormatter::format leaks memory) format('')); -var_dump($x->format(1)); -var_dump($x->format(NULL)); -var_dump($x->format($x)); +foreach (['', 1, NULL, $x] as $value) { + try { + var_dump($x->format($value)); + } catch (TypeError $ex) { + echo $ex->getMessage(), PHP_EOL; + } +} ?> ---EXPECTF-- -string(1) "0" +--EXPECT-- +NumberFormatter::format() expects parameter 1 to be number, string given string(1) "1" string(1) "0" - -Notice: Object of class NumberFormatter could not be converted to number in %s on line %d -string(1) "1" +NumberFormatter::format() expects parameter 1 to be number, object given diff --git a/ext/intl/tests/bug53735.phpt b/ext/intl/tests/bug53735.phpt index 1deebb2276632..66370e61f2e4c 100644 --- a/ext/intl/tests/bug53735.phpt +++ b/ext/intl/tests/bug53735.phpt @@ -25,6 +25,8 @@ var_dump($f->format(0.26)); --EXPECTF-- string(%d) "5,50 kr%A" string(%d) "5,50 kr%A" + +Notice: A non well formed numeric value encountered in %s on line %d string(%d) "5,00 kr%A" string(5) "23,25" string(3) "26%" diff --git a/ext/intl/tests/bug79212.phpt b/ext/intl/tests/bug79212.phpt deleted file mode 100644 index 3d2083013b8f8..0000000000000 --- a/ext/intl/tests/bug79212.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Bug #79212 (NumberFormatter::format() may detect wrong type) ---SKIPIF-- - ---FILE-- -format(gmp_init('823749273428379492374'))); - -$fmt = new NumberFormatter('en_US', NumberFormatter::PATTERN_DECIMAL); -var_dump($fmt->format([1], NumberFormatter::TYPE_INT64)); -?> ---EXPECTF-- -string(21) "823749273428379%c%c%c%c%c%c" -string(1) "1" From c31029f335ca1b453af799805c43c37e959ad555 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 16 Feb 2020 19:20:54 +0100 Subject: [PATCH 011/201] Replace @param annotations with type declarations --- ext/dba/dba.stub.php | 15 ++-- ext/dba/dba_arginfo.h | 6 +- ext/gmp/gmp.stub.php | 3 +- ext/gmp/gmp_arginfo.h | 2 +- ext/intl/calendar/calendar.stub.php | 6 +- ext/intl/calendar/calendar_arginfo.h | 4 +- ext/intl/formatter/formatter.stub.php | 6 +- ext/intl/formatter/formatter_arginfo.h | 4 +- .../resourcebundle/resourcebundle.stub.php | 6 +- .../resourcebundle/resourcebundle_arginfo.h | 4 +- ext/ldap/ldap.stub.php | 12 +-- ext/ldap/ldap_arginfo.h | 4 +- ext/mbstring/mbstring.stub.php | 6 +- ext/mbstring/mbstring_arginfo.h | 4 +- ext/odbc/odbc.stub.php | 3 +- ext/odbc/odbc_arginfo.h | 2 +- ext/openssl/openssl.stub.php | 6 +- ext/openssl/openssl_arginfo.h | 4 +- ext/pcre/php_pcre.stub.php | 22 +----- ext/pcre/php_pcre_arginfo.h | 12 +-- ext/pdo/pdo.stub.php | 3 +- ext/pdo/pdo_arginfo.h | 2 +- ext/reflection/php_reflection.stub.php | 18 ++--- ext/reflection/php_reflection_arginfo.h | 17 +++-- .../tests/ReflectionClass_toString_001.phpt | 2 +- .../tests/ReflectionMethod_basic2.phpt | 4 +- ext/snmp/snmp.stub.php | 74 +++++-------------- ext/snmp/snmp_arginfo.h | 28 +++---- ext/standard/basic_functions.stub.php | 35 +++------ ext/standard/basic_functions_arginfo.h | 18 ++--- ext/tidy/tidy.stub.php | 27 +++---- ext/tidy/tidy_arginfo.h | 18 ++--- sapi/cli/tests/006.phpt | 18 ++--- 33 files changed, 146 insertions(+), 249 deletions(-) diff --git a/ext/dba/dba.stub.php b/ext/dba/dba.stub.php index 96ce6d573a69e..4c476a984bbde 100644 --- a/ext/dba/dba.stub.php +++ b/ext/dba/dba.stub.php @@ -10,17 +10,15 @@ function dba_open($path, $mode, $handlername = UNKNOWN, ...$handler_parameters) function dba_close($handle): void {} /** - * @param string|array $key * @param resource $handle */ -function dba_exists($key, $handle): bool {} +function dba_exists(string|array $key, $handle): bool {} /** - * @param string|array $key * @param int|resource $skip actually this parameter is optional, not $handle * @param resource $handle */ -function dba_fetch($key, $skip, $handle = UNKOWN): string|false {} +function dba_fetch(string|array $key, $skip, $handle = UNKOWN): string|false {} function dba_key_split(string $key): array|false {} @@ -31,22 +29,19 @@ function dba_firstkey($handle): string|false {} function dba_nextkey($handle): string|false {} /** - * @param string|array $key * @param resource $handle */ -function dba_delete($key, $handle): bool {} +function dba_delete(string|array $key, $handle): bool {} /** - * @param string|array $key * @param resource $handle */ -function dba_insert($key, string $value, $handle): bool {} +function dba_insert(string|array $key, string $value, $handle): bool {} /** - * @param string|array $key * @param resource $handle */ -function dba_replace($key, string $value, $handle): bool {} +function dba_replace(string|array $key, string $value, $handle): bool {} /** @param resource $handle */ function dba_optimize($handle): bool {} diff --git a/ext/dba/dba_arginfo.h b/ext/dba/dba_arginfo.h index 32e925fb6a12b..0b14c33a575cf 100644 --- a/ext/dba/dba_arginfo.h +++ b/ext/dba/dba_arginfo.h @@ -14,12 +14,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_close, 0, 1, IS_VOID, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_exists, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, key) + ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY) ZEND_ARG_INFO(0, handle) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_fetch, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, key) + ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY) ZEND_ARG_INFO(0, skip) ZEND_ARG_INFO(0, handle) ZEND_END_ARG_INFO() @@ -37,7 +37,7 @@ ZEND_END_ARG_INFO() #define arginfo_dba_delete arginfo_dba_exists ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_insert, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, key) + ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) ZEND_ARG_INFO(0, handle) ZEND_END_ARG_INFO() diff --git a/ext/gmp/gmp.stub.php b/ext/gmp/gmp.stub.php index 7f576ca0c1043..2fedff94583cb 100644 --- a/ext/gmp/gmp.stub.php +++ b/ext/gmp/gmp.stub.php @@ -1,7 +1,6 @@ class ReflectionClass implements Reflector ] { Method [ public method __construct ] { - Parameters [1] { - Parameter #0 [ $argument ] + Parameter #0 [ object|string $argument ] } } diff --git a/ext/reflection/tests/ReflectionMethod_basic2.phpt b/ext/reflection/tests/ReflectionMethod_basic2.phpt index 46abc6b816877..e460545e55e5b 100644 --- a/ext/reflection/tests/ReflectionMethod_basic2.phpt +++ b/ext/reflection/tests/ReflectionMethod_basic2.phpt @@ -165,7 +165,7 @@ __toString(): string(%d) "Method [ public method __construct ] { - Parameters [2] { - Parameter #0 [ $class ] + Parameter #0 [ object|string $class ] Parameter #1 [ string $name ] } } @@ -177,7 +177,7 @@ Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d string(%d) "Method [ public method __construct ] { - Parameters [2] { - Parameter #0 [ $class ] + Parameter #0 [ object|string $class ] Parameter #1 [ string $name ] } } diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php index ce085637be1be..5f6b8fe3d6135 100644 --- a/ext/snmp/snmp.stub.php +++ b/ext/snmp/snmp.stub.php @@ -1,26 +1,16 @@ extension #%d pcre version %s ] { Function [ function preg_replace ] { - Parameters [5] { - Parameter #0 [ $regex ] - Parameter #1 [ $replace ] - Parameter #2 [ $subject ] + Parameter #0 [ array|string $regex ] + Parameter #1 [ array|string $replace ] + Parameter #2 [ array|string $subject ] Parameter #3 [ int $limit ] Parameter #4 [ &$count ] } @@ -101,9 +101,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Function [ function preg_replace_callback ] { - Parameters [6] { - Parameter #0 [ $regex ] + Parameter #0 [ array|string $regex ] Parameter #1 [ $callback ] - Parameter #2 [ $subject ] + Parameter #2 [ array|string $subject ] Parameter #3 [ int $limit ] Parameter #4 [ &$count ] Parameter #5 [ int $flags ] @@ -114,7 +114,7 @@ string(%d) "Extension [ extension #%d pcre version %s ] { - Parameters [5] { Parameter #0 [ array $pattern ] - Parameter #1 [ $subject ] + Parameter #1 [ array|string $subject ] Parameter #2 [ int $limit ] Parameter #3 [ &$count ] Parameter #4 [ int $flags ] @@ -124,9 +124,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Function [ function preg_filter ] { - Parameters [5] { - Parameter #0 [ $regex ] - Parameter #1 [ $replace ] - Parameter #2 [ $subject ] + Parameter #0 [ array|string $regex ] + Parameter #1 [ array|string $replace ] + Parameter #2 [ array|string $subject ] Parameter #3 [ int $limit ] Parameter #4 [ &$count ] } From 3d8342aa3c6ec53d63659a72797494de2047b975 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sun, 16 Feb 2020 11:57:42 -0500 Subject: [PATCH 012/201] [skip ci] Skip 2 tokenizer tests if tokenizer isn't loaded `./configure --disable-tokenizer` can disable tokenizer Closes GH-5184 --- ext/tokenizer/tests/invalid_large_octal_with_underscores.phpt | 2 ++ ext/tokenizer/tests/invalid_octal_dnumber.phpt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ext/tokenizer/tests/invalid_large_octal_with_underscores.phpt b/ext/tokenizer/tests/invalid_large_octal_with_underscores.phpt index b6d43c1ff1449..03940722d114e 100644 --- a/ext/tokenizer/tests/invalid_large_octal_with_underscores.phpt +++ b/ext/tokenizer/tests/invalid_large_octal_with_underscores.phpt @@ -1,5 +1,7 @@ --TEST-- Large invalid octal number with underscores +--SKIPIF-- + --FILE-- --FILE-- Date: Mon, 17 Feb 2020 13:13:49 +0800 Subject: [PATCH 013/201] Fixed bug #79255 (PHP cannot be compiled with enable JIT) --- NEWS | 1 + ext/opcache/config.m4 | 21 ++++++++------------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index a41a74acc40a0..c484a95b8f241 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,7 @@ PHP NEWS - JIT: . Fixed bug #77857 (Wrong result if executed with JIT). (Laruence) + . Fixed bug #79255 (PHP cannot be compiled with enable JIT). (Laruence) - LDAP: . Removed deprecated ldap_sort. (mcmic) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 5e61575d48070..4289b438d52f7 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -42,19 +42,14 @@ if test "$PHP_OPCACHE" != "no"; then AC_DEFINE(HAVE_JIT, 1, [Define to enable JIT]) ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c" - dnl Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *"Mach-O 64-bit"*) - DASM_FLAGS="-D X64APPLE=1 -D X64=1" - ;; - *64-bit*) - DASM_FLAGS="-D X64=1" - ;; - esac - fi - rm -rf conftest* + case $host_alias in + *x86_64-*-darwin*) + DASM_FLAGS="-D X64APPLE=1 -D X64=1" + ;; + *x86_64*) + DASM_FLAGS="-D X64=1" + ;; + esac if test "$enable_zts" = "yes"; then DASM_FLAGS="$DASM_FLAGS -D ZTS=1" From e5c95234d87fcb8f6b7569a96a89d1e1544749a6 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sat, 15 Feb 2020 22:17:14 -0800 Subject: [PATCH 014/201] Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions --- ext/phar/phar_object.c | 11 +++++ ext/phar/tests/bug79082.phpt | 52 ++++++++++++++++++++ ext/phar/tests/test79082/test79082-testfile | 1 + ext/phar/tests/test79082/test79082-testfile2 | 1 + 4 files changed, 65 insertions(+) create mode 100644 ext/phar/tests/bug79082.phpt create mode 100644 ext/phar/tests/test79082/test79082-testfile create mode 100644 ext/phar/tests/test79082/test79082-testfile2 diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 2669413fe6543..2987b64012627 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1439,6 +1439,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ char *str_key; zend_class_entry *ce = p_obj->c; phar_archive_object *phar_obj = p_obj->p; + php_stream_statbuf ssb; value = iter->funcs->get_current_data(iter); @@ -1718,6 +1719,16 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ php_stream_copy_to_stream_ex(fp, p_obj->fp, PHP_STREAM_COPY_ALL, &contents_len); data->internal_file->uncompressed_filesize = data->internal_file->compressed_filesize = php_stream_tell(p_obj->fp) - data->internal_file->offset; + if (php_stream_stat(fp, &ssb) != -1) { + data->internal_file->flags = ssb.sb.st_mode & PHAR_ENT_PERM_MASK ; + } else { +#ifndef _WIN32 + mode_t mask; + mask = umask(0); + umask(mask); + data->internal_file->flags &= ~mask; +#endif + } } if (close_fp) { diff --git a/ext/phar/tests/bug79082.phpt b/ext/phar/tests/bug79082.phpt new file mode 100644 index 0000000000000..ca453d1b57bcf --- /dev/null +++ b/ext/phar/tests/bug79082.phpt @@ -0,0 +1,52 @@ +--TEST-- +Phar: Bug #79082: Files added to tar with Phar::buildFromIterator have all-access permissions +--SKIPIF-- + +--FILE-- + 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode); + $phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); +} +foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode); + $phar->buildFromDirectory(__DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); +} +?> +--CLEAN-- + +--EXPECT-- +string(2) "22" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" diff --git a/ext/phar/tests/test79082/test79082-testfile b/ext/phar/tests/test79082/test79082-testfile new file mode 100644 index 0000000000000..9daeafb9864cf --- /dev/null +++ b/ext/phar/tests/test79082/test79082-testfile @@ -0,0 +1 @@ +test diff --git a/ext/phar/tests/test79082/test79082-testfile2 b/ext/phar/tests/test79082/test79082-testfile2 new file mode 100644 index 0000000000000..9daeafb9864cf --- /dev/null +++ b/ext/phar/tests/test79082/test79082-testfile2 @@ -0,0 +1 @@ +test From 28263642984e8f1d582b75b03204a54c4989cd33 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 19 Mar 2019 15:47:25 +0100 Subject: [PATCH 015/201] Mark bug76348.phpt as online test --- ext/soap/tests/bugs/bug76348.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/soap/tests/bugs/bug76348.phpt b/ext/soap/tests/bugs/bug76348.phpt index 6b9e71bc3cbd8..3049880dce6d3 100644 --- a/ext/soap/tests/bugs/bug76348.phpt +++ b/ext/soap/tests/bugs/bug76348.phpt @@ -3,6 +3,7 @@ Bug #76348 (WSDL_CACHE_MEMORY causes Segmentation fault) --SKIPIF-- --FILE-- Date: Mon, 17 Feb 2020 08:55:18 +0100 Subject: [PATCH 016/201] Revert "Replace @param annotations with type declarations" This reverts commit c31029f335ca1b453af799805c43c37e959ad555. --- ext/dba/dba.stub.php | 15 ++-- ext/dba/dba_arginfo.h | 6 +- ext/gmp/gmp.stub.php | 3 +- ext/gmp/gmp_arginfo.h | 2 +- ext/intl/calendar/calendar.stub.php | 6 +- ext/intl/calendar/calendar_arginfo.h | 4 +- ext/intl/formatter/formatter.stub.php | 6 +- ext/intl/formatter/formatter_arginfo.h | 4 +- .../resourcebundle/resourcebundle.stub.php | 6 +- .../resourcebundle/resourcebundle_arginfo.h | 4 +- ext/ldap/ldap.stub.php | 12 ++- ext/ldap/ldap_arginfo.h | 4 +- ext/mbstring/mbstring.stub.php | 6 +- ext/mbstring/mbstring_arginfo.h | 4 +- ext/odbc/odbc.stub.php | 3 +- ext/odbc/odbc_arginfo.h | 2 +- ext/openssl/openssl.stub.php | 6 +- ext/openssl/openssl_arginfo.h | 4 +- ext/pcre/php_pcre.stub.php | 22 +++++- ext/pcre/php_pcre_arginfo.h | 12 +-- ext/pdo/pdo.stub.php | 3 +- ext/pdo/pdo_arginfo.h | 2 +- ext/reflection/php_reflection.stub.php | 18 +++-- ext/reflection/php_reflection_arginfo.h | 17 ++--- .../tests/ReflectionClass_toString_001.phpt | 2 +- .../tests/ReflectionMethod_basic2.phpt | 4 +- ext/snmp/snmp.stub.php | 74 ++++++++++++++----- ext/snmp/snmp_arginfo.h | 28 +++---- ext/standard/basic_functions.stub.php | 35 ++++++--- ext/standard/basic_functions_arginfo.h | 18 ++--- ext/tidy/tidy.stub.php | 27 ++++--- ext/tidy/tidy_arginfo.h | 18 ++--- sapi/cli/tests/006.phpt | 18 ++--- 33 files changed, 249 insertions(+), 146 deletions(-) diff --git a/ext/dba/dba.stub.php b/ext/dba/dba.stub.php index 4c476a984bbde..96ce6d573a69e 100644 --- a/ext/dba/dba.stub.php +++ b/ext/dba/dba.stub.php @@ -10,15 +10,17 @@ function dba_open($path, $mode, $handlername = UNKNOWN, ...$handler_parameters) function dba_close($handle): void {} /** + * @param string|array $key * @param resource $handle */ -function dba_exists(string|array $key, $handle): bool {} +function dba_exists($key, $handle): bool {} /** + * @param string|array $key * @param int|resource $skip actually this parameter is optional, not $handle * @param resource $handle */ -function dba_fetch(string|array $key, $skip, $handle = UNKOWN): string|false {} +function dba_fetch($key, $skip, $handle = UNKOWN): string|false {} function dba_key_split(string $key): array|false {} @@ -29,19 +31,22 @@ function dba_firstkey($handle): string|false {} function dba_nextkey($handle): string|false {} /** + * @param string|array $key * @param resource $handle */ -function dba_delete(string|array $key, $handle): bool {} +function dba_delete($key, $handle): bool {} /** + * @param string|array $key * @param resource $handle */ -function dba_insert(string|array $key, string $value, $handle): bool {} +function dba_insert($key, string $value, $handle): bool {} /** + * @param string|array $key * @param resource $handle */ -function dba_replace(string|array $key, string $value, $handle): bool {} +function dba_replace($key, string $value, $handle): bool {} /** @param resource $handle */ function dba_optimize($handle): bool {} diff --git a/ext/dba/dba_arginfo.h b/ext/dba/dba_arginfo.h index 0b14c33a575cf..32e925fb6a12b 100644 --- a/ext/dba/dba_arginfo.h +++ b/ext/dba/dba_arginfo.h @@ -14,12 +14,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_close, 0, 1, IS_VOID, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_exists, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY) + ZEND_ARG_INFO(0, key) ZEND_ARG_INFO(0, handle) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_fetch, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY) + ZEND_ARG_INFO(0, key) ZEND_ARG_INFO(0, skip) ZEND_ARG_INFO(0, handle) ZEND_END_ARG_INFO() @@ -37,7 +37,7 @@ ZEND_END_ARG_INFO() #define arginfo_dba_delete arginfo_dba_exists ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_insert, 0, 3, _IS_BOOL, 0) - ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY) + ZEND_ARG_INFO(0, key) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) ZEND_ARG_INFO(0, handle) ZEND_END_ARG_INFO() diff --git a/ext/gmp/gmp.stub.php b/ext/gmp/gmp.stub.php index 2fedff94583cb..7f576ca0c1043 100644 --- a/ext/gmp/gmp.stub.php +++ b/ext/gmp/gmp.stub.php @@ -1,6 +1,7 @@ class ReflectionClass implements Reflector ] { Method [ public method __construct ] { - Parameters [1] { - Parameter #0 [ object|string $argument ] + Parameter #0 [ $argument ] } } diff --git a/ext/reflection/tests/ReflectionMethod_basic2.phpt b/ext/reflection/tests/ReflectionMethod_basic2.phpt index e460545e55e5b..46abc6b816877 100644 --- a/ext/reflection/tests/ReflectionMethod_basic2.phpt +++ b/ext/reflection/tests/ReflectionMethod_basic2.phpt @@ -165,7 +165,7 @@ __toString(): string(%d) "Method [ public method __construct ] { - Parameters [2] { - Parameter #0 [ object|string $class ] + Parameter #0 [ $class ] Parameter #1 [ string $name ] } } @@ -177,7 +177,7 @@ Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d string(%d) "Method [ public method __construct ] { - Parameters [2] { - Parameter #0 [ object|string $class ] + Parameter #0 [ $class ] Parameter #1 [ string $name ] } } diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php index 5f6b8fe3d6135..ce085637be1be 100644 --- a/ext/snmp/snmp.stub.php +++ b/ext/snmp/snmp.stub.php @@ -1,16 +1,26 @@ extension #%d pcre version %s ] { Function [ function preg_replace ] { - Parameters [5] { - Parameter #0 [ array|string $regex ] - Parameter #1 [ array|string $replace ] - Parameter #2 [ array|string $subject ] + Parameter #0 [ $regex ] + Parameter #1 [ $replace ] + Parameter #2 [ $subject ] Parameter #3 [ int $limit ] Parameter #4 [ &$count ] } @@ -101,9 +101,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Function [ function preg_replace_callback ] { - Parameters [6] { - Parameter #0 [ array|string $regex ] + Parameter #0 [ $regex ] Parameter #1 [ $callback ] - Parameter #2 [ array|string $subject ] + Parameter #2 [ $subject ] Parameter #3 [ int $limit ] Parameter #4 [ &$count ] Parameter #5 [ int $flags ] @@ -114,7 +114,7 @@ string(%d) "Extension [ extension #%d pcre version %s ] { - Parameters [5] { Parameter #0 [ array $pattern ] - Parameter #1 [ array|string $subject ] + Parameter #1 [ $subject ] Parameter #2 [ int $limit ] Parameter #3 [ &$count ] Parameter #4 [ int $flags ] @@ -124,9 +124,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Function [ function preg_filter ] { - Parameters [5] { - Parameter #0 [ array|string $regex ] - Parameter #1 [ array|string $replace ] - Parameter #2 [ array|string $subject ] + Parameter #0 [ $regex ] + Parameter #1 [ $replace ] + Parameter #2 [ $subject ] Parameter #3 [ int $limit ] Parameter #4 [ &$count ] } From 09669411309b5c18c48b550d89b34e78983118cd Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 14 Feb 2020 10:55:17 +0100 Subject: [PATCH 017/201] Fix #79271: DOMDocumentType::$childNodes is NULL Dom level 2 core, DOM level 3 core and the DOM living standard agree that `childNodes` always return a `NodeList`, and never `null`. --- NEWS | 1 + ext/dom/node.c | 10 +++------- ext/dom/tests/bug69846.phpt | 4 ++-- ext/dom/tests/bug79271.phpt | 17 +++++++++++++++++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 ext/dom/tests/bug79271.phpt diff --git a/NEWS b/NEWS index f8f131a800703..a80f373809924 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ PHP NEWS - DOM: . Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita, cmb) + . Fixed bug #79271 (DOMDocumentType::$childNodes is NULL). (cmb) - PCRE: . Fixed bug #79188 (Memory corruption in preg_replace/preg_replace_callback diff --git a/ext/dom/node.c b/ext/dom/node.c index 0e7f64a9bdb22..7d939bcde1d36 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -428,13 +428,9 @@ int dom_node_child_nodes_read(dom_object *obj, zval *retval) return FAILURE; } - if (dom_node_children_valid(nodep) == FAILURE) { - ZVAL_NULL(retval); - } else { - php_dom_create_interator(retval, DOM_NODELIST); - intern = Z_DOMOBJ_P(retval); - dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL); - } + php_dom_create_interator(retval, DOM_NODELIST); + intern = Z_DOMOBJ_P(retval); + dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL); return SUCCESS; } diff --git a/ext/dom/tests/bug69846.phpt b/ext/dom/tests/bug69846.phpt index fcca4c06d6514..74662d53f690c 100644 --- a/ext/dom/tests/bug69846.phpt +++ b/ext/dom/tests/bug69846.phpt @@ -50,7 +50,7 @@ object(DOMText)#%d (19) { ["parentNode"]=> NULL ["childNodes"]=> - NULL + string(22) "(object value omitted)" ["firstChild"]=> NULL ["lastChild"]=> @@ -140,7 +140,7 @@ object(DOMText)#%d (19) { ["parentNode"]=> NULL ["childNodes"]=> - NULL + string(22) "(object value omitted)" ["firstChild"]=> NULL ["lastChild"]=> diff --git a/ext/dom/tests/bug79271.phpt b/ext/dom/tests/bug79271.phpt new file mode 100644 index 0000000000000..c0ef07bd61ca4 --- /dev/null +++ b/ext/dom/tests/bug79271.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #79271 (DOMDocumentType::$childNodes is NULL) +--SKIPIF-- + +--FILE-- +createDocumentType('html'); +var_dump($type->childNodes); +?> +--EXPECTF-- +object(DOMNodeList)#%d (1) { + ["length"]=> + int(0) +} From 409965fe1cfa013abd377a5b567e2d19aac163e8 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sat, 15 Feb 2020 20:52:19 -0800 Subject: [PATCH 018/201] Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress --- ext/session/session.c | 10 +++++--- ext/session/tests/bug79221.phpt | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 ext/session/tests/bug79221.phpt diff --git a/ext/session/session.c b/ext/session/session.c index d0779294ec4e4..078b3f0b3ce85 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -3308,10 +3308,12 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo if (PS(rfc1867_cleanup)) { php_session_rfc1867_cleanup(progress); } else { - SEPARATE_ARRAY(&progress->data); - add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1); - Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; - php_session_rfc1867_update(progress, 1); + if (!Z_ISUNDEF(progress->data)) { + SEPARATE_ARRAY(&progress->data); + add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1); + Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; + php_session_rfc1867_update(progress, 1); + } } php_rshutdown_session_globals(); } diff --git a/ext/session/tests/bug79221.phpt b/ext/session/tests/bug79221.phpt new file mode 100644 index 0000000000000..b0972c4697054 --- /dev/null +++ b/ext/session/tests/bug79221.phpt @@ -0,0 +1,45 @@ +--TEST-- +Null Pointer Dereference in PHP Session Upload Progress +--INI-- +error_reporting=0 +file_uploads=1 +upload_max_filesize=1024 +session.save_path= +session.name=PHPSESSID +session.serialize_handler=php +session.use_strict_mode=0 +session.use_cookies=1 +session.use_only_cookies=0 +session.upload_progress.enabled=1 +session.upload_progress.cleanup=0 +session.upload_progress.prefix=upload_progress_ +session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS +session.upload_progress.freq=1% +session.upload_progress.min_freq=0.000000001 +--COOKIE-- +PHPSESSID=session-upload +--POST_RAW-- +Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="PHPSESSID" + +session-upload +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" + +ryat +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; file="file"; ryat="filename" + +1 +-----------------------------20896060251896012921717172737-- +--FILE-- + Date: Sat, 15 Feb 2020 22:17:14 -0800 Subject: [PATCH 019/201] Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions --- ext/phar/phar_object.c | 11 +++++ ext/phar/tests/bug79082.phpt | 52 ++++++++++++++++++++ ext/phar/tests/test79082/test79082-testfile | 1 + ext/phar/tests/test79082/test79082-testfile2 | 1 + 4 files changed, 65 insertions(+) create mode 100644 ext/phar/tests/bug79082.phpt create mode 100644 ext/phar/tests/test79082/test79082-testfile create mode 100644 ext/phar/tests/test79082/test79082-testfile2 diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index e44bb56231450..14b4a795d01ed 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1404,6 +1404,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ char *str_key; zend_class_entry *ce = p_obj->c; phar_archive_object *phar_obj = p_obj->p; + php_stream_statbuf ssb; value = iter->funcs->get_current_data(iter); @@ -1671,6 +1672,16 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ php_stream_copy_to_stream_ex(fp, p_obj->fp, PHP_STREAM_COPY_ALL, &contents_len); data->internal_file->uncompressed_filesize = data->internal_file->compressed_filesize = php_stream_tell(p_obj->fp) - data->internal_file->offset; + if (php_stream_stat(fp, &ssb) != -1) { + data->internal_file->flags = ssb.sb.st_mode & PHAR_ENT_PERM_MASK ; + } else { +#ifndef _WIN32 + mode_t mask; + mask = umask(0); + umask(mask); + data->internal_file->flags &= ~mask; +#endif + } } if (close_fp) { diff --git a/ext/phar/tests/bug79082.phpt b/ext/phar/tests/bug79082.phpt new file mode 100644 index 0000000000000..ca453d1b57bcf --- /dev/null +++ b/ext/phar/tests/bug79082.phpt @@ -0,0 +1,52 @@ +--TEST-- +Phar: Bug #79082: Files added to tar with Phar::buildFromIterator have all-access permissions +--SKIPIF-- + +--FILE-- + 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode); + $phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); +} +foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode); + $phar->buildFromDirectory(__DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); +} +?> +--CLEAN-- + +--EXPECT-- +string(2) "22" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" diff --git a/ext/phar/tests/test79082/test79082-testfile b/ext/phar/tests/test79082/test79082-testfile new file mode 100644 index 0000000000000..9daeafb9864cf --- /dev/null +++ b/ext/phar/tests/test79082/test79082-testfile @@ -0,0 +1 @@ +test diff --git a/ext/phar/tests/test79082/test79082-testfile2 b/ext/phar/tests/test79082/test79082-testfile2 new file mode 100644 index 0000000000000..9daeafb9864cf --- /dev/null +++ b/ext/phar/tests/test79082/test79082-testfile2 @@ -0,0 +1 @@ +test From 7df594b9437aa4f127581e4c88da99e7c41a9b14 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 26 Jan 2020 16:03:35 +0100 Subject: [PATCH 020/201] Fix # 79171: heap-buffer-overflow in phar_extract_file We must not access memory outside of the allocated buffer. --- ext/phar/phar_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 14b4a795d01ed..82c7c376edd72 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -4153,7 +4153,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char * if ('\\' == filename[cnt]) { filename[cnt] = '/'; } - } while (cnt++ <= filename_len); + } while (cnt++ < filename_len); } #endif From 282bfb109ecd07cd76761c098304a45bd214e439 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sat, 15 Feb 2020 20:52:19 -0800 Subject: [PATCH 021/201] Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress --- ext/session/session.c | 10 +++++--- ext/session/tests/bug79221.phpt | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 ext/session/tests/bug79221.phpt diff --git a/ext/session/session.c b/ext/session/session.c index 7c7e4841e4fcd..092dea81ce261 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -3320,10 +3320,12 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo if (PS(rfc1867_cleanup)) { php_session_rfc1867_cleanup(progress); } else { - SEPARATE_ARRAY(&progress->data); - add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1); - Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; - php_session_rfc1867_update(progress, 1); + if (!Z_ISUNDEF(progress->data)) { + SEPARATE_ARRAY(&progress->data); + add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1); + Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; + php_session_rfc1867_update(progress, 1); + } } php_rshutdown_session_globals(); } diff --git a/ext/session/tests/bug79221.phpt b/ext/session/tests/bug79221.phpt new file mode 100644 index 0000000000000..b0972c4697054 --- /dev/null +++ b/ext/session/tests/bug79221.phpt @@ -0,0 +1,45 @@ +--TEST-- +Null Pointer Dereference in PHP Session Upload Progress +--INI-- +error_reporting=0 +file_uploads=1 +upload_max_filesize=1024 +session.save_path= +session.name=PHPSESSID +session.serialize_handler=php +session.use_strict_mode=0 +session.use_cookies=1 +session.use_only_cookies=0 +session.upload_progress.enabled=1 +session.upload_progress.cleanup=0 +session.upload_progress.prefix=upload_progress_ +session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS +session.upload_progress.freq=1% +session.upload_progress.min_freq=0.000000001 +--COOKIE-- +PHPSESSID=session-upload +--POST_RAW-- +Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="PHPSESSID" + +session-upload +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" + +ryat +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; file="file"; ryat="filename" + +1 +-----------------------------20896060251896012921717172737-- +--FILE-- + Date: Sat, 15 Feb 2020 22:17:14 -0800 Subject: [PATCH 022/201] Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions --- ext/phar/phar_object.c | 11 +++++ ext/phar/tests/bug79082.phpt | 52 ++++++++++++++++++++ ext/phar/tests/test79082/test79082-testfile | 1 + ext/phar/tests/test79082/test79082-testfile2 | 1 + 4 files changed, 65 insertions(+) create mode 100644 ext/phar/tests/bug79082.phpt create mode 100644 ext/phar/tests/test79082/test79082-testfile create mode 100644 ext/phar/tests/test79082/test79082-testfile2 diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 6cf097e36fe46..89b553c2b91ca 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1419,6 +1419,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ char *str_key; zend_class_entry *ce = p_obj->c; phar_archive_object *phar_obj = p_obj->p; + php_stream_statbuf ssb; value = iter->funcs->get_current_data(iter); @@ -1686,6 +1687,16 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ php_stream_copy_to_stream_ex(fp, p_obj->fp, PHP_STREAM_COPY_ALL, &contents_len); data->internal_file->uncompressed_filesize = data->internal_file->compressed_filesize = php_stream_tell(p_obj->fp) - data->internal_file->offset; + if (php_stream_stat(fp, &ssb) != -1) { + data->internal_file->flags = ssb.sb.st_mode & PHAR_ENT_PERM_MASK ; + } else { +#ifndef _WIN32 + mode_t mask; + mask = umask(0); + umask(mask); + data->internal_file->flags &= ~mask; +#endif + } } if (close_fp) { diff --git a/ext/phar/tests/bug79082.phpt b/ext/phar/tests/bug79082.phpt new file mode 100644 index 0000000000000..ca453d1b57bcf --- /dev/null +++ b/ext/phar/tests/bug79082.phpt @@ -0,0 +1,52 @@ +--TEST-- +Phar: Bug #79082: Files added to tar with Phar::buildFromIterator have all-access permissions +--SKIPIF-- + +--FILE-- + 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode); + $phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); +} +foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode); + $phar->buildFromDirectory(__DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); +} +?> +--CLEAN-- + +--EXPECT-- +string(2) "22" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" diff --git a/ext/phar/tests/test79082/test79082-testfile b/ext/phar/tests/test79082/test79082-testfile new file mode 100644 index 0000000000000..9daeafb9864cf --- /dev/null +++ b/ext/phar/tests/test79082/test79082-testfile @@ -0,0 +1 @@ +test diff --git a/ext/phar/tests/test79082/test79082-testfile2 b/ext/phar/tests/test79082/test79082-testfile2 new file mode 100644 index 0000000000000..9daeafb9864cf --- /dev/null +++ b/ext/phar/tests/test79082/test79082-testfile2 @@ -0,0 +1 @@ +test From b01b1f65e77325e16f4cca4d0cb1dff48891680c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 26 Jan 2020 16:03:35 +0100 Subject: [PATCH 023/201] Fix # 79171: heap-buffer-overflow in phar_extract_file We must not access memory outside of the allocated buffer. --- ext/phar/phar_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 89b553c2b91ca..eaa74ece94a96 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -4184,7 +4184,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char * if ('\\' == filename[cnt]) { filename[cnt] = '/'; } - } while (cnt++ <= filename_len); + } while (cnt++ < filename_len); } #endif From 90ae1818d54b3017ed114d45e83924eebafdb7d7 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sat, 15 Feb 2020 20:52:19 -0800 Subject: [PATCH 024/201] Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress --- ext/session/session.c | 10 +++++--- ext/session/tests/bug79221.phpt | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 ext/session/tests/bug79221.phpt diff --git a/ext/session/session.c b/ext/session/session.c index 0470ba1fc645a..ad299209b6a43 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -3217,10 +3217,12 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo if (PS(rfc1867_cleanup)) { php_session_rfc1867_cleanup(progress); } else { - SEPARATE_ARRAY(&progress->data); - add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1); - Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; - php_session_rfc1867_update(progress, 1); + if (!Z_ISUNDEF(progress->data)) { + SEPARATE_ARRAY(&progress->data); + add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1); + Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; + php_session_rfc1867_update(progress, 1); + } } php_rshutdown_session_globals(); } diff --git a/ext/session/tests/bug79221.phpt b/ext/session/tests/bug79221.phpt new file mode 100644 index 0000000000000..b0972c4697054 --- /dev/null +++ b/ext/session/tests/bug79221.phpt @@ -0,0 +1,45 @@ +--TEST-- +Null Pointer Dereference in PHP Session Upload Progress +--INI-- +error_reporting=0 +file_uploads=1 +upload_max_filesize=1024 +session.save_path= +session.name=PHPSESSID +session.serialize_handler=php +session.use_strict_mode=0 +session.use_cookies=1 +session.use_only_cookies=0 +session.upload_progress.enabled=1 +session.upload_progress.cleanup=0 +session.upload_progress.prefix=upload_progress_ +session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS +session.upload_progress.freq=1% +session.upload_progress.min_freq=0.000000001 +--COOKIE-- +PHPSESSID=session-upload +--POST_RAW-- +Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="PHPSESSID" + +session-upload +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" + +ryat +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; file="file"; ryat="filename" + +1 +-----------------------------20896060251896012921717172737-- +--FILE-- + Date: Sat, 15 Feb 2020 22:17:14 -0800 Subject: [PATCH 025/201] Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions --- ext/phar/phar_object.c | 11 +++++ ext/phar/tests/bug79082.phpt | 52 ++++++++++++++++++++ ext/phar/tests/test79082/test79082-testfile | 1 + ext/phar/tests/test79082/test79082-testfile2 | 1 + 4 files changed, 65 insertions(+) create mode 100644 ext/phar/tests/bug79082.phpt create mode 100644 ext/phar/tests/test79082/test79082-testfile create mode 100644 ext/phar/tests/test79082/test79082-testfile2 diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 027c78a18c9e4..0cbb4bc9c0733 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1424,6 +1424,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ char *str_key; zend_class_entry *ce = p_obj->c; phar_archive_object *phar_obj = p_obj->p; + php_stream_statbuf ssb; value = iter->funcs->get_current_data(iter); @@ -1691,6 +1692,16 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ php_stream_copy_to_stream_ex(fp, p_obj->fp, PHP_STREAM_COPY_ALL, &contents_len); data->internal_file->uncompressed_filesize = data->internal_file->compressed_filesize = php_stream_tell(p_obj->fp) - data->internal_file->offset; + if (php_stream_stat(fp, &ssb) != -1) { + data->internal_file->flags = ssb.sb.st_mode & PHAR_ENT_PERM_MASK ; + } else { +#ifndef _WIN32 + mode_t mask; + mask = umask(0); + umask(mask); + data->internal_file->flags &= ~mask; +#endif + } } if (close_fp) { diff --git a/ext/phar/tests/bug79082.phpt b/ext/phar/tests/bug79082.phpt new file mode 100644 index 0000000000000..ca453d1b57bcf --- /dev/null +++ b/ext/phar/tests/bug79082.phpt @@ -0,0 +1,52 @@ +--TEST-- +Phar: Bug #79082: Files added to tar with Phar::buildFromIterator have all-access permissions +--SKIPIF-- + +--FILE-- + 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode); + $phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); +} +foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode); + $phar->buildFromDirectory(__DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); +} +?> +--CLEAN-- + +--EXPECT-- +string(2) "22" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" +string(6) "100644" +string(6) "100400" diff --git a/ext/phar/tests/test79082/test79082-testfile b/ext/phar/tests/test79082/test79082-testfile new file mode 100644 index 0000000000000..9daeafb9864cf --- /dev/null +++ b/ext/phar/tests/test79082/test79082-testfile @@ -0,0 +1 @@ +test diff --git a/ext/phar/tests/test79082/test79082-testfile2 b/ext/phar/tests/test79082/test79082-testfile2 new file mode 100644 index 0000000000000..9daeafb9864cf --- /dev/null +++ b/ext/phar/tests/test79082/test79082-testfile2 @@ -0,0 +1 @@ +test From 7248341ea6b1209f7aa9b9a978e1b35586ccf523 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 26 Jan 2020 16:03:35 +0100 Subject: [PATCH 026/201] Fix # 79171: heap-buffer-overflow in phar_extract_file We must not access memory outside of the allocated buffer. --- ext/phar/phar_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 0cbb4bc9c0733..b246167ed8ba6 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -4199,7 +4199,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char * if ('\\' == filename[cnt]) { filename[cnt] = '/'; } - } while (cnt++ <= filename_len); + } while (cnt++ < filename_len); } #endif From 7a8f180b19383eeeff320914530581ccfb636e40 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 17 Feb 2020 09:34:56 +0100 Subject: [PATCH 027/201] Revert "Fixed bug #79255 (PHP cannot be compiled with enable JIT)" This reverts commit de6984edd5ce7fa2b2f365b5ae770507ef42022d. Reverting to unbreak 32-bit CI. --- NEWS | 1 - ext/opcache/config.m4 | 21 +++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index c484a95b8f241..a41a74acc40a0 100644 --- a/NEWS +++ b/NEWS @@ -42,7 +42,6 @@ PHP NEWS - JIT: . Fixed bug #77857 (Wrong result if executed with JIT). (Laruence) - . Fixed bug #79255 (PHP cannot be compiled with enable JIT). (Laruence) - LDAP: . Removed deprecated ldap_sort. (mcmic) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 4289b438d52f7..5e61575d48070 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -42,14 +42,19 @@ if test "$PHP_OPCACHE" != "no"; then AC_DEFINE(HAVE_JIT, 1, [Define to enable JIT]) ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c" - case $host_alias in - *x86_64-*-darwin*) - DASM_FLAGS="-D X64APPLE=1 -D X64=1" - ;; - *x86_64*) - DASM_FLAGS="-D X64=1" - ;; - esac + dnl Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *"Mach-O 64-bit"*) + DASM_FLAGS="-D X64APPLE=1 -D X64=1" + ;; + *64-bit*) + DASM_FLAGS="-D X64=1" + ;; + esac + fi + rm -rf conftest* if test "$enable_zts" = "yes"; then DASM_FLAGS="$DASM_FLAGS -D ZTS=1" From cf8407a2380ae827a0e9a63993d59b1927769eb7 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 17 Feb 2020 12:03:49 +0300 Subject: [PATCH 028/201] Fixed bug #79255 (PHP cannot be compiled with enable JIT) --- NEWS | 2 ++ ext/opcache/config.m4 | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index a41a74acc40a0..7d7d86b1029d9 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,8 @@ PHP NEWS - JIT: . Fixed bug #77857 (Wrong result if executed with JIT). (Laruence) + . Fixed bug #79255 (PHP cannot be compiled with enable JIT). + (Laruence, Dmitry) - LDAP: . Removed deprecated ldap_sort. (mcmic) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 5e61575d48070..205456c73e0b0 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -43,18 +43,28 @@ if test "$PHP_OPCACHE" != "no"; then ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c" dnl Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *"Mach-O 64-bit"*) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + int main(void) { + return sizeof(void*) == 4; + } + ]])],[ + ac_cv_32bit_build=no + ],[ + ac_cv_32bit_build=yes + ],[ + ac_cv_32bit_build=no + ]) + + if test "$ac_cv_32bit_build" = "no"; then + case $host_alias in + *x86_64-*-darwin*) DASM_FLAGS="-D X64APPLE=1 -D X64=1" ;; - *64-bit*) + *x86_64*) DASM_FLAGS="-D X64=1" ;; esac fi - rm -rf conftest* if test "$enable_zts" = "yes"; then DASM_FLAGS="$DASM_FLAGS -D ZTS=1" From 54ecf57fe290f69a2112d4c2ea3a1e99208e2797 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 17 Feb 2020 12:48:55 +0300 Subject: [PATCH 029/201] Disable instantiation of zero size FFI\CData objects --- ext/ffi/ffi.c | 6 ++++++ ext/ffi/tests/023.phpt | 8 ++++++-- ext/ffi/tests/027.phpt | 2 +- ext/ffi/tests/045.phpt | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index f43ba2adc8d27..d99448dd69f05 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -3685,6 +3685,12 @@ ZEND_METHOD(FFI, new) /* {{{ */ } } + if (type->size == 0) { + zend_throw_error(zend_ffi_exception_ce, "Cannot instantiate FFI\\CData of zero size"); + zend_ffi_type_dtor(type_ptr); + return; + } + ptr = pemalloc(type->size, flags & ZEND_FFI_FLAG_PERSISTENT); memset(ptr, 0, type->size); diff --git a/ext/ffi/tests/023.phpt b/ext/ffi/tests/023.phpt index 370362039060d..920a3bee3ecb6 100644 --- a/ext/ffi/tests/023.phpt +++ b/ext/ffi/tests/023.phpt @@ -6,13 +6,17 @@ FFI 023: GCC struct extensions ffi.enable=1 --FILE-- getMessage() . "\n"; + } var_dump(FFI::sizeof(FFI::new("struct {int a}"))); var_dump(FFI::sizeof(FFI::new("struct {int a; int b}"))); ?> ok --EXPECT-- -int(0) +FFI\Exception: Cannot instantiate FFI\CData of zero size int(4) int(8) ok diff --git a/ext/ffi/tests/027.phpt b/ext/ffi/tests/027.phpt index 14c51f77e426b..6e3e76204b64d 100644 --- a/ext/ffi/tests/027.phpt +++ b/ext/ffi/tests/027.phpt @@ -81,7 +81,7 @@ FFI\ParserException: '[*]' not allowed in other than function prototype scope at FFI\ParserException: '[*]' not allowed in other than function prototype scope at line 1 FFI\ParserException: '[*]' not allowed in other than function prototype scope at line 1 ok -int(0) +FFI\Exception: Cannot instantiate FFI\CData of zero size FFI\ParserException: '[]' not allowed at line 1 FFI\ParserException: '[]' not allowed at line 1 ok diff --git a/ext/ffi/tests/045.phpt b/ext/ffi/tests/045.phpt index 7118df9eb7bb0..b73c38aefb56a 100644 --- a/ext/ffi/tests/045.phpt +++ b/ext/ffi/tests/045.phpt @@ -26,4 +26,4 @@ bool(false) Warning: FFI::isNull() expects parameter 1 to be FFI\CData, null given in %s045.php on line %d NULL -FFI\Exception: FFI\Cdata is not a pointer +FFI\Exception: Cannot instantiate FFI\CData of zero size From d2ba8485721144dbb235d183a82e34d8bb1720eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Wed, 12 Feb 2020 12:24:54 +0100 Subject: [PATCH 030/201] Use strlen for INI_* macros strlen() is resolved at compile time by optimizing compilers. Prevent mistakes and allow to use INI_* macros with char * variables which can have sizeof() == 1. Closes GH-5174. --- Zend/zend_ini.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index ba8cc25f0a920..3759ca319618c 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -138,21 +138,21 @@ END_EXTERN_C() ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, NULL, zend_ini_boolean_displayer_cb) #endif -#define INI_INT(name) zend_ini_long((name), sizeof(name)-1, 0) -#define INI_FLT(name) zend_ini_double((name), sizeof(name)-1, 0) -#define INI_STR(name) zend_ini_string_ex((name), sizeof(name)-1, 0, NULL) +#define INI_INT(name) zend_ini_long((name), strlen(name), 0) +#define INI_FLT(name) zend_ini_double((name), strlen(name), 0) +#define INI_STR(name) zend_ini_string_ex((name), strlen(name), 0, NULL) #define INI_BOOL(name) ((zend_bool) INI_INT(name)) -#define INI_ORIG_INT(name) zend_ini_long((name), sizeof(name)-1, 1) -#define INI_ORIG_FLT(name) zend_ini_double((name), sizeof(name)-1, 1) -#define INI_ORIG_STR(name) zend_ini_string((name), sizeof(name)-1, 1) +#define INI_ORIG_INT(name) zend_ini_long((name), strlen(name), 1) +#define INI_ORIG_FLT(name) zend_ini_double((name), strlen(name), 1) +#define INI_ORIG_STR(name) zend_ini_string((name), strlen(name), 1) #define INI_ORIG_BOOL(name) ((zend_bool) INI_ORIG_INT(name)) #define REGISTER_INI_ENTRIES() zend_register_ini_entries(ini_entries, module_number) #define UNREGISTER_INI_ENTRIES() zend_unregister_ini_entries(module_number) #define DISPLAY_INI_ENTRIES() display_ini_entries(zend_module) -#define REGISTER_INI_DISPLAYER(name, displayer) zend_ini_register_displayer((name), sizeof(name)-1, displayer) +#define REGISTER_INI_DISPLAYER(name, displayer) zend_ini_register_displayer((name), strlen(name), displayer) #define REGISTER_INI_BOOLEAN(name) REGISTER_INI_DISPLAYER(name, zend_ini_boolean_displayer_cb) /* Standard message handlers */ From 43443857b74503246ee4ca25859b302ed0ebc078 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 7 Jan 2020 15:06:36 +0100 Subject: [PATCH 031/201] Add static return type RFC: https://wiki.php.net/rfc/static_return_type The "static" type is represented as MAY_BE_STATIC, rather than a class type like "self" and "parent", as it has special resolution semantics, and cannot be cached in the runtime cache. Closes GH-5062. --- UPGRADING | 9 ++ .../static_type_in_final_class.phpt | 17 ++++ .../static_type_outside_class.phpt | 10 ++ .../type_declarations/static_type_param.phpt | 15 +++ .../static_type_property.phpt | 13 +++ .../type_declarations/static_type_return.phpt | 91 +++++++++++++++++++ .../type_declarations/static_type_trait.phpt | 38 ++++++++ .../redundant_types/object_and_static.phpt | 12 +++ .../variance/static_variance_failure.phpt | 15 +++ .../variance/static_variance_success.phpt | 25 +++++ Zend/zend_compile.c | 16 +++- Zend/zend_execute.c | 41 +++++++-- Zend/zend_execute.h | 2 + Zend/zend_inheritance.c | 37 +++++++- Zend/zend_language_parser.y | 49 +++++++--- Zend/zend_type_info.h | 1 + Zend/zend_types.h | 1 + ext/opcache/Optimizer/dfa_pass.c | 2 +- ext/opcache/Optimizer/zend_inference.c | 3 + ext/opcache/jit/zend_jit_helpers.c | 3 + ext/reflection/php_reflection.c | 4 +- ext/reflection/tests/static_type.phpt | 22 +++++ 22 files changed, 400 insertions(+), 26 deletions(-) create mode 100644 Zend/tests/type_declarations/static_type_in_final_class.phpt create mode 100644 Zend/tests/type_declarations/static_type_outside_class.phpt create mode 100644 Zend/tests/type_declarations/static_type_param.phpt create mode 100644 Zend/tests/type_declarations/static_type_property.phpt create mode 100644 Zend/tests/type_declarations/static_type_return.phpt create mode 100644 Zend/tests/type_declarations/static_type_trait.phpt create mode 100644 Zend/tests/type_declarations/union_types/redundant_types/object_and_static.phpt create mode 100644 Zend/tests/type_declarations/variance/static_variance_failure.phpt create mode 100644 Zend/tests/type_declarations/variance/static_variance_success.phpt create mode 100644 ext/reflection/tests/static_type.phpt diff --git a/UPGRADING b/UPGRADING index e71bc5332a215..30611b1013219 100644 --- a/UPGRADING +++ b/UPGRADING @@ -367,6 +367,15 @@ PHP 8.0 UPGRADE NOTES class B extends A { public function method(...$everything) {} } + . "static" (as in "late static binding") can now be used as a return type: + + class Test { + public function create(): static { + return new static(); + } + } + + RFC: https://wiki.php.net/rfc/static_return_type . It is now possible to fetch the class name of an object using `$object::class`. The result is the same as `get_class($object)`. RFC: https://wiki.php.net/rfc/class_name_literal_on_object diff --git a/Zend/tests/type_declarations/static_type_in_final_class.phpt b/Zend/tests/type_declarations/static_type_in_final_class.phpt new file mode 100644 index 0000000000000..2954d7d1ac9a1 --- /dev/null +++ b/Zend/tests/type_declarations/static_type_in_final_class.phpt @@ -0,0 +1,17 @@ +--TEST-- +While it may not be very useful, static is also permitted in final classes +--FILE-- + +--EXPECT-- +object(Test)#1 (0) { +} diff --git a/Zend/tests/type_declarations/static_type_outside_class.phpt b/Zend/tests/type_declarations/static_type_outside_class.phpt new file mode 100644 index 0000000000000..f485e394b4e48 --- /dev/null +++ b/Zend/tests/type_declarations/static_type_outside_class.phpt @@ -0,0 +1,10 @@ +--TEST-- +Static type outside class generates compile error +--FILE-- + +--EXPECTF-- +Fatal error: Cannot use "static" when no class scope is active in %s on line %d diff --git a/Zend/tests/type_declarations/static_type_param.phpt b/Zend/tests/type_declarations/static_type_param.phpt new file mode 100644 index 0000000000000..4c0d6b1dfc9a9 --- /dev/null +++ b/Zend/tests/type_declarations/static_type_param.phpt @@ -0,0 +1,15 @@ +--TEST-- +Static type is not allowed in parameters +--FILE-- + +--EXPECTF-- +Parse error: syntax error, unexpected 'static' (T_STATIC), expecting variable (T_VARIABLE) in %s on line %d diff --git a/Zend/tests/type_declarations/static_type_property.phpt b/Zend/tests/type_declarations/static_type_property.phpt new file mode 100644 index 0000000000000..aba303d5fa225 --- /dev/null +++ b/Zend/tests/type_declarations/static_type_property.phpt @@ -0,0 +1,13 @@ +--TEST-- +Static type is not allowed in properties +--FILE-- + +--EXPECTF-- +Parse error: syntax error, unexpected 'static' (T_STATIC) in %s on line %d diff --git a/Zend/tests/type_declarations/static_type_return.phpt b/Zend/tests/type_declarations/static_type_return.phpt new file mode 100644 index 0000000000000..4a04cfff78b36 --- /dev/null +++ b/Zend/tests/type_declarations/static_type_return.phpt @@ -0,0 +1,91 @@ +--TEST-- +Static return type +--FILE-- +test1()); +var_dump($b->test1()); + +echo "\n"; +var_dump($a->test2()); +try { + var_dump($b->test2()); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} + +echo "\n"; +var_dump($a->test3()); +var_dump($b->test3()); + +echo "\n"; +var_dump($a->test4()); +try { + var_dump($b->test4()); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} + +echo "\n"; +$test = function($x): static { + return $x; +}; + +try { + var_dump($test(new stdClass)); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} + +$test = $test->bindTo($a); +var_dump($test($a)); + +?> +--EXPECT-- +object(A)#3 (0) { +} +object(B)#3 (0) { +} + +object(A)#3 (0) { +} +Return value of A::test2() must be an instance of B, instance of A returned + +object(A)#3 (0) { +} +object(C)#3 (0) { +} + +object(A)#3 (0) { +} +Return value of A::test4() must be of type B|array, instance of A returned + +Return value of {closure}() must be an instance of static, instance of stdClass returned +object(A)#1 (0) { +} diff --git a/Zend/tests/type_declarations/static_type_trait.phpt b/Zend/tests/type_declarations/static_type_trait.phpt new file mode 100644 index 0000000000000..ede9fd62b1e2c --- /dev/null +++ b/Zend/tests/type_declarations/static_type_trait.phpt @@ -0,0 +1,38 @@ +--TEST-- +static type in trait +--FILE-- +test($c)); +var_dump($c->test($p)); +var_dump($p->test($p)); +var_dump($p->test($c)); + +?> +--EXPECTF-- +object(C)#1 (0) { +} +object(P)#2 (0) { +} +object(P)#2 (0) { +} + +Fatal error: Uncaught TypeError: Return value of C::test() must be an instance of P, instance of C returned in %s:%d +Stack trace: +#0 %s(%d): C->test(Object(C)) +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/type_declarations/union_types/redundant_types/object_and_static.phpt b/Zend/tests/type_declarations/union_types/redundant_types/object_and_static.phpt new file mode 100644 index 0000000000000..f4152c2a234b1 --- /dev/null +++ b/Zend/tests/type_declarations/union_types/redundant_types/object_and_static.phpt @@ -0,0 +1,12 @@ +--TEST-- +object and static are redundant +--FILE-- + +--EXPECTF-- +Fatal error: Type static|object contains both object and a class type, which is redundant in %s on line %d diff --git a/Zend/tests/type_declarations/variance/static_variance_failure.phpt b/Zend/tests/type_declarations/variance/static_variance_failure.phpt new file mode 100644 index 0000000000000..159a69c30624c --- /dev/null +++ b/Zend/tests/type_declarations/variance/static_variance_failure.phpt @@ -0,0 +1,15 @@ +--TEST-- +Failure case for static variance: Replace static with self +--FILE-- + +--EXPECTF-- +Fatal error: Declaration of B::test(): B must be compatible with A::test(): static in %s on line %d diff --git a/Zend/tests/type_declarations/variance/static_variance_success.phpt b/Zend/tests/type_declarations/variance/static_variance_success.phpt new file mode 100644 index 0000000000000..3749d8d874c7e --- /dev/null +++ b/Zend/tests/type_declarations/variance/static_variance_success.phpt @@ -0,0 +1,25 @@ +--TEST-- +Success cases for static variance +--FILE-- + +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index d43bb6f4a34f0..58fb3377d2cfc 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1196,6 +1196,16 @@ zend_string *zend_type_to_string_resolved(zend_type type, zend_class_entry *scop } uint32_t type_mask = ZEND_TYPE_FULL_MASK(type); + if (type_mask & MAY_BE_STATIC) { + zend_string *name = ZSTR_KNOWN(ZEND_STR_STATIC); + if (scope) { + zend_class_entry *called_scope = zend_get_called_scope(EG(current_execute_data)); + if (called_scope) { + name = called_scope->name; + } + } + str = add_type_string(str, name); + } if (type_mask & MAY_BE_CALLABLE) { str = add_type_string(str, ZSTR_KNOWN(ZEND_STR_CALLABLE)); } @@ -5502,6 +5512,10 @@ static zend_type zend_compile_single_typename(zend_ast *ast) { ZEND_ASSERT(!(ast->attr & ZEND_TYPE_NULLABLE)); if (ast->kind == ZEND_AST_TYPE) { + if (ast->attr == IS_STATIC && !CG(active_class_entry) && zend_is_scope_known()) { + zend_error_noreturn(E_COMPILE_ERROR, + "Cannot use \"static\" when no class scope is active"); + } return (zend_type) ZEND_TYPE_INIT_CODE(ast->attr, 0, 0); } else { zend_string *class_name = zend_ast_get_str(ast); @@ -5657,7 +5671,7 @@ static zend_type zend_compile_typename( ZSTR_VAL(type_str)); } - if ((type_mask & MAY_BE_OBJECT) && ZEND_TYPE_HAS_CLASS(type)) { + if ((type_mask & MAY_BE_OBJECT) && (ZEND_TYPE_HAS_CLASS(type) || (type_mask & MAY_BE_STATIC))) { zend_string *type_str = zend_type_to_string(type); zend_error_noreturn(E_COMPILE_ERROR, "Type %s contains both object and a class type, which is redundant", diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 140038e4c333a..3fbbcef0feb67 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -674,7 +674,7 @@ static ZEND_COLD void zend_verify_type_error_common( } if (is_union_type(arg_info->type)) { - zend_string *type_str = zend_type_to_string(arg_info->type); + zend_string *type_str = zend_type_to_string_resolved(arg_info->type, zf->common.scope); smart_str_appends(&str, "be of type "); smart_str_append(&str, type_str); zend_string_release(type_str); @@ -714,6 +714,16 @@ static ZEND_COLD void zend_verify_type_error_common( case MAY_BE_ITERABLE: smart_str_appends(&str, "be iterable"); break; + case MAY_BE_STATIC: { + zend_class_entry *called_scope = zend_get_called_scope(EG(current_execute_data)); + smart_str_appends(&str, "be an instance of "); + if (called_scope) { + smart_str_append(&str, called_scope->name); + } else { + smart_str_appends(&str, "static"); + } + break; + } default: { /* Hack to print the type without null */ @@ -735,7 +745,9 @@ static ZEND_COLD void zend_verify_type_error_common( *need_msg = smart_str_extract(&str); if (value) { - if (ZEND_TYPE_HAS_CLASS(arg_info->type) && Z_TYPE_P(value) == IS_OBJECT) { + zend_bool has_class = ZEND_TYPE_HAS_CLASS(arg_info->type) + || (ZEND_TYPE_FULL_MASK(arg_info->type) & MAY_BE_STATIC); + if (has_class && Z_TYPE_P(value) == IS_OBJECT) { *given_msg = "instance of "; *given_kind = ZSTR_VAL(Z_OBJCE_P(value)->name); } else { @@ -988,11 +1000,12 @@ static zend_always_inline zend_bool i_zend_check_property_type(zend_property_inf return 1; } - ZEND_ASSERT(!(ZEND_TYPE_FULL_MASK(info->type) & MAY_BE_CALLABLE)); - if ((ZEND_TYPE_FULL_MASK(info->type) & MAY_BE_ITERABLE) && zend_is_iterable(property)) { + uint32_t type_mask = ZEND_TYPE_FULL_MASK(info->type); + ZEND_ASSERT(!(type_mask & (MAY_BE_CALLABLE|MAY_BE_STATIC))); + if ((type_mask & MAY_BE_ITERABLE) && zend_is_iterable(property)) { return 1; } - return zend_verify_scalar_type_hint(ZEND_TYPE_FULL_MASK(info->type), property, strict, 0); + return zend_verify_scalar_type_hint(type_mask, property, strict, 0); } static zend_always_inline zend_bool i_zend_verify_property_type(zend_property_info *info, zval *property, zend_bool strict) @@ -1024,6 +1037,19 @@ static zend_never_inline zval* zend_assign_to_typed_prop(zend_property_info *inf return zend_assign_to_variable(property_val, &tmp, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } +ZEND_API zend_bool zend_value_instanceof_static(zval *zv) { + if (Z_TYPE_P(zv) != IS_OBJECT) { + return 0; + } + + zend_class_entry *called_scope = zend_get_called_scope(EG(current_execute_data)); + if (!called_scope) { + return 0; + } + return instanceof_function(Z_OBJCE_P(zv), called_scope); +} + + static zend_always_inline zend_bool zend_check_type_slow( zend_type type, zval *arg, zend_reference *ref, void **cache_slot, zend_class_entry *scope, zend_bool is_return_type, zend_bool is_internal) @@ -1074,6 +1100,9 @@ static zend_always_inline zend_bool zend_check_type_slow( if ((type_mask & MAY_BE_ITERABLE) && zend_is_iterable(arg)) { return 1; } + if ((type_mask & MAY_BE_STATIC) && zend_value_instanceof_static(arg)) { + return 1; + } if (ref && ZEND_REF_HAS_TYPE_SOURCES(ref)) { /* We cannot have conversions for typed refs. */ return 0; @@ -3046,7 +3075,7 @@ static zend_always_inline int i_zend_verify_type_assignable_zval( } type_mask = ZEND_TYPE_FULL_MASK(type); - ZEND_ASSERT(!(type_mask & MAY_BE_CALLABLE)); + ZEND_ASSERT(!(type_mask & (MAY_BE_CALLABLE|MAY_BE_STATIC))); if (type_mask & MAY_BE_ITERABLE) { return zend_is_iterable(zv); } diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 44b48e914c3d7..f29a5eb050229 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -67,6 +67,8 @@ ZEND_API ZEND_COLD void zend_verify_arg_error( ZEND_API ZEND_COLD void zend_verify_return_error( const zend_function *zf, void **cache_slot, zval *value); ZEND_API zend_bool zend_verify_ref_array_assignable(zend_reference *ref); +ZEND_API zend_bool zend_value_instanceof_static(zval *zv); + #define ZEND_REF_TYPE_SOURCES(ref) \ (ref)->sources diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 5abe1c55d4a0c..219c1ffcc9f06 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -333,6 +333,28 @@ static zend_bool zend_type_contains_traversable(zend_type type) { return 0; } +static zend_bool zend_type_permits_self( + zend_type type, zend_class_entry *scope, zend_class_entry *self) { + if (ZEND_TYPE_FULL_MASK(type) & MAY_BE_OBJECT) { + return 1; + } + + /* Any types that may satisfy self must have already been loaded at this point + * (as a parent or interface), so we never need to register delayed variance obligations + * for this case. */ + zend_type *single_type; + ZEND_TYPE_FOREACH(type, single_type) { + if (ZEND_TYPE_HAS_NAME(*single_type)) { + zend_string *name = resolve_class_name(scope, ZEND_TYPE_NAME(*single_type)); + zend_class_entry *ce = lookup_class(self, name, /* register_unresolved */ 0); + if (ce && unlinked_instanceof(self, ce)) { + return 1; + } + } + } ZEND_TYPE_FOREACH_END(); + return 0; +} + /* Unresolved means that class declarations that are currently not available are needed to * determine whether the inheritance is valid or not. At runtime UNRESOLVED should be treated * as an ERROR. */ @@ -406,13 +428,22 @@ static inheritance_status zend_perform_covariant_type_check( if (added_types) { // TODO: Make "iterable" an alias of "array|Traversable" instead, // so these special cases will be handled automatically. - if (added_types == MAY_BE_ITERABLE + if ((added_types & MAY_BE_ITERABLE) && (proto_type_mask & MAY_BE_ARRAY) && zend_type_contains_traversable(proto_type)) { /* Replacing array|Traversable with iterable is okay */ - } else if (added_types == MAY_BE_ARRAY && (proto_type_mask & MAY_BE_ITERABLE)) { + added_types &= ~MAY_BE_ITERABLE; + } + if ((added_types & MAY_BE_ARRAY) && (proto_type_mask & MAY_BE_ITERABLE)) { /* Replacing iterable with array is okay */ - } else { + added_types &= ~MAY_BE_ARRAY; + } + if ((added_types & MAY_BE_STATIC) + && zend_type_permits_self(proto_type, proto_scope, fe_scope)) { + /* Replacing type that accepts self with static is okay */ + added_types &= ~MAY_BE_STATIC; + } + if (added_types) { /* Otherwise adding new types is illegal */ return INHERITANCE_ERROR; } diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 02dbd091dcf89..c1ced9a35aa21 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -235,7 +235,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); %type unprefixed_use_declarations const_decl inner_statement %type expr optional_expr while_statement for_statement foreach_variable %type foreach_statement declare_statement finally_statement unset_variable variable -%type extends_from parameter optional_type argument global_var +%type extends_from parameter optional_type_without_static argument global_var %type static_var class_statement trait_adaptation trait_precedence trait_alias %type absolute_trait_method_reference trait_method_reference property echo_expr %type new_expr anonymous_class class_name class_name_reference simple_variable @@ -254,8 +254,8 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); %type ctor_arguments alt_if_stmt_without_else trait_adaptation_list lexical_vars %type lexical_var_list encaps_list %type array_pair non_empty_array_pair_list array_pair_list possible_array_pair -%type isset_variable type return_type type_expr -%type identifier +%type isset_variable type return_type type_expr type_without_static +%type identifier type_expr_without_static union_type_without_static %type inline_function union_type %type returns_ref function fn is_reference is_variadic variable_modifiers @@ -646,28 +646,27 @@ non_empty_parameter_list: ; parameter: - optional_type is_reference is_variadic T_VARIABLE + optional_type_without_static is_reference is_variadic T_VARIABLE { $$ = zend_ast_create_ex(ZEND_AST_PARAM, $2 | $3, $1, $4, NULL); } - | optional_type is_reference is_variadic T_VARIABLE '=' expr + | optional_type_without_static is_reference is_variadic T_VARIABLE '=' expr { $$ = zend_ast_create_ex(ZEND_AST_PARAM, $2 | $3, $1, $4, $6); } ; -optional_type: +optional_type_without_static: %empty { $$ = NULL; } - | type_expr { $$ = $1; } + | type_expr_without_static { $$ = $1; } ; type_expr: - type { $$ = $1; } - | '?' type { $$ = $2; $$->attr |= ZEND_TYPE_NULLABLE; } - | union_type { $$ = $1; } + type { $$ = $1; } + | '?' type { $$ = $2; $$->attr |= ZEND_TYPE_NULLABLE; } + | union_type { $$ = $1; } ; type: - T_ARRAY { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_ARRAY); } - | T_CALLABLE { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_CALLABLE); } - | name { $$ = $1; } + type_without_static { $$ = $1; } + | T_STATIC { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_STATIC); } ; union_type: @@ -675,6 +674,28 @@ union_type: | union_type '|' type { $$ = zend_ast_list_add($1, $3); } ; +/* Duplicate the type rules without "static", + * to avoid conflicts with "static" modifier for properties. */ + +type_expr_without_static: + type_without_static { $$ = $1; } + | '?' type_without_static { $$ = $2; $$->attr |= ZEND_TYPE_NULLABLE; } + | union_type_without_static { $$ = $1; } +; + +type_without_static: + T_ARRAY { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_ARRAY); } + | T_CALLABLE { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_CALLABLE); } + | name { $$ = $1; } +; + +union_type_without_static: + type_without_static '|' type_without_static + { $$ = zend_ast_create_list(2, ZEND_AST_TYPE_UNION, $1, $3); } + | union_type_without_static '|' type_without_static + { $$ = zend_ast_list_add($1, $3); } +; + return_type: %empty { $$ = NULL; } | ':' type_expr { $$ = $2; } @@ -728,7 +749,7 @@ class_statement_list: class_statement: - variable_modifiers optional_type property_list ';' + variable_modifiers optional_type_without_static property_list ';' { $$ = zend_ast_create(ZEND_AST_PROP_GROUP, $2, $3); $$->attr = $1; } | method_modifiers T_CONST class_const_list ';' diff --git a/Zend/zend_type_info.h b/Zend/zend_type_info.h index 752e6a4b850e9..bace8014bfc3f 100644 --- a/Zend/zend_type_info.h +++ b/Zend/zend_type_info.h @@ -40,6 +40,7 @@ #define MAY_BE_CALLABLE (1 << IS_CALLABLE) #define MAY_BE_ITERABLE (1 << IS_ITERABLE) #define MAY_BE_VOID (1 << IS_VOID) +#define MAY_BE_STATIC (1 << IS_STATIC) #define MAY_BE_ARRAY_SHIFT (IS_REFERENCE) diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 1b314afa24287..d8b2280e47f8b 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -533,6 +533,7 @@ struct _zend_ast_ref { #define IS_CALLABLE 12 #define IS_ITERABLE 13 #define IS_VOID 14 +#define IS_STATIC 15 /* internal types */ #define IS_INDIRECT 12 diff --git a/ext/opcache/Optimizer/dfa_pass.c b/ext/opcache/Optimizer/dfa_pass.c index 8802577154269..e27826b6327b2 100644 --- a/ext/opcache/Optimizer/dfa_pass.c +++ b/ext/opcache/Optimizer/dfa_pass.c @@ -307,7 +307,7 @@ static inline zend_bool can_elide_return_type_check( } /* These types are not represented exactly */ - if (ZEND_TYPE_FULL_MASK(info->type) & (MAY_BE_CALLABLE|MAY_BE_ITERABLE)) { + if (ZEND_TYPE_FULL_MASK(info->type) & (MAY_BE_CALLABLE|MAY_BE_ITERABLE|MAY_BE_STATIC)) { return 0; } diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 90273e2ffdc2d..4675cfe99b8f9 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2223,6 +2223,9 @@ static uint32_t zend_convert_type_declaration_mask(uint32_t type_mask) { if (type_mask & MAY_BE_ITERABLE) { result_mask |= MAY_BE_OBJECT|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF; } + if (type_mask & MAY_BE_STATIC) { + result_mask |= MAY_BE_OBJECT; + } if (type_mask & MAY_BE_ARRAY) { result_mask |= MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF; } diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index d0caabe5da19b..7fd91c7317d4b 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1190,6 +1190,9 @@ static zend_always_inline zend_bool zend_jit_verify_type_common(zval *arg, const if ((type_mask & MAY_BE_ITERABLE) && zend_is_iterable(arg)) { return 1; } + if ((type_mask & MAY_BE_STATIC) && zend_value_instanceof_static(arg)) { + return 1; + } if (zend_verify_scalar_type_hint(type_mask, arg, ZEND_ARG_USES_STRICT_TYPES(), /* is_internal */ 0)) { return 1; } diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 95c4859e94cec..8d2d53b0286d1 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2909,7 +2909,9 @@ ZEND_METHOD(reflection_named_type, isBuiltin) } GET_REFLECTION_OBJECT_PTR(param); - RETVAL_BOOL(ZEND_TYPE_IS_ONLY_MASK(param->type)); + /* Treat "static" as a class type for the purposes of reflection. */ + RETVAL_BOOL(ZEND_TYPE_IS_ONLY_MASK(param->type) + && !(ZEND_TYPE_FULL_MASK(param->type) & MAY_BE_STATIC)); } /* }}} */ diff --git a/ext/reflection/tests/static_type.phpt b/ext/reflection/tests/static_type.phpt new file mode 100644 index 0000000000000..b541008f795b6 --- /dev/null +++ b/ext/reflection/tests/static_type.phpt @@ -0,0 +1,22 @@ +--TEST-- +ReflectionType for static types +--FILE-- +getReturnType(); +var_dump($rt->isBuiltin()); +var_dump($rt->getName()); +var_dump((string) $rt); + +?> +--EXPECT-- +bool(false) +string(6) "static" +string(6) "static" From 72bd55902d1908857f47555ad69458861e1acd94 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 6 Feb 2020 11:13:13 +0100 Subject: [PATCH 032/201] Improve generated names for anonymous classes In order of preference, the generated name will be: new class extends ParentClass {}; // -> ParentClass@anonymous new class implements FirstInterface, SecondInterface {}; // -> FirstInterface@anonymous new class {}; // -> class@anonymous This is intended to display a more useful class name in error messages and stack traces, and thus make debugging easier. Closes GH-5153. --- UPGRADING | 13 +++++++- Zend/tests/anon_class_name.phpt | 30 ++++++++++++++++++ .../object_types/return_type_in_class.phpt | 4 +-- .../return_type_inheritance_in_class.phpt | 4 +-- .../return_type_inheritance_in_interface.phpt | 4 +-- Zend/tests/temporary_cleaning_013.phpt | 4 +-- .../typed_properties_065.phpt | 8 ++--- Zend/zend_compile.c | 21 +++++++++--- ext/opcache/tests/bug78937_1.phpt | 2 +- ext/opcache/tests/bug78937_2.phpt | 4 +-- ext/opcache/tests/bug78937_3.phpt | 2 +- ext/opcache/tests/bug78937_4.phpt | 2 +- ext/opcache/tests/bug78937_5.phpt | 2 +- ext/opcache/tests/bug78937_6.phpt | 2 +- .../ReflectionClass_isSubclassOf_error2.phpt | 4 +-- ext/standard/tests/class_object/bug78638.phpt | 2 +- .../get_object_vars_variation_004.phpt | Bin 741 -> 763 bytes 17 files changed, 80 insertions(+), 28 deletions(-) create mode 100644 Zend/tests/anon_class_name.phpt diff --git a/UPGRADING b/UPGRADING index 30611b1013219..5174a2e52f6f1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -130,6 +130,18 @@ PHP 8.0 UPGRADE NOTES exception. . Some "Only variables should be passed by reference" notices have been converted to "Cannot pass parameter by reference" exception. + . The generated name for anonymous classes has changed. It will now include + the name of the first parent or interface: + + new class extends ParentClass {}; + // -> ParentClass@anonymous + new class implements FirstInterface, SecondInterface {}; + // -> FirstInterface@anonymous + new class {}; + // -> class@anonymous + + The name shown above is still followed by a null byte and and a unique + suffix. - COM: . Removed the ability to import case-insensitive constants from type @@ -386,7 +398,6 @@ PHP 8.0 UPGRADE NOTES writing `Foo::BAR::$baz` is now allowed. RFC: https://wiki.php.net/rfc/variable_syntax_tweaks - - Date: . Added DateTime::createFromInterface() and DateTimeImmutable::createFromInterface(). diff --git a/Zend/tests/anon_class_name.phpt b/Zend/tests/anon_class_name.phpt new file mode 100644 index 0000000000000..36f613d707b1c --- /dev/null +++ b/Zend/tests/anon_class_name.phpt @@ -0,0 +1,30 @@ +--TEST-- +Generated names for anonymous classes +--FILE-- + +--EXPECT-- +class@anonymous +DeclaringNS\Test1@anonymous +DeclaringNS\Test1@anonymous +DeclaringNS\Test2@anonymous +DeclaringNS\Test2@anonymous diff --git a/Zend/tests/object_types/return_type_in_class.phpt b/Zend/tests/object_types/return_type_in_class.phpt index c4c1dc05160ee..3edb015df756c 100644 --- a/Zend/tests/object_types/return_type_in_class.phpt +++ b/Zend/tests/object_types/return_type_in_class.phpt @@ -18,8 +18,8 @@ $three = new class extends Two { }; $three->a(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of class@anonymous::a() must be an object, int returned in %s:13 +Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be an object, int returned in %s:%d Stack trace: -#0 %s(16): class@anonymous->a() +#0 %s(%d): Two@anonymous->a() #1 {main} thrown in %s on line 13 diff --git a/Zend/tests/object_types/return_type_inheritance_in_class.phpt b/Zend/tests/object_types/return_type_inheritance_in_class.phpt index a7316136fb778..23528531ec563 100644 --- a/Zend/tests/object_types/return_type_inheritance_in_class.phpt +++ b/Zend/tests/object_types/return_type_inheritance_in_class.phpt @@ -18,8 +18,8 @@ $three = new class extends Two { }; $three->a(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of class@anonymous::a() must be an object, int returned in %s:13 +Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be an object, int returned in %s:%d Stack trace: -#0 %s(16): class@anonymous->a() +#0 %s(%d): Two@anonymous->a() #1 {main} thrown in %s on line 13 diff --git a/Zend/tests/object_types/return_type_inheritance_in_interface.phpt b/Zend/tests/object_types/return_type_inheritance_in_interface.phpt index 4c8f6c08affbb..793cc980aa6ae 100644 --- a/Zend/tests/object_types/return_type_inheritance_in_interface.phpt +++ b/Zend/tests/object_types/return_type_inheritance_in_interface.phpt @@ -18,8 +18,8 @@ $three = new class implements Two { }; $three->a(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of class@anonymous::a() must be an object, int returned in %s:13 +Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be an object, int returned in %s:%d Stack trace: -#0 %s(16): class@anonymous->a() +#0 %s(%d): Two@anonymous->a() #1 {main} thrown in %s on line 13 diff --git a/Zend/tests/temporary_cleaning_013.phpt b/Zend/tests/temporary_cleaning_013.phpt index d9e7dd82f5c7c..401edb512b97e 100644 --- a/Zend/tests/temporary_cleaning_013.phpt +++ b/Zend/tests/temporary_cleaning_013.phpt @@ -288,10 +288,10 @@ caught Exception 12 caught Exception 13 caught Exception 14 -Notice: Indirect modification of overloaded element of class@anonymous has no effect in %s on line %d +Notice: Indirect modification of overloaded element of ArrayAccess@anonymous has no effect in %s on line %d caught Exception 15 -Notice: Indirect modification of overloaded element of class@anonymous has no effect in %s on line %d +Notice: Indirect modification of overloaded element of ArrayAccess@anonymous has no effect in %s on line %d caught Exception 16 caught Exception 17 caught Exception 18 diff --git a/Zend/tests/type_declarations/typed_properties_065.phpt b/Zend/tests/type_declarations/typed_properties_065.phpt index d81b51d049d64..7a1dd54894b34 100644 --- a/Zend/tests/type_declarations/typed_properties_065.phpt +++ b/Zend/tests/type_declarations/typed_properties_065.phpt @@ -61,11 +61,11 @@ offsetSet(1e50) int(1) int(0) int(-1) -Cannot decrement a reference held by property class@anonymous::$foo of type int past its minimal value +Cannot decrement a reference held by property ArrayAccess@anonymous::$foo of type int past its minimal value integer -Cannot decrement a reference held by property class@anonymous::$foo of type int past its minimal value +Cannot decrement a reference held by property ArrayAccess@anonymous::$foo of type int past its minimal value integer -Cannot increment a reference held by property class@anonymous::$foo of type int past its maximal value +Cannot increment a reference held by property ArrayAccess@anonymous::$foo of type int past its maximal value integer -Cannot increment a reference held by property class@anonymous::$foo of type int past its maximal value +Cannot increment a reference held by property ArrayAccess@anonymous::$foo of type int past its maximal value integer diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 58fb3377d2cfc..bc0a7dfdaeacf 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6569,14 +6569,25 @@ void zend_compile_implements(zend_ast *ast) /* {{{ */ } /* }}} */ -static zend_string *zend_generate_anon_class_name(uint32_t start_lineno) /* {{{ */ +static zend_string *zend_generate_anon_class_name(zend_ast_decl *decl) { zend_string *filename = CG(active_op_array)->filename; - zend_string *result = zend_strpprintf(0, "class@anonymous%c%s:%" PRIu32 "$%" PRIx32, - '\0', ZSTR_VAL(filename), start_lineno, CG(rtd_key_counter)++); + uint32_t start_lineno = decl->start_lineno; + + /* Use parent or first interface as prefix. */ + zend_string *prefix = ZSTR_KNOWN(ZEND_STR_CLASS); + if (decl->child[0]) { + prefix = zend_resolve_const_class_name_reference(decl->child[0], "class name"); + } else if (decl->child[1]) { + zend_ast_list *list = zend_ast_get_list(decl->child[1]); + prefix = zend_resolve_const_class_name_reference(list->child[0], "interface name"); + } + + zend_string *result = zend_strpprintf(0, "%s@anonymous%c%s:%" PRIu32 "$%" PRIx32, + ZSTR_VAL(prefix), '\0', ZSTR_VAL(filename), start_lineno, CG(rtd_key_counter)++); + zend_string_release(prefix); return zend_new_interned_string(result); } -/* }}} */ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ { @@ -6613,7 +6624,7 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ zend_register_seen_symbol(lcname, ZEND_SYMBOL_CLASS); } else { - name = zend_generate_anon_class_name(decl->start_lineno); + name = zend_generate_anon_class_name(decl); lcname = zend_string_tolower(name); } lcname = zend_new_interned_string(lcname); diff --git a/ext/opcache/tests/bug78937_1.phpt b/ext/opcache/tests/bug78937_1.phpt index bc285f107b98d..0572e521aa53d 100644 --- a/ext/opcache/tests/bug78937_1.phpt +++ b/ext/opcache/tests/bug78937_1.phpt @@ -19,7 +19,7 @@ var_dump(foo()); --EXPECTF-- Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78937.inc on line 6 -Warning: Can't preload unlinked class class@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 +Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 Fatal error: Anonymous class wasn't preloaded in %spreload_bug78937.inc on line 3 diff --git a/ext/opcache/tests/bug78937_2.phpt b/ext/opcache/tests/bug78937_2.phpt index a20c07d231e3f..90aaa4388341b 100644 --- a/ext/opcache/tests/bug78937_2.phpt +++ b/ext/opcache/tests/bug78937_2.phpt @@ -20,6 +20,6 @@ var_dump(foo()); --EXPECTF-- Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78937.inc on line 6 -Warning: Can't preload unlinked class class@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 -object(class@anonymous)#%d (0) { +Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 +object(Bar@anonymous)#%d (0) { } diff --git a/ext/opcache/tests/bug78937_3.phpt b/ext/opcache/tests/bug78937_3.phpt index 16f7b80a4035f..81821e3109a75 100644 --- a/ext/opcache/tests/bug78937_3.phpt +++ b/ext/opcache/tests/bug78937_3.phpt @@ -18,7 +18,7 @@ var_dump(foo()); --EXPECTF-- Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78937.inc on line 6 -Warning: Can't preload unlinked class class@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 +Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 Fatal error: Uncaught Error: Class 'Bar' not found in %spreload_bug78937.inc:3 Stack trace: diff --git a/ext/opcache/tests/bug78937_4.phpt b/ext/opcache/tests/bug78937_4.phpt index 2ad86870de85b..86c38a6d98f4e 100644 --- a/ext/opcache/tests/bug78937_4.phpt +++ b/ext/opcache/tests/bug78937_4.phpt @@ -20,6 +20,6 @@ var_dump(new Foo); --EXPECTF-- Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78937.inc on line 6 -Warning: Can't preload unlinked class class@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 +Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 Fatal error: Class foo wasn't preloaded in %spreload_bug78937.inc on line 6 diff --git a/ext/opcache/tests/bug78937_5.phpt b/ext/opcache/tests/bug78937_5.phpt index 3502699750e39..bb83408d90e36 100644 --- a/ext/opcache/tests/bug78937_5.phpt +++ b/ext/opcache/tests/bug78937_5.phpt @@ -21,6 +21,6 @@ var_dump(new Foo); --EXPECTF-- Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78937.inc on line 6 -Warning: Can't preload unlinked class class@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 +Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 object(Foo)#%d (0) { } diff --git a/ext/opcache/tests/bug78937_6.phpt b/ext/opcache/tests/bug78937_6.phpt index ec1cc2d2772a5..6e4d7060b3c76 100644 --- a/ext/opcache/tests/bug78937_6.phpt +++ b/ext/opcache/tests/bug78937_6.phpt @@ -19,7 +19,7 @@ var_dump(new Foo); --EXPECTF-- Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78937.inc on line 6 -Warning: Can't preload unlinked class class@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 +Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 Fatal error: Uncaught Error: Class 'Bar' not found in %spreload_bug78937.inc:6 Stack trace: diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_error2.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_error2.phpt index 8671c2500bd54..df7fb4207333c 100644 --- a/ext/reflection/tests/ReflectionClass_isSubclassOf_error2.phpt +++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_error2.phpt @@ -11,7 +11,7 @@ class Base {} $check = function () { $base = Base::class; foreach (get_declared_classes() as $class) { - if (strpos($class, 'class@anonymous') === false) { + if (strpos($class, '@anonymous') === false) { continue; } echo "Checking for $class\n"; @@ -30,6 +30,6 @@ echo "Done\n"; ?> --EXPECTF-- After first check -Checking for class@%s +Checking for Base@%s true Done diff --git a/ext/standard/tests/class_object/bug78638.phpt b/ext/standard/tests/class_object/bug78638.phpt index 088e7c4c1f083..76315ee1c568a 100644 --- a/ext/standard/tests/class_object/bug78638.phpt +++ b/ext/standard/tests/class_object/bug78638.phpt @@ -6,4 +6,4 @@ $c = new class('bar') extends __PHP_Incomplete_Class { }; ?> --EXPECTF-- -Fatal error: Class class@anonymous may not inherit from final class (__PHP_Incomplete_Class) in %sbug78638.php on line %d +Fatal error: Class __PHP_Incomplete_Class@anonymous may not inherit from final class (__PHP_Incomplete_Class) in %s on line %d diff --git a/ext/standard/tests/class_object/get_object_vars_variation_004.phpt b/ext/standard/tests/class_object/get_object_vars_variation_004.phpt index f52b3fed78e657ff79f51cccf9511fca5e21b002..902149ea0ac4cf780798c9ae4ca6d1063ca31d89 100644 GIT binary patch delta 49 mcmaFL`kQrw8DN&f>Hq0xe_`6 delta 31 ecmey(`jmBp8xw1CPGWKK Date: Wed, 29 Jan 2020 20:06:13 +0100 Subject: [PATCH 033/201] Make type error messages more consistent Closes GH-5092 --- Zend/tests/008.phpt | 2 +- Zend/tests/009.phpt | 4 +- Zend/tests/arrow_functions/006.phpt | 4 +- Zend/tests/bug31720.phpt | 2 +- Zend/tests/bug39003.phpt | 2 +- Zend/tests/bug42802.phpt | 2 +- Zend/tests/bug43332_1.phpt | 2 +- Zend/tests/bug45186.phpt | 2 +- Zend/tests/bug45186_2.phpt | 4 +- Zend/tests/bug48770_2.phpt | 8 +- Zend/tests/bug48770_3.phpt | 4 +- Zend/tests/bug61273.phpt | 2 +- Zend/tests/bug68446.phpt | 2 +- Zend/tests/bug70895.phpt | 6 +- Zend/tests/bug70898.phpt | 2 +- Zend/tests/bug72101.phpt | 2 +- Zend/tests/bug72598.phpt | 4 +- Zend/tests/bug72598_2.phpt | 4 +- Zend/tests/bug73954.phpt | 2 +- Zend/tests/bug74164.phpt | 2 +- Zend/tests/call_user_func_001.phpt | 4 +- Zend/tests/call_user_func_002.phpt | 8 +- Zend/tests/call_user_func_006.phpt | 4 +- Zend/tests/call_user_func_007.phpt | 2 +- Zend/tests/call_user_func_008.phpt | 16 +- Zend/tests/call_user_func_009.phpt | 4 +- .../call_user_func_array_invalid_type.phpt | 2 +- Zend/tests/closure_027.phpt | 4 +- Zend/tests/closure_059.phpt | 6 +- Zend/tests/errmsg_013.phpt | 2 +- Zend/tests/exception_017.phpt | 2 +- Zend/tests/exception_handler_004.phpt | 4 +- ...ument_count_incorrect_userland_strict.phpt | 4 +- .../variadic_argument_type_error.phpt | 22 +++ .../generators/generator_with_type_check.phpt | 2 +- .../generator_with_type_check_2.phpt | 4 +- .../generators/throw_not_an_exception.phpt | 2 +- ...methods-on-non-objects-call-user-func.phpt | 2 +- Zend/tests/ns_071.phpt | 2 +- Zend/tests/ns_072.phpt | 2 +- .../object_types/return_type_in_class.phpt | 2 +- .../object_types/return_type_in_function.phpt | 2 +- .../return_type_inheritance_in_class.phpt | 2 +- .../return_type_inheritance_in_interface.phpt | 2 +- .../type_hint_in_class_method.phpt | 2 +- .../object_types/type_hint_in_function.phpt | 2 +- Zend/tests/objects_022.phpt | 2 +- Zend/tests/return_types/001.phpt | 2 +- Zend/tests/return_types/002.phpt | 2 +- Zend/tests/return_types/003.phpt | 2 +- Zend/tests/return_types/004.phpt | 2 +- Zend/tests/return_types/005.phpt | 2 +- Zend/tests/return_types/010.phpt | 2 +- Zend/tests/return_types/013.phpt | 2 +- Zend/tests/return_types/028.phpt | 2 +- Zend/tests/return_types/029.phpt | 2 +- Zend/tests/return_types/030.phpt | 2 +- Zend/tests/return_types/bug70557.phpt | 2 +- Zend/tests/return_types/bug71092.phpt | 2 +- .../return_types/internal_functions001.phpt | 2 +- Zend/tests/return_types/rfc001.phpt | 2 +- Zend/tests/return_types/rfc003.phpt | 2 +- Zend/tests/trait_type_errors.phpt | 6 +- Zend/tests/type_declarations/array_001.phpt | 2 +- .../tests/type_declarations/callable_001.phpt | 2 +- .../explicit_weak_include_strict.phpt | 2 +- ...inexistent_class_hint_with_scalar_arg.phpt | 2 +- .../internal_function_strict_mode.phpt | 6 +- .../tests/type_declarations/iterable_001.phpt | 2 +- .../tests/type_declarations/iterable_003.phpt | 2 +- .../tests/type_declarations/scalar_basic.phpt | 48 ++--- .../scalar_constant_defaults.phpt | 4 +- .../scalar_constant_defaults_error.phpt | 2 +- Zend/tests/type_declarations/scalar_null.phpt | 8 +- .../scalar_return_basic.phpt | 48 ++--- .../scalar_return_basic_64bit.phpt | 48 ++--- .../type_declarations/scalar_strict.phpt | 102 +++++------ .../scalar_strict_64bit.phpt | 102 +++++------ .../scalar_strict_basic.phpt | 60 +++---- .../type_declarations/static_type_return.phpt | 6 +- .../type_declarations/static_type_trait.phpt | 2 +- .../type_declarations/strict_call_weak.phpt | 2 +- .../strict_call_weak_explicit.phpt | 2 +- .../typed_properties_078.phpt | 2 +- .../union_types/legal_default_values.phpt | 2 +- .../union_types/multiple_classes.phpt | 2 +- .../union_types/type_checking_strict.phpt | 170 +++++++++--------- .../union_types/type_checking_weak.phpt | 72 ++++---- .../weak_include_strict.phpt | 2 +- Zend/tests/typehints/or_null.phpt | 48 ++--- Zend/tests/variadic/typehint_error.phpt | 2 +- .../variadic/typehint_suppressed_error.phpt | 2 +- Zend/zend_API.c | 88 ++++----- Zend/zend_API.h | 27 +-- Zend/zend_builtin_functions.c | 6 +- Zend/zend_execute.c | 142 ++++----------- Zend/zend_execute.h | 2 + Zend/zend_execute_API.c | 42 ++++- Zend/zend_vm_def.h | 8 +- Zend/zend_vm_execute.h | 22 +-- ext/curl/tests/curl_setopt_error.phpt | 2 +- ext/date/tests/014.phpt | 2 +- ext/date/tests/68062.phpt | 2 +- .../DateTimeImmutable_createFromMutable.phpt | 2 +- .../tests/DateTime_createFromImmutable.phpt | 2 +- ext/date/tests/bug36988.phpt | 2 +- ext/date/tests/bug52062.phpt | 2 +- ext/date/tests/bug70245.phpt | 4 +- ext/date/tests/microtime_error.phpt | 4 +- ext/date/tests/timezone_offset_get_error.phpt | 13 +- ext/ffi/tests/045.phpt | 2 +- ext/fileinfo/tests/finfo_open_001.phpt | 2 +- ext/fileinfo/tests/finfo_open_error.phpt | 4 +- ext/gd/tests/imagegd2_nullbyte_injection.phpt | 2 +- ext/gd/tests/imagegd_nullbyte_injection.phpt | 2 +- ext/gd/tests/imagexbm_nullbyte_injection.phpt | 2 +- ext/gmp/tests/gmp_clrbit.phpt | 2 +- ext/gmp/tests/gmp_pow.phpt | 2 +- ext/gmp/tests/gmp_setbit.phpt | 4 +- ext/imap/tests/imap_expunge_error.phpt | 4 +- ext/imap/tests/imap_gc_error.phpt | 4 +- ext/imap/tests/imap_headers.phpt | 4 +- ext/imap/tests/imap_num_msg_error.phpt | 4 +- ext/imap/tests/imap_num_recent_error.phpt | 4 +- ext/imap/tests/imap_ping_error.phpt | 4 +- ext/imap/tests/imap_timeout_basic.phpt | 2 +- .../tests/breakiter___construct_error.phpt | 2 +- ext/intl/tests/bug48227.phpt | 4 +- ext/intl/tests/calendar_add_error.phpt | 2 +- .../tests/calendar_before_after_error.phpt | 4 +- ext/intl/tests/calendar_clear_error.phpt | 2 +- ext/intl/tests/calendar_equals_error.phpt | 6 +- .../tests/calendar_fieldDifference_error.phpt | 2 +- .../calendar_getDayOfWeekType_error.phpt | 2 +- .../tests/calendar_getErrorCode_error.phpt | 2 +- .../tests/calendar_getErrorMessage_error.phpt | 2 +- .../calendar_getFirstDayOfWeek_error.phpt | 2 +- ...endar_getMinimalDaysInFirstWeek_error.phpt | 2 +- ...tSkipped_RepeatedWallTimeOption_error.phpt | 2 +- .../tests/calendar_getTimeZone_error.phpt | 2 +- ext/intl/tests/calendar_getTime_error.phpt | 2 +- ext/intl/tests/calendar_getType_error.phpt | 2 +- .../calendar_getWeekendTransition_error.phpt | 2 +- ..._Least_Greatest_Minimum_Maximum_error.phpt | 8 +- ...r_get_getActualMaximum_Minumum_error2.phpt | 6 +- .../tests/calendar_inDaylightTime_error.phpt | 2 +- .../tests/calendar_isEquivalentTo_error.phpt | 8 +- ext/intl/tests/calendar_isLenient_error.phpt | 2 +- ext/intl/tests/calendar_isSet_error.phpt | 2 +- ext/intl/tests/calendar_isWeekend_error.phpt | 2 +- ext/intl/tests/calendar_roll_error.phpt | 2 +- .../calendar_setFirstDayOfWeek_error.phpt | 2 +- ext/intl/tests/calendar_setLenient_error.phpt | 2 +- ...endar_setMinimalDaysInFirstWeek_error.phpt | 2 +- ...tSkipped_RepeatedWallTimeOption_error.phpt | 2 +- .../tests/calendar_setTimeZone_error.phpt | 2 +- ext/intl/tests/calendar_set_error.phpt | 2 +- ext/intl/tests/calendar_toDateTime_error.phpt | 2 +- ext/intl/tests/formatter_fail.phpt | 6 +- .../gregoriancalendar___construct_error.phpt | 2 +- ...riancalendar_getGregorianChange_error.phpt | 2 +- .../gregoriancalendar_isLeapYear_error.phpt | 2 +- ext/intl/tests/msgfmt_fail2.phpt | 6 +- .../tests/timezone_getDSTSavings_error.phpt | 2 +- .../tests/timezone_getDisplayName_error.phpt | 2 +- .../tests/timezone_getErrorCode_error.phpt | 2 +- .../tests/timezone_getErrorMessage_error.phpt | 2 +- ext/intl/tests/timezone_getID_error.phpt | 2 +- ext/intl/tests/timezone_getOffset_error.phpt | 2 +- .../tests/timezone_getRawOffset_error.phpt | 2 +- .../tests/timezone_hasSameRules_error.phpt | 4 +- .../tests/timezone_toDateTimeZone_error.phpt | 2 +- .../tests/timezone_useDaylightTime_error.phpt | 2 +- .../transliterator_create_inverse_error.phpt | 2 +- .../transliterator_get_error_code_error.phpt | 2 +- ...ransliterator_get_error_message_error.phpt | 2 +- ext/libxml/tests/004.phpt | 12 +- ext/libxml/tests/bug63389.phpt | 2 +- ext/mbstring/tests/mb_ereg1.phpt | 4 +- .../tests/mysqli_class_mysqli_warning.phpt | 2 +- ext/mysqli/tests/mysqli_embedded_connect.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_object.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 4 +- ext/oci8/tests/bug51291_1.phpt | 4 +- ext/oci8/tests/conn_attr_4.phpt | 22 +-- ext/oci8/tests/lob_002.phpt | 4 +- ext/oci8/tests/lob_021.phpt | 2 +- ext/oci8/tests/lob_026.phpt | 2 +- ext/oci8/tests/null_byte_1.phpt | 4 +- ext/oci8/tests/privileged_connect.phpt | 2 +- ext/oci8/tests/privileged_connect1.phpt | 2 +- ext/odbc/tests/odbc_exec_001.phpt | 4 +- .../tests/iterable_type_optimization.phpt | 2 +- ext/opcache/tests/ssa_bug_003.phpt | 4 +- .../tests/openssl_csr_export_bacis.phpt | 2 +- .../openssl_csr_export_to_file_basic.phpt | 2 +- ext/openssl/tests/openssl_pkey_new_error.phpt | 6 +- ext/pcre/tests/preg_grep_error1.phpt | 4 +- ext/pcre/tests/preg_match_all_error1.phpt | 4 +- ext/pcre/tests/preg_match_all_error2.phpt | 4 +- ext/pcre/tests/preg_match_error1.phpt | 4 +- ext/pcre/tests/preg_match_error2.phpt | 6 +- ext/pcre/tests/preg_split_error1.phpt | 4 +- .../tests/pdo_oci_stmt_getcolumnmeta.phpt | 2 +- ext/phar/tests/badparameters.phpt | 36 ++-- ext/phar/tests/bug64931/bug64931.phpt | 4 +- ext/phar/tests/create_path_error.phpt | 2 +- ext/phar/tests/fgc_edgecases.phpt | 2 +- ext/phar/tests/fopen_edgecases2.phpt | 2 +- ext/phar/tests/opendir_edgecases.phpt | 2 +- ext/phar/tests/phar_extract.phpt | 2 +- ext/phar/tests/phar_oo_006.phpt | 2 +- ext/phar/tests/phar_unlinkarchive.phpt | 2 +- ext/phar/tests/pharfileinfo_construct.phpt | 2 +- .../tests/ReflectionClass_getMethod_002.phpt | 4 +- .../ReflectionClass_getProperty_002.phpt | 4 +- ...ctionClass_getStaticPropertyValue_002.phpt | 2 +- .../ReflectionClass_newInstanceArgs_002.phpt | 2 +- ...ctionClass_setStaticPropertyValue_002.phpt | 2 +- ...ReflectionExtension_constructor_error.phpt | 2 +- .../ReflectionFunction_construct.001.phpt | 4 +- .../ReflectionMethod_invokeArgs_error2.phpt | 2 +- .../tests/ReflectionMethod_invoke_basic.phpt | 2 +- .../tests/ReflectionMethod_invoke_error1.phpt | 4 +- .../tests/ReflectionReference_errors.phpt | 2 +- ext/reflection/tests/bug42976.phpt | 4 +- ext/reflection/tests/request38992.phpt | 4 +- .../session_set_save_handler_iface_002.phpt | 4 +- ext/simplexml/tests/bug37565.phpt | 4 +- ext/snmp/tests/snmp-object-error.phpt | 4 +- ext/soap/tests/bug77088.phpt | 2 +- ext/sodium/tests/sodium_error_001.phpt | 2 +- .../tests/CallbackFilterIteratorTest-002.phpt | 4 +- .../tests/SplFileInfo_setFileClass_error.phpt | 2 +- .../tests/SplFileInfo_setInfoClass_error.phpt | 2 +- .../SplFixedArray__construct_param_array.phpt | 2 +- ...SplFixedArray__construct_param_string.phpt | 2 +- ...edArray_construct_param_SplFixedArray.phpt | 2 +- .../SplTempFileObject_constructor_error.phpt | 2 +- .../tests/arrayObject___construct_error1.phpt | 4 +- ext/spl/tests/arrayObject_asort_basic1.phpt | 2 +- ext/spl/tests/arrayObject_ksort_basic1.phpt | 2 +- .../arrayObject_setIteratorClass_error1.phpt | 10 +- ext/spl/tests/bug54291.phpt | 2 +- ext/spl/tests/bug54292.phpt | 2 +- ext/spl/tests/bug77431.phpt | 4 +- ext/spl/tests/bug78863.phpt | 2 +- ext/spl/tests/fixedarray_005.phpt | 6 +- ext/spl/tests/fixedarray_009.phpt | 2 +- ext/spl/tests/fixedarray_015.phpt | 2 +- ext/spl/tests/iterator_042.phpt | 2 +- ext/spl/tests/iterator_044.phpt | 8 +- ext/spl/tests/iterator_count.phpt | 2 +- ext/spl/tests/iterator_to_array.phpt | 2 +- .../tests/recursive_tree_iterator_003.phpt | 2 +- ext/spl/tests/spl_004.phpt | 4 +- ext/standard/filestat.c | 4 +- ext/standard/string.c | 4 +- .../array_change_key_case_variation.phpt | 4 +- .../tests/array/array_diff_uassoc_error.phpt | 4 +- .../array/array_diff_ukey_variation10.phpt | 4 +- .../tests/array/array_filter_variation9.phpt | 6 +- .../array_intersect_ukey_variation8.phpt | 4 +- .../tests/array/array_key_exists.phpt | 4 +- .../tests/array/array_map_object1.phpt | 12 +- .../tests/array/array_map_object2.phpt | 6 +- .../tests/array/array_map_object3.phpt | 6 +- .../tests/array/array_map_variation12.phpt | 4 +- .../tests/array/array_map_variation14.phpt | 6 +- .../tests/array/array_map_variation15.phpt | 2 +- .../tests/array/array_map_variation16.phpt | 18 +- .../tests/array/array_map_variation17.phpt | 40 ++--- .../tests/array/array_search_variation3.phpt | 6 +- .../tests/array/array_slice_variation1.phpt | 6 +- .../tests/array/array_walk_objects.phpt | 2 +- .../tests/array/array_walk_rec_objects.phpt | 2 +- .../array_walk_recursive_variation8.phpt | 4 +- .../tests/array/array_walk_variation8.phpt | 4 +- ext/standard/tests/array/bug40191.phpt | 2 +- .../tests/array/in_array_variation3.phpt | 6 +- ext/standard/tests/array/range_errors.phpt | 8 +- ext/standard/tests/array/range_variation.phpt | 2 +- .../class_object/get_class_variation_001.phpt | 52 +++--- ext/standard/tests/file/006_variation2.phpt | 18 +- ext/standard/tests/file/bug39863.phpt | 2 +- ext/standard/tests/file/chgrp.phpt | 4 +- .../tests/file/disk_free_space_variation.phpt | 16 +- .../file/disk_total_space_variation.phpt | 8 +- .../file_get_contents_variation8-win32.phpt | 4 +- .../file/file_get_contents_variation8.phpt | 4 +- .../file_put_contents_variation8-win32.phpt | 4 +- .../file/file_put_contents_variation8.phpt | 6 +- .../tests/file/filegroup_variation3.phpt | 4 +- .../tests/file/fileinode_variation3.phpt | 4 +- .../tests/file/fileowner_variation3.phpt | 4 +- .../tests/file/fileperms_variation3.phpt | 4 +- ext/standard/tests/file/flock_error.phpt | 10 +- .../tests/file/fnmatch_variation.phpt | 66 +++---- .../tests/file/fopen_variation10-win32.phpt | 10 +- .../tests/file/fopen_variation11-win32.phpt | 10 +- .../tests/file/glob_variation-win32-mb.phpt | 4 +- .../tests/file/glob_variation-win32.phpt | 4 +- ext/standard/tests/file/glob_variation.phpt | 4 +- .../tests/file/is_dir_variation4.phpt | 6 +- .../tests/file/is_executable_variation1.phpt | 6 +- .../tests/file/is_file_variation4.phpt | 6 +- .../tests/file/is_readable_variation1.phpt | 6 +- .../tests/file/is_writable_variation1.phpt | 12 +- .../tests/file/mkdir_rmdir_variation2.phpt | 4 +- .../file/readfile_variation10-win32.phpt | 4 +- .../tests/file/readfile_variation10.phpt | Bin 1727 -> 1739 bytes .../tests/file/stream_rfc2397_006.phpt | 4 +- .../tests/file/tempnam_variation3-win32.phpt | 4 +- .../tests/file/tempnam_variation3.phpt | 4 +- .../tests/file/tempnam_variation7-win32.phpt | 4 +- .../tests/file/tempnam_variation7.phpt | 4 +- .../tests/file/windows_links/bug78862.phpt | 2 +- .../tests/general_functions/bug41970.phpt | 8 +- .../call_user_func_array_variation_001.phpt | 2 +- .../general_functions/callbacks_001.phpt | 2 +- .../general_functions/callbacks_002.phpt | 6 +- ext/standard/tests/math/abs_variation.phpt | 16 +- .../tests/math/bindec_variation1.phpt | 4 +- .../tests/math/bindec_variation1_64bit.phpt | 4 +- ext/standard/tests/math/ceil_variation1.phpt | 16 +- ext/standard/tests/math/floor_variation1.phpt | 16 +- .../tests/math/hexdec_variation1.phpt | 4 +- .../tests/math/hexdec_variation1_64bit.phpt | 4 +- .../tests/math/octdec_variation1.phpt | 4 +- ext/standard/tests/math/round_variation1.phpt | 16 +- .../tests/password/password_hash_error.phpt | 6 +- .../password/password_needs_rehash_error.phpt | 6 +- .../tests/strings/addcslashes_001.phpt | Bin 1627 -> 1646 bytes ext/standard/tests/strings/bug54322.phpt | 2 +- .../tests/strings/chunk_split_variation5.phpt | Bin 2206 -> 2226 bytes .../tests/strings/chunk_split_variation8.phpt | 2 +- ext/standard/tests/strings/implode1.phpt | Bin 6073 -> 6313 bytes ext/standard/tests/strings/join_error.phpt | 2 +- .../tests/strings/join_variation1.phpt | 14 +- .../tests/strings/join_variation2.phpt | 46 ++--- .../tests/strings/join_variation4.phpt | Bin 2258 -> 2290 bytes .../tests/strings/join_variation5.phpt | 2 +- .../tests/strings/printf_variation1.phpt | 38 ++-- .../tests/strings/sprintf_variation1.phpt | 38 ++-- .../tests/strings/str_pad_variation1.phpt | 3 +- .../tests/strings/str_replace_basic.phpt | 2 +- .../tests/strings/str_replace_variation3.phpt | 4 +- .../tests/strings/stripos_variation10.phpt | 12 +- .../tests/strings/stripos_variation11.phpt | 26 +-- .../tests/strings/stristr_variation2.phpt | 8 +- ext/standard/tests/strings/strpos.phpt | Bin 7996 -> 8050 bytes .../tests/strings/strrchr_variation10.phpt | 12 +- .../tests/strings/strrchr_variation11.phpt | 12 +- .../tests/strings/strripos_offset.phpt | 2 +- .../tests/strings/strrpos_offset.phpt | 2 +- .../tests/strings/strrpos_variation10.phpt | 12 +- .../tests/strings/strrpos_variation11.phpt | 26 +-- .../tests/strings/strtr_variation6.phpt | 4 +- .../tests/strings/strtr_variation8.phpt | 4 +- .../tests/strings/vfprintf_error3.phpt | 2 +- .../tests/strings/vfprintf_error4.phpt | 4 +- .../tests/strings/vfprintf_variation20.phpt | 14 +- .../tests/strings/vprintf_variation1.phpt | 14 +- .../tests/strings/vsprintf_variation1.phpt | 14 +- tests/classes/abstract_user_call.phpt | 2 +- tests/classes/autoload_009.phpt | 2 +- tests/classes/autoload_012.phpt | 2 +- tests/classes/bug27504.phpt | 2 +- tests/classes/tostring_004.phpt | 2 +- tests/classes/type_hinting_001.phpt | 2 +- tests/classes/type_hinting_002.phpt | 2 +- tests/classes/type_hinting_003.phpt | 2 +- tests/classes/type_hinting_004.phpt | 12 +- tests/lang/bug24658.phpt | 2 +- tests/lang/catchable_error_001.phpt | 2 +- tests/lang/catchable_error_002.phpt | 2 +- tests/lang/type_hints_001.phpt | 2 +- .../sapi_windows_vt100_support_winko_err.phpt | 50 +++--- ...pi_windows_vt100_support_winko_in-err.phpt | 50 +++--- ...indows_vt100_support_winko_in-out-err.phpt | 50 +++--- ...pi_windows_vt100_support_winko_in-out.phpt | 50 +++--- ...i_windows_vt100_support_winko_out-err.phpt | 50 +++--- .../sapi_windows_vt100_support_winko_out.phpt | 50 +++--- .../sapi_windows_vt100_support_winok_err.phpt | 50 +++--- ...pi_windows_vt100_support_winok_in-err.phpt | 50 +++--- ...indows_vt100_support_winok_in-out-err.phpt | 50 +++--- ...pi_windows_vt100_support_winok_in-out.phpt | 50 +++--- ...i_windows_vt100_support_winok_out-err.phpt | 50 +++--- .../sapi_windows_vt100_support_winok_out.phpt | 50 +++--- 389 files changed, 1678 insertions(+), 1691 deletions(-) create mode 100644 Zend/tests/function_arguments/variadic_argument_type_error.phpt diff --git a/Zend/tests/008.phpt b/Zend/tests/008.phpt index 6f885c0dc58d5..f597812fa8094 100644 --- a/Zend/tests/008.phpt +++ b/Zend/tests/008.phpt @@ -25,7 +25,7 @@ var_dump(constant("test const")); echo "Done\n"; ?> --EXPECTF-- -TypeError: define() expects parameter 1 to be string, array given +TypeError: define() expects argument #1 ($constant_name) to be of type string, array given Notice: Constant TRUE already defined in %s on line %d bool(false) diff --git a/Zend/tests/009.phpt b/Zend/tests/009.phpt index d6ac1be4e2cca..222fd36297016 100644 --- a/Zend/tests/009.phpt +++ b/Zend/tests/009.phpt @@ -46,8 +46,8 @@ string(3) "foo" Warning: get_class() called without object from outside a class in %s on line %d bool(false) -get_class() expects parameter 1 to be object, string given +get_class() expects argument #1 ($object) to be of type object, string given string(3) "foo" string(4) "foo2" -get_class() expects parameter 1 to be object, null given +get_class() expects argument #1 ($object) to be of type object, null given Done diff --git a/Zend/tests/arrow_functions/006.phpt b/Zend/tests/arrow_functions/006.phpt index 16427146a80b1..e0ca1e1b5c169 100644 --- a/Zend/tests/arrow_functions/006.phpt +++ b/Zend/tests/arrow_functions/006.phpt @@ -32,7 +32,7 @@ try { --EXPECTF-- int(2) int(10) -Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +{closure}() expects argument #1 ($x) to be of type int, string given, called in %s on line %d array(3) { [0]=> int(20) @@ -41,4 +41,4 @@ array(3) { [2]=> int(30) } -Argument 2 passed to {closure}() must be of the type int or null, string given, called in %s on line %d +{closure}() expects argument #2 ($args) to be of type ?int, string given, called in %s on line %d diff --git a/Zend/tests/bug31720.phpt b/Zend/tests/bug31720.phpt index 1e01d41772965..ea4ba7753cf65 100644 --- a/Zend/tests/bug31720.phpt +++ b/Zend/tests/bug31720.phpt @@ -12,4 +12,4 @@ try { ?> --EXPECTF-- Warning: Undefined variable: nonesuchvar in %s on line %d -array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object +array_walk() expects argument #2 ($funcname) to be a valid callback, first array member is not a valid class name or object diff --git a/Zend/tests/bug39003.phpt b/Zend/tests/bug39003.phpt index 9fa3e0d26bbde..758e3f9c838b2 100644 --- a/Zend/tests/bug39003.phpt +++ b/Zend/tests/bug39003.phpt @@ -20,7 +20,7 @@ test($obj); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: test() expects argument #1 ($object) to be of type OtherClassName, ClassName given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): test(Object(ClassName)) #1 {main} diff --git a/Zend/tests/bug42802.phpt b/Zend/tests/bug42802.phpt index 1294bdbb2fde9..084b7c0e9d4ad 100644 --- a/Zend/tests/bug42802.phpt +++ b/Zend/tests/bug42802.phpt @@ -37,7 +37,7 @@ ok ok ok -Fatal error: Uncaught TypeError: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d +Fatal error: Uncaught TypeError: foo\test5() expects argument #1 ($bar) to be of type bar, foo\bar given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo\test5(Object(foo\bar)) #1 {main} diff --git a/Zend/tests/bug43332_1.phpt b/Zend/tests/bug43332_1.phpt index fc035ab2b6b6e..e7f52eae9c3e1 100644 --- a/Zend/tests/bug43332_1.phpt +++ b/Zend/tests/bug43332_1.phpt @@ -12,7 +12,7 @@ $foo = new foo; $foo->bar($foo); // Ok! $foo->bar(new \stdclass); // Error, ok! --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5 +Fatal error: Uncaught TypeError: foobar\foo::bar() expects argument #1 ($a) to be of type foobar\foo, stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5 Stack trace: #0 %s(%d): foobar\foo->bar(Object(stdClass)) #1 {main} diff --git a/Zend/tests/bug45186.phpt b/Zend/tests/bug45186.phpt index 11968091e373a..d60cab50887df 100644 --- a/Zend/tests/bug45186.phpt +++ b/Zend/tests/bug45186.phpt @@ -54,4 +54,4 @@ string(1) "y" ok __callstatic: string(3) "www" -call_user_func() expects parameter 1 to be a valid callback, cannot access self:: when no class scope is active +call_user_func() expects argument #1 ($function) to be a valid callback, cannot access self:: when no class scope is active diff --git a/Zend/tests/bug45186_2.phpt b/Zend/tests/bug45186_2.phpt index 5e962dd29a88c..262b379180222 100644 --- a/Zend/tests/bug45186_2.phpt +++ b/Zend/tests/bug45186_2.phpt @@ -52,5 +52,5 @@ string(1) "y" __call: string(1) "y" ok -call_user_func() expects parameter 1 to be a valid callback, class 'bar' does not have a method 'www' -call_user_func() expects parameter 1 to be a valid callback, cannot access self:: when no class scope is active +call_user_func() expects argument #1 ($function) to be a valid callback, class 'bar' does not have a method 'www' +call_user_func() expects argument #1 ($function) to be a valid callback, cannot access self:: when no class scope is active diff --git a/Zend/tests/bug48770_2.phpt b/Zend/tests/bug48770_2.phpt index d94ae1b217462..c5c17acb835ff 100644 --- a/Zend/tests/bug48770_2.phpt +++ b/Zend/tests/bug48770_2.phpt @@ -24,13 +24,13 @@ class B extends A { public function func($str) { call_user_func_array(array($this, 'parent::func2'), array($str)); call_user_func_array(array($this, 'parent::func3'), array($str)); - + try { call_user_func_array(array($this, 'parent::func22'), array($str)); } catch (\TypeError $e) { echo $e->getMessage() . \PHP_EOL; } - + try { call_user_func_array(array($this, 'parent::inexistent'), array($str)); } catch (\TypeError $e) { @@ -58,5 +58,5 @@ $c->func('This should work!'); --EXPECT-- string(27) "A::func2: This should work!" string(27) "A::func3: This should work!" -call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method A::func22() -call_user_func_array() expects parameter 1 to be a valid callback, class 'A' does not have a method 'inexistent' +call_user_func_array() expects argument #1 ($function) to be a valid callback, cannot access private method A::func22() +call_user_func_array() expects argument #1 ($function) to be a valid callback, class 'A' does not have a method 'inexistent' diff --git a/Zend/tests/bug48770_3.phpt b/Zend/tests/bug48770_3.phpt index cbd74df25a268..07cc8025df859 100644 --- a/Zend/tests/bug48770_3.phpt +++ b/Zend/tests/bug48770_3.phpt @@ -24,7 +24,7 @@ class B extends A { public function func($str) { call_user_func_array(array($this, 'self::func2'), array($str)); call_user_func_array(array($this, 'self::func3'), array($str)); - + try { call_user_func_array(array($this, 'self::inexistent'), array($str)); } catch (\TypeError $e) { @@ -52,4 +52,4 @@ $c->func('This should work!'); --EXPECT-- string(27) "B::func2: This should work!" string(27) "B::func3: This should work!" -call_user_func_array() expects parameter 1 to be a valid callback, class 'B' does not have a method 'inexistent' +call_user_func_array() expects argument #1 ($function) to be a valid callback, class 'B' does not have a method 'inexistent' diff --git a/Zend/tests/bug61273.phpt b/Zend/tests/bug61273.phpt index aee35c6f4f5ee..e9d67f9d2a26e 100644 --- a/Zend/tests/bug61273.phpt +++ b/Zend/tests/bug61273.phpt @@ -11,5 +11,5 @@ $args = array_fill(0, 64 * 1024 - 64, 0); call_user_func_array(function(&$a) {}, $args); echo strval("okey"); --EXPECTF-- -Warning: Parameter 1 to {closure}() expected to be a reference, value given in %sbug61273.php on line %d +Warning: {closure}() expects argument #1 ($a) to be passed by reference, value given in %s on line %d okey diff --git a/Zend/tests/bug68446.phpt b/Zend/tests/bug68446.phpt index 1f682af9aa4e9..c9d833a37f6a1 100644 --- a/Zend/tests/bug68446.phpt +++ b/Zend/tests/bug68446.phpt @@ -32,7 +32,7 @@ array(1) { int(1) } -Fatal error: Uncaught TypeError: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: a() expects argument #1 ($a) to be of type array, null given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): a(NULL) #1 {main} diff --git a/Zend/tests/bug70895.phpt b/Zend/tests/bug70895.phpt index 71ff19a0b54fb..0d4dc47004324 100644 --- a/Zend/tests/bug70895.phpt +++ b/Zend/tests/bug70895.phpt @@ -20,6 +20,6 @@ try { } ?> --EXPECT-- -array_map() expects parameter 1 to be a valid callback, function '%n' not found or invalid function name -array_map() expects parameter 1 to be a valid callback, function '%n %i' not found or invalid function name -array_map() expects parameter 1 to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function '%n' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function '%n %i' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name diff --git a/Zend/tests/bug70898.phpt b/Zend/tests/bug70898.phpt index fa6e96d83f362..2a0fabd138458 100644 --- a/Zend/tests/bug70898.phpt +++ b/Zend/tests/bug70898.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -array_map() expects parameter 1 to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name diff --git a/Zend/tests/bug72101.phpt b/Zend/tests/bug72101.phpt index 23861958fdc15..04252a43a1546 100644 --- a/Zend/tests/bug72101.phpt +++ b/Zend/tests/bug72101.phpt @@ -76,7 +76,7 @@ $foo->bar($a, $b, $c); --EXPECTF-- Fatal error: Uncaught Error: Class 'DoesNotExists' not found in %sbug72101.php:61 Stack trace: -#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8) +#0 %sbug72101.php(8): {closure}(2, 'MethodCallbackB...', '%s', 8) #1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static)) #2 %sbug72101.php(19): PHPUnit_Framework_MockObject_Matcher->invoked(Object(PHPUnit_Framework_MockObject_Invocation_Static)) #3 %sbug72101.php(52): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static)) diff --git a/Zend/tests/bug72598.phpt b/Zend/tests/bug72598.phpt index eeee51027949e..acf40cbba05e2 100644 --- a/Zend/tests/bug72598.phpt +++ b/Zend/tests/bug72598.phpt @@ -17,10 +17,10 @@ new class { }; ?> --EXPECTF-- -Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598.php on line 11 +Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d object(class@anonymous)#1 (0) { } -Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598.php on line 11 +Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d object(class@anonymous)#1 (0) { } diff --git a/Zend/tests/bug72598_2.phpt b/Zend/tests/bug72598_2.phpt index d58e18c978e6f..75c4894dff9f3 100644 --- a/Zend/tests/bug72598_2.phpt +++ b/Zend/tests/bug72598_2.phpt @@ -20,8 +20,8 @@ new class { }; ?> --EXPECTF-- -Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598_2.php on line 14 +Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d int(0) -Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598_2.php on line 14 +Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d int(0) diff --git a/Zend/tests/bug73954.phpt b/Zend/tests/bug73954.phpt index fb0a6b8f3da84..062d438b600b3 100644 --- a/Zend/tests/bug73954.phpt +++ b/Zend/tests/bug73954.phpt @@ -16,7 +16,7 @@ takes_int(log(tan(3.14))); float(NAN) bool(true) -Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type int, float given, called in %s on line 9 and defined in %s:6 +Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($int) to be of type int, float given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(9): takes_int(NAN) #1 {main} diff --git a/Zend/tests/bug74164.phpt b/Zend/tests/bug74164.phpt index b623dcb1dba91..e0dbed9a195a4 100644 --- a/Zend/tests/bug74164.phpt +++ b/Zend/tests/bug74164.phpt @@ -12,7 +12,7 @@ set_error_handler(function ($type, $msg) { call_user_func(function (array &$ref) {var_dump("xxx");}, 'not_an_array_variable'); ?> --EXPECTF-- -Fatal error: Uncaught Exception: Parameter 1 to Foo\{closure}() expected to be a reference, value given in %sbug74164.php:%d +Fatal error: Uncaught Exception: Foo\{closure}() expects argument #1 ($ref) to be passed by reference, value given in %s:%d Stack trace: #0 [internal function]: Foo\{closure}(%s) #1 %sbug74164.php(%d): call_user_func(%s) diff --git a/Zend/tests/call_user_func_001.phpt b/Zend/tests/call_user_func_001.phpt index 3d2becdc78344..8ad76564597ca 100644 --- a/Zend/tests/call_user_func_001.phpt +++ b/Zend/tests/call_user_func_001.phpt @@ -37,5 +37,5 @@ namespace testing { ?> --EXPECT-- string(6) "foobar" -call_user_func() expects parameter 1 to be a valid callback, cannot access private method testing\foo::priv() -call_user_func() expects parameter 1 to be a valid callback, cannot access protected method testing\foo::prot() +call_user_func() expects argument #1 ($function) to be a valid callback, cannot access private method testing\foo::priv() +call_user_func() expects argument #1 ($function) to be a valid callback, cannot access protected method testing\foo::prot() diff --git a/Zend/tests/call_user_func_002.phpt b/Zend/tests/call_user_func_002.phpt index cc07ffab16718..3ac930854353d 100644 --- a/Zend/tests/call_user_func_002.phpt +++ b/Zend/tests/call_user_func_002.phpt @@ -31,11 +31,11 @@ try { ?> --EXPECTF-- string(3) "foo" -call_user_func() expects parameter 1 to be a valid callback, class 'foo' not found -call_user_func() expects parameter 1 to be a valid callback, class '' not found +call_user_func() expects argument #1 ($function) to be a valid callback, class 'foo' not found +call_user_func() expects argument #1 ($function) to be a valid callback, class '' not found Warning: Undefined variable: foo in %s on line %d -call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object +call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object Warning: Undefined variable: foo in %s on line %d -call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object +call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object diff --git a/Zend/tests/call_user_func_006.phpt b/Zend/tests/call_user_func_006.phpt index 16a59bcf5ba57..624ce2391c2e5 100644 --- a/Zend/tests/call_user_func_006.phpt +++ b/Zend/tests/call_user_func_006.phpt @@ -21,8 +21,8 @@ var_dump($y); ?> --EXPECTF-- -Warning: Parameter 1 to Foo\bar() expected to be a reference, value given in %s on line %d +Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d int(42) -Warning: Parameter 1 to Foo\bar() expected to be a reference, value given in %s on line %d +Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d int(42) diff --git a/Zend/tests/call_user_func_007.phpt b/Zend/tests/call_user_func_007.phpt index d3f2747c13ef9..8efa3ab9018d5 100644 --- a/Zend/tests/call_user_func_007.phpt +++ b/Zend/tests/call_user_func_007.phpt @@ -15,6 +15,6 @@ Notice: Undefined offset: 0 in %s on line %d Warning: Trying to access array offset on value of type null in %s on line %d -Warning: Parameter 1 to foo() expected to be a reference, value given in %s on line %d +Warning: foo() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d array(0) { } diff --git a/Zend/tests/call_user_func_008.phpt b/Zend/tests/call_user_func_008.phpt index 3e727e7f43c1d..c710360a13252 100644 --- a/Zend/tests/call_user_func_008.phpt +++ b/Zend/tests/call_user_func_008.phpt @@ -25,30 +25,30 @@ var_dump($i, $j); ?> --EXPECTF-- -Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d +Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d -Warning: Parameter 2 to test() expected to be a reference, value given in %s on line %d +Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d bool(true) int(0) int(0) -Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d +Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d -Warning: Parameter 2 to test() expected to be a reference, value given in %s on line %d +Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d bool(true) int(0) int(0) -Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d +Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d -Warning: Parameter 2 to test() expected to be a reference, value given in %s on line %d +Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d bool(true) int(0) int(0) -Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d +Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d -Warning: Parameter 2 to test() expected to be a reference, value given in %s on line %d +Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d bool(true) int(0) int(0) diff --git a/Zend/tests/call_user_func_009.phpt b/Zend/tests/call_user_func_009.phpt index d45380db1500a..ebbecd73e690d 100644 --- a/Zend/tests/call_user_func_009.phpt +++ b/Zend/tests/call_user_func_009.phpt @@ -10,8 +10,8 @@ var_dump(\call_user_func('sort', [])); ?> --EXPECTF-- -Warning: Parameter 1 to sort() expected to be a reference, value given in %s on line %d +Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d bool(true) -Warning: Parameter 1 to sort() expected to be a reference, value given in %s on line %d +Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d bool(true) diff --git a/Zend/tests/call_user_func_array_invalid_type.phpt b/Zend/tests/call_user_func_array_invalid_type.phpt index d1c70f0fefdf3..a7b5fb3cb7b71 100644 --- a/Zend/tests/call_user_func_array_invalid_type.phpt +++ b/Zend/tests/call_user_func_array_invalid_type.phpt @@ -15,4 +15,4 @@ try { } ?> --EXPECT-- -call_user_func_array() expects parameter 2 to be array, null given +call_user_func_array() expects argument #2 ($args) to be of type array, null given diff --git a/Zend/tests/closure_027.phpt b/Zend/tests/closure_027.phpt index ab5fde202679a..bffd69c11a6cf 100644 --- a/Zend/tests/closure_027.phpt +++ b/Zend/tests/closure_027.phpt @@ -3,7 +3,7 @@ Closure 027: Testing Closure type-hint --FILE-- getMessage() . "\n"; } --EXPECTF-- -Exception: Argument 1 passed to {closure}() must be an instance of A, instance of B %s -Exception: Argument 1 passed to {closure}() must be an instance of A, instance of B %s -Exception: Argument 1 passed to {closure}() must be an instance of A, instance of B %s +Exception: {closure}() expects argument #1 ($a) to be of type A, B given, called in %s on line %d +Exception: {closure}() expects argument #1 ($a) to be of type A, B given +Exception: {closure}() expects argument #1 ($a) to be of type A, B given diff --git a/Zend/tests/errmsg_013.phpt b/Zend/tests/errmsg_013.phpt index 6346868679a1a..74c7bc2e8efde 100644 --- a/Zend/tests/errmsg_013.phpt +++ b/Zend/tests/errmsg_013.phpt @@ -1,5 +1,5 @@ --TEST-- -errmsg: default value for parameters with array type can only be an array or NULL +errmsg: default value for parameters with array type can only be an array or null --FILE-- --EXPECTF-- -Warning: set_exception_handler() expects the argument (fo) to be a valid callback in %s on line %d +Warning: set_exception_handler() expects argument #1 ($exception_handler) to be a valid callback in %s on line %d -Warning: set_exception_handler() expects the argument (::) to be a valid callback in %s on line %d +Warning: set_exception_handler() expects argument #1 ($exception_handler) to be a valid callback in %s on line %d Done diff --git a/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt b/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt index e47d03d5f6756..c8977ece99ea5 100644 --- a/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt +++ b/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt @@ -49,6 +49,6 @@ Too few arguments to function bar(), 1 passed in %s and exactly 2 expected ArgumentCountError Too few arguments to function bat(), 1 passed in %s and exactly 2 expected TypeError -Argument 1 passed to bat() must be of the type int, string given, called in %s +bat() expects argument #1 ($foo) to be of type int, string given, called in %s on line %d TypeError -Argument 2 passed to bat() must be of the type string, int given, called in %s +bat() expects argument #2 ($bar) to be of type string, int given, called in %s on line %d diff --git a/Zend/tests/function_arguments/variadic_argument_type_error.phpt b/Zend/tests/function_arguments/variadic_argument_type_error.phpt new file mode 100644 index 0000000000000..ee244ab4a1ad9 --- /dev/null +++ b/Zend/tests/function_arguments/variadic_argument_type_error.phpt @@ -0,0 +1,22 @@ +--TEST-- +Call userland function with incorrect variadic argument type +--FILE-- +getMessage() . "\n"; +} + +try { + foo(1, 1, 1, []); +} catch (TypeError $exception) { + echo $exception->getMessage() . "\n"; +} + +--EXPECTF-- +foo() expects argument #2 ($bar) to be of type int, array given, called in %s on line %d +foo() expects argument #4 ($bar) to be of type int, array given, called in %s on line %d diff --git a/Zend/tests/generators/generator_with_type_check.phpt b/Zend/tests/generators/generator_with_type_check.phpt index 12e6d46d76c2a..90636406b4096 100644 --- a/Zend/tests/generators/generator_with_type_check.phpt +++ b/Zend/tests/generators/generator_with_type_check.phpt @@ -6,7 +6,7 @@ function gen(array $a) { yield; } gen(42); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to gen() must be of the type array, int given, called in %sgenerator_with_type_check.php on line 3 and defined in %sgenerator_with_type_check.php:2 +Fatal error: Uncaught TypeError: gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %sgenerator_with_type_check.php(3): gen(42) #1 {main} diff --git a/Zend/tests/generators/generator_with_type_check_2.phpt b/Zend/tests/generators/generator_with_type_check_2.phpt index d4ebbd2ad3b57..445c8f4a9fedf 100644 --- a/Zend/tests/generators/generator_with_type_check_2.phpt +++ b/Zend/tests/generators/generator_with_type_check_2.phpt @@ -18,5 +18,5 @@ try { } ?> --EXPECTF-- -Argument 1 passed to gen() must be of the type array, int given, called in %sgenerator_with_type_check_2.php on line 4 -Argument 1 passed to gen() must be of the type array, int given, called in %sgenerator_with_type_check_2.php on line 10 +gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d +gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d diff --git a/Zend/tests/generators/throw_not_an_exception.phpt b/Zend/tests/generators/throw_not_an_exception.phpt index abf9a3c894099..dcb1d3d0b014f 100644 --- a/Zend/tests/generators/throw_not_an_exception.phpt +++ b/Zend/tests/generators/throw_not_an_exception.phpt @@ -12,7 +12,7 @@ $gen->throw(new stdClass); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Generator::throw() expects parameter 1 to be Throwable, object given in %s:%d +Fatal error: Uncaught TypeError: Generator::throw() expects argument #1 ($exception) to be of type Throwable, object given in %s:%d Stack trace: #0 %s(%d): Generator->throw(Object(stdClass)) #1 {main} diff --git a/Zend/tests/methods-on-non-objects-call-user-func.phpt b/Zend/tests/methods-on-non-objects-call-user-func.phpt index 63884abc79222..5ccf9e0d26653 100644 --- a/Zend/tests/methods-on-non-objects-call-user-func.phpt +++ b/Zend/tests/methods-on-non-objects-call-user-func.phpt @@ -10,4 +10,4 @@ try { } ?> --EXPECT-- -call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object +call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object diff --git a/Zend/tests/ns_071.phpt b/Zend/tests/ns_071.phpt index 7acdffba82899..cee6431be0b64 100644 --- a/Zend/tests/ns_071.phpt +++ b/Zend/tests/ns_071.phpt @@ -18,7 +18,7 @@ new bar(new \stdclass); --EXPECTF-- NULL -Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must be of the type array or null, object given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo\bar::__construct() expects argument #1 ($x) to be of type ?array, object given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo\bar->__construct(Object(stdClass)) #1 {main} diff --git a/Zend/tests/ns_072.phpt b/Zend/tests/ns_072.phpt index c422eedd4e778..6429632658586 100644 --- a/Zend/tests/ns_072.phpt +++ b/Zend/tests/ns_072.phpt @@ -30,7 +30,7 @@ object(foo\test)#%d (0) { } NULL -Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo or be null, instance of stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo\bar::__construct() expects argument #1 ($x) to be of type ?foo\foo, stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo\bar->__construct(Object(stdClass)) #1 {main} diff --git a/Zend/tests/object_types/return_type_in_class.phpt b/Zend/tests/object_types/return_type_in_class.phpt index 3edb015df756c..44e3fbf871eee 100644 --- a/Zend/tests/object_types/return_type_in_class.phpt +++ b/Zend/tests/object_types/return_type_in_class.phpt @@ -18,7 +18,7 @@ $three = new class extends Two { }; $three->a(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be an object, int returned in %s:%d +Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be of type object, int returned in %s:%d Stack trace: #0 %s(%d): Two@anonymous->a() #1 {main} diff --git a/Zend/tests/object_types/return_type_in_function.phpt b/Zend/tests/object_types/return_type_in_function.phpt index 61f6845b477e8..1c60759bb3aed 100644 --- a/Zend/tests/object_types/return_type_in_function.phpt +++ b/Zend/tests/object_types/return_type_in_function.phpt @@ -8,7 +8,7 @@ function a() : object { } a(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of a() must be an object, int returned in %s:4 +Fatal error: Uncaught TypeError: Return value of a() must be of type object, int returned in %s:4 Stack trace: #0 %s(6): a() #1 {main} diff --git a/Zend/tests/object_types/return_type_inheritance_in_class.phpt b/Zend/tests/object_types/return_type_inheritance_in_class.phpt index 23528531ec563..21dec61e30550 100644 --- a/Zend/tests/object_types/return_type_inheritance_in_class.phpt +++ b/Zend/tests/object_types/return_type_inheritance_in_class.phpt @@ -18,7 +18,7 @@ $three = new class extends Two { }; $three->a(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be an object, int returned in %s:%d +Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be of type object, int returned in %s:%d Stack trace: #0 %s(%d): Two@anonymous->a() #1 {main} diff --git a/Zend/tests/object_types/return_type_inheritance_in_interface.phpt b/Zend/tests/object_types/return_type_inheritance_in_interface.phpt index 793cc980aa6ae..b1af6789113b3 100644 --- a/Zend/tests/object_types/return_type_inheritance_in_interface.phpt +++ b/Zend/tests/object_types/return_type_inheritance_in_interface.phpt @@ -18,7 +18,7 @@ $three = new class implements Two { }; $three->a(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be an object, int returned in %s:%d +Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be of type object, int returned in %s:%d Stack trace: #0 %s(%d): Two@anonymous->a() #1 {main} diff --git a/Zend/tests/object_types/type_hint_in_class_method.phpt b/Zend/tests/object_types/type_hint_in_class_method.phpt index f8814e4bbbe78..098bfc0c52cb0 100644 --- a/Zend/tests/object_types/type_hint_in_class_method.phpt +++ b/Zend/tests/object_types/type_hint_in_class_method.phpt @@ -11,7 +11,7 @@ $one = new One(); $one->a(new One()); $one->a(123); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to One::a() must be an object, int given, called in %s:4 +Fatal error: Uncaught TypeError: One::a() expects argument #1 ($obj) to be of type object, int given, called in %s:%d Stack trace: #0 %s(9): One->a(123) #1 {main} diff --git a/Zend/tests/object_types/type_hint_in_function.phpt b/Zend/tests/object_types/type_hint_in_function.phpt index 39e075efdb96e..e834997f4d552 100644 --- a/Zend/tests/object_types/type_hint_in_function.phpt +++ b/Zend/tests/object_types/type_hint_in_function.phpt @@ -9,7 +9,7 @@ function a(object $obj) {} a(new A()); a(123); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to a() must be an object, int given, called in %s.php on line 7 and defined in %s:4 +Fatal error: Uncaught TypeError: a() expects argument #1 ($obj) to be of type object, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(7): a(123) #1 {main} diff --git a/Zend/tests/objects_022.phpt b/Zend/tests/objects_022.phpt index d5a695739f147..ce2d2f7c0032d 100644 --- a/Zend/tests/objects_022.phpt +++ b/Zend/tests/objects_022.phpt @@ -36,7 +36,7 @@ object(bar)#%d (0) { object(baz)#%d (0) { } -Fatal error: Uncaught TypeError: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo::testFoo() expects argument #1 ($obj) to be of type foo, stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo->testFoo(Object(stdClass)) #1 {main} diff --git a/Zend/tests/return_types/001.phpt b/Zend/tests/return_types/001.phpt index 2b87a562f6abd..fc2bc326a988e 100644 --- a/Zend/tests/return_types/001.phpt +++ b/Zend/tests/return_types/001.phpt @@ -7,7 +7,7 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, none returned in %s:%d +Fatal error: Uncaught TypeError: Return value of test1() must be of type array, none returned in %s:%d Stack trace: #0 %s(%d): test1() #1 {main} diff --git a/Zend/tests/return_types/002.phpt b/Zend/tests/return_types/002.phpt index 615317cf83303..07101ca760ee8 100644 --- a/Zend/tests/return_types/002.phpt +++ b/Zend/tests/return_types/002.phpt @@ -8,7 +8,7 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, null returned in %s:%d +Fatal error: Uncaught TypeError: Return value of test1() must be of type array, null returned in %s:%d Stack trace: #0 %s(%d): test1() #1 {main} diff --git a/Zend/tests/return_types/003.phpt b/Zend/tests/return_types/003.phpt index ed78d5182364a..5d60da25ed121 100644 --- a/Zend/tests/return_types/003.phpt +++ b/Zend/tests/return_types/003.phpt @@ -7,7 +7,7 @@ function test1() : array { } test1(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, int returned in %s:%d +Fatal error: Uncaught TypeError: Return value of test1() must be of type array, int returned in %s:%d Stack trace: #0 %s(%d): test1() #1 {main} diff --git a/Zend/tests/return_types/004.phpt b/Zend/tests/return_types/004.phpt index 6098d513340c8..eae7018dedb4b 100644 --- a/Zend/tests/return_types/004.phpt +++ b/Zend/tests/return_types/004.phpt @@ -8,7 +8,7 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, string returned in %s:%d +Fatal error: Uncaught TypeError: Return value of test1() must be of type array, string returned in %s:%d Stack trace: #0 %s(%d): test1() #1 {main} diff --git a/Zend/tests/return_types/005.phpt b/Zend/tests/return_types/005.phpt index f8d666fae5aa6..6313ae69ce245 100644 --- a/Zend/tests/return_types/005.phpt +++ b/Zend/tests/return_types/005.phpt @@ -13,7 +13,7 @@ class qux { $qux = new qux(); $qux->foo(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of qux::foo() must be an instance of foo, instance of qux returned in %s:%d +Fatal error: Uncaught TypeError: Return value of qux::foo() must be of type foo, qux returned in %s:%d Stack trace: #0 %s(%d): qux->foo() #1 {main} diff --git a/Zend/tests/return_types/010.phpt b/Zend/tests/return_types/010.phpt index 2cfe97dac24e6..6ff9d7f25c0e0 100644 --- a/Zend/tests/return_types/010.phpt +++ b/Zend/tests/return_types/010.phpt @@ -9,7 +9,7 @@ function &foo(array &$in) : array { $array = [1, 2, 3]; var_dump(foo($array)); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of foo() must be of the type array, null returned in %s:%d +Fatal error: Uncaught TypeError: Return value of foo() must be of type array, null returned in %s:%d Stack trace: #0 %s(%d): foo(Array) #1 {main} diff --git a/Zend/tests/return_types/013.phpt b/Zend/tests/return_types/013.phpt index 5b2c06748d98f..1cbdd6184f46e 100644 --- a/Zend/tests/return_types/013.phpt +++ b/Zend/tests/return_types/013.phpt @@ -14,7 +14,7 @@ class foo { $baz = new foo(); var_dump($func=$baz->bar(), $func()); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of foo::{closure}() must be of the type array, null returned in %s:%d +Fatal error: Uncaught TypeError: Return value of foo::{closure}() must be of type array, null returned in %s:%d Stack trace: #0 %s(%d): foo->{closure}() #1 {main} diff --git a/Zend/tests/return_types/028.phpt b/Zend/tests/return_types/028.phpt index 5e69006af7647..d50b09c3f6bf7 100644 --- a/Zend/tests/return_types/028.phpt +++ b/Zend/tests/return_types/028.phpt @@ -17,4 +17,4 @@ try { ?> --EXPECTF-- -Return value of foo() must be an instance of stdClass, array returned in %s on line %d +Return value of foo() must be of type stdClass, array returned in %s on line %d diff --git a/Zend/tests/return_types/029.phpt b/Zend/tests/return_types/029.phpt index 5741763abb722..0e25dea5593cd 100644 --- a/Zend/tests/return_types/029.phpt +++ b/Zend/tests/return_types/029.phpt @@ -21,7 +21,7 @@ Stack trace: #0 %s(%d): foo() #1 {main} -Next TypeError: Return value of foo() must be of the type array, null returned in %s29.php:%d +Next TypeError: Return value of foo() must be of type array, null returned in %s29.php:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/return_types/030.phpt b/Zend/tests/return_types/030.phpt index 8117a7d7ce7cc..907d47d66aba9 100644 --- a/Zend/tests/return_types/030.phpt +++ b/Zend/tests/return_types/030.phpt @@ -16,7 +16,7 @@ foo(0); ok ok -Fatal error: Uncaught TypeError: Return value of foo() must be of the type array or null, int returned in %s030.php:3 +Fatal error: Uncaught TypeError: Return value of foo() must be of type ?array, int returned in %s030.php:3 Stack trace: #0 %s030.php(10): foo(0) #1 {main} diff --git a/Zend/tests/return_types/bug70557.phpt b/Zend/tests/return_types/bug70557.phpt index 5917197045a8a..af8b92fb62255 100644 --- a/Zend/tests/return_types/bug70557.phpt +++ b/Zend/tests/return_types/bug70557.phpt @@ -16,4 +16,4 @@ try { } ?> --EXPECT-- -string(68) "Return value of getNumber() must be of the type int, string returned" +string(64) "Return value of getNumber() must be of type int, string returned" diff --git a/Zend/tests/return_types/bug71092.phpt b/Zend/tests/return_types/bug71092.phpt index abc43356bcdc2..ed9a082349d14 100644 --- a/Zend/tests/return_types/bug71092.phpt +++ b/Zend/tests/return_types/bug71092.phpt @@ -16,7 +16,7 @@ function boom(): array { boom(); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of boom() must be of the type array, null returned in %sbug71092.php:%d +Fatal error: Uncaught TypeError: Return value of boom() must be of type array, null returned in %sbug71092.php:%d Stack trace: #0 %s(%d): boom() #1 {main} diff --git a/Zend/tests/return_types/internal_functions001.phpt b/Zend/tests/return_types/internal_functions001.phpt index 7ec5b9c08f1d2..14a60c83b4921 100644 --- a/Zend/tests/return_types/internal_functions001.phpt +++ b/Zend/tests/return_types/internal_functions001.phpt @@ -11,4 +11,4 @@ if (!PHP_DEBUG) die('skip requires debug build'); zend_test_array_return(); ?> --EXPECTF-- -Fatal error: Return value of zend_test_array_return() must be of the type array, null returned in %s on line %d +Fatal error: Return value of zend_test_array_return() must be of type array, null returned in %s on line %d diff --git a/Zend/tests/return_types/rfc001.phpt b/Zend/tests/return_types/rfc001.phpt index 3fdbf3443c648..cbe2335afb282 100644 --- a/Zend/tests/return_types/rfc001.phpt +++ b/Zend/tests/return_types/rfc001.phpt @@ -9,7 +9,7 @@ function get_config(): array { get_config(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of get_config() must be of the type array, int returned in %s:%d +Fatal error: Uncaught TypeError: Return value of get_config() must be of type array, int returned in %s:%d Stack trace: #0 %s(%d): get_config() #1 {main} diff --git a/Zend/tests/return_types/rfc003.phpt b/Zend/tests/return_types/rfc003.phpt index 6b9cc81c69931..76a77c07c4932 100644 --- a/Zend/tests/return_types/rfc003.phpt +++ b/Zend/tests/return_types/rfc003.phpt @@ -8,7 +8,7 @@ function foo(): DateTime { foo(); --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of foo() must be an instance of DateTime, null returned in %s:%d +Fatal error: Uncaught TypeError: Return value of foo() must be of type DateTime, null returned in %s:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/trait_type_errors.phpt b/Zend/tests/trait_type_errors.phpt index 50f5d619ad360..1d29714a2f1e4 100644 --- a/Zend/tests/trait_type_errors.phpt +++ b/Zend/tests/trait_type_errors.phpt @@ -38,6 +38,6 @@ try { ?> --EXPECTF-- -Return value of C::test1() must be of the type int, string returned -Argument 1 passed to C::test2() must be of the type int, string given, called in %s on line %d -Argument 1 passed to C::test3() must be of the type int, string given, called in %s on line %d +Return value of C::test1() must be of type int, string returned +C::test2() expects argument #1 ($arg) to be of type int, string given, called in %s on line %d +C::test3() expects argument #1 ($arg) to be of type int, string given, called in %s on line %d diff --git a/Zend/tests/type_declarations/array_001.phpt b/Zend/tests/type_declarations/array_001.phpt index 09af9a98f22fd..0e08bd8b7f259 100644 --- a/Zend/tests/type_declarations/array_001.phpt +++ b/Zend/tests/type_declarations/array_001.phpt @@ -12,7 +12,7 @@ foo(123); --EXPECTF-- 3 -Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, int given, called in %s on line 7 and defined in %s:2 +Fatal error: Uncaught TypeError: foo() expects argument #1 ($a) to be of type array, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo(123) #1 {main} diff --git a/Zend/tests/type_declarations/callable_001.phpt b/Zend/tests/type_declarations/callable_001.phpt index d93e70923aa39..e6c2702235df5 100644 --- a/Zend/tests/type_declarations/callable_001.phpt +++ b/Zend/tests/type_declarations/callable_001.phpt @@ -29,7 +29,7 @@ array(2) { string(3) "foo" } -Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be callable, array given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo() expects argument #1 ($bar) to be of type callable, array given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo(Array) #1 {main} diff --git a/Zend/tests/type_declarations/explicit_weak_include_strict.phpt b/Zend/tests/type_declarations/explicit_weak_include_strict.phpt index 9773775ae49e2..5ad7bd17fcb88 100644 --- a/Zend/tests/type_declarations/explicit_weak_include_strict.phpt +++ b/Zend/tests/type_declarations/explicit_weak_include_strict.phpt @@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc'; // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type int, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5 +Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): takes_int(1) #1 %s(%d): require('%s') diff --git a/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt b/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt index 8aec0c009f666..661616fb92f2c 100644 --- a/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt +++ b/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt @@ -8,7 +8,7 @@ foo(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be an instance of bar, null given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo() expects argument #1 ($ex) to be of type bar, null given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo(NULL) #1 {main} diff --git a/Zend/tests/type_declarations/internal_function_strict_mode.phpt b/Zend/tests/type_declarations/internal_function_strict_mode.phpt index 1019aa5024f9e..b3b9adc9d3b4e 100644 --- a/Zend/tests/type_declarations/internal_function_strict_mode.phpt +++ b/Zend/tests/type_declarations/internal_function_strict_mode.phpt @@ -28,8 +28,8 @@ try { ?> --EXPECT-- *** Trying Ord With Integer -*** Caught ord() expects parameter 1 to be string, int given +*** Caught ord() expects argument #1 ($character) to be of type string, int given *** Trying Array Map With Invalid Callback -*** Caught array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object +*** Caught array_map() expects argument #1 ($callback) to be a valid callback, first array member is not a valid class name or object *** Trying Strlen With Float -*** Caught strlen() expects parameter 1 to be string, float given +*** Caught strlen() expects argument #1 ($str) to be of type string, float given diff --git a/Zend/tests/type_declarations/iterable_001.phpt b/Zend/tests/type_declarations/iterable_001.phpt index b6755c49b9bcc..856dc63c4d8d4 100644 --- a/Zend/tests/type_declarations/iterable_001.phpt +++ b/Zend/tests/type_declarations/iterable_001.phpt @@ -44,4 +44,4 @@ object(ArrayIterator)#1 (1) { int(3) } } -Argument 1 passed to test() must be iterable, int given, called in %s on line %d +test() expects argument #1 ($iterable) to be of type iterable, int given, called in %s on line %d diff --git a/Zend/tests/type_declarations/iterable_003.phpt b/Zend/tests/type_declarations/iterable_003.phpt index 0b6c032b9f85f..eda77d490b648 100644 --- a/Zend/tests/type_declarations/iterable_003.phpt +++ b/Zend/tests/type_declarations/iterable_003.phpt @@ -29,4 +29,4 @@ array(0) { } object(Generator)#2 (0) { } -Return value of baz() must be iterable, int returned +Return value of baz() must be of type iterable, int returned diff --git a/Zend/tests/type_declarations/scalar_basic.phpt b/Zend/tests/type_declarations/scalar_basic.phpt index 1253f48c16b01..ef10e67ac075e 100644 --- a/Zend/tests/type_declarations/scalar_basic.phpt +++ b/Zend/tests/type_declarations/scalar_basic.phpt @@ -78,16 +78,16 @@ E_NOTICE: A non well formed numeric value encountered on line %d int(1) *** Trying string(1) "a" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying string(0) "" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying int(%d) int(%d) *** Trying float(NAN) -*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d *** Trying bool(true) int(1) @@ -96,22 +96,22 @@ int(1) int(0) *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d *** Trying object(stdClass)#%s (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d *** Trying object(Stringable)#%s (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d *** Trying resource(%d) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type int, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d Testing 'float' type: @@ -132,10 +132,10 @@ E_NOTICE: A non well formed numeric value encountered on line %d float(1) *** Trying string(1) "a" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying string(0) "" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying int(%d) float(%s) @@ -150,22 +150,22 @@ float(1) float(0) *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d *** Trying object(stdClass)#%s (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d *** Trying object(Stringable)#%s (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d *** Trying resource(%d) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d Testing 'string' type: @@ -203,22 +203,22 @@ string(1) "1" string(0) "" *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type string, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d *** Trying object(stdClass)#%s (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d *** Trying object(Stringable)#%s (0) { } string(6) "foobar" *** Trying resource(%d) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d Testing 'bool' type: @@ -256,21 +256,21 @@ bool(true) bool(false) *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type bool, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d *** Trying object(stdClass)#%s (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d *** Trying object(Stringable)#%s (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d *** Trying resource(%d) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type bool, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d Done diff --git a/Zend/tests/type_declarations/scalar_constant_defaults.phpt b/Zend/tests/type_declarations/scalar_constant_defaults.phpt index e42cb32bde318..28f0252cdfb12 100644 --- a/Zend/tests/type_declarations/scalar_constant_defaults.phpt +++ b/Zend/tests/type_declarations/scalar_constant_defaults.phpt @@ -96,9 +96,9 @@ float(10.7) Testing string add val string(14) "this is a test" Testing int with default null constant -Argument 1 passed to int_val_default_null() must be of the type int, null given, called in %s on line %d +int_val_default_null() expects argument #1 ($a) to be of type int, null given, called in %s on line %d Testing int with null null constant -Argument 1 passed to int_val_default_null() must be of the type int, null given, called in %s on line %d +int_val_default_null() expects argument #1 ($a) to be of type int, null given, called in %s on line %d Testing nullable int with default null constant NULL Testing nullable int with null null constant diff --git a/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt b/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt index d897bb4822b3b..66d56e72df417 100644 --- a/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt +++ b/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt @@ -13,7 +13,7 @@ var_dump(int_val()); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to int_val() must be of the type int, string given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: int_val() expects argument #1 ($a) to be of type int, string given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): int_val() #1 {main} diff --git a/Zend/tests/type_declarations/scalar_null.phpt b/Zend/tests/type_declarations/scalar_null.phpt index d149053fd2ffe..ab9647ba9c9b2 100644 --- a/Zend/tests/type_declarations/scalar_null.phpt +++ b/Zend/tests/type_declarations/scalar_null.phpt @@ -27,13 +27,13 @@ echo PHP_EOL . "Done"; ?> --EXPECTF-- Testing int: -*** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d Testing float: -*** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d Testing string: -*** Caught Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d Testing bool: -*** Caught Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d Testing int nullable: NULL Testing float nullable: diff --git a/Zend/tests/type_declarations/scalar_return_basic.phpt b/Zend/tests/type_declarations/scalar_return_basic.phpt index c69196269f06c..9ee50f8457700 100644 --- a/Zend/tests/type_declarations/scalar_return_basic.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic.phpt @@ -75,30 +75,30 @@ int(1) E_NOTICE: A non well formed numeric value encountered on line %d int(1) *** Trying string(1) "a" -*** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, string returned in %s on line %d *** Trying string(0) "" -*** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, string returned in %s on line %d *** Trying int(2147483647) int(2147483647) *** Trying float(NAN) -*** Caught Return value of {closure}() must be of the type int, float returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, float returned in %s on line %d *** Trying bool(true) int(1) *** Trying bool(false) int(0) *** Trying NULL -*** Caught Return value of {closure}() must be of the type int, null returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, null returned in %s on line %d *** Trying array(0) { } -*** Caught Return value of {closure}() must be of the type int, array returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, array returned in %s on line %d *** Trying object(stdClass)#6 (0) { } -*** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, object returned in %s on line %d *** Trying object(Stringable)#7 (0) { } -*** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, object returned in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Return value of {closure}() must be of the type int, resource returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, resource returned in %s on line %d Testing 'float' type: *** Trying int(1) @@ -113,9 +113,9 @@ float(1.5) E_NOTICE: A non well formed numeric value encountered on line %d float(1) *** Trying string(1) "a" -*** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, string returned in %s on line %d *** Trying string(0) "" -*** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, string returned in %s on line %d *** Trying int(2147483647) float(2147483647) *** Trying float(NAN) @@ -125,18 +125,18 @@ float(1) *** Trying bool(false) float(0) *** Trying NULL -*** Caught Return value of {closure}() must be of the type float, null returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, null returned in %s on line %d *** Trying array(0) { } -*** Caught Return value of {closure}() must be of the type float, array returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, array returned in %s on line %d *** Trying object(stdClass)#6 (0) { } -*** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, object returned in %s on line %d *** Trying object(Stringable)#7 (0) { } -*** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, object returned in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, resource returned in %s on line %d Testing 'string' type: *** Trying int(1) @@ -162,18 +162,18 @@ string(1) "1" *** Trying bool(false) string(0) "" *** Trying NULL -*** Caught Return value of {closure}() must be of the type string, null returned in %s on line %d +*** Caught Return value of {closure}() must be of type string, null returned in %s on line %d *** Trying array(0) { } -*** Caught Return value of {closure}() must be of the type string, array returned in %s on line %d +*** Caught Return value of {closure}() must be of type string, array returned in %s on line %d *** Trying object(stdClass)#6 (0) { } -*** Caught Return value of {closure}() must be of the type string, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type string, object returned in %s on line %d *** Trying object(Stringable)#7 (0) { } string(6) "foobar" *** Trying resource(5) of type (stream) -*** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d +*** Caught Return value of {closure}() must be of type string, resource returned in %s on line %d Testing 'bool' type: *** Trying int(1) @@ -199,17 +199,17 @@ bool(true) *** Trying bool(false) bool(false) *** Trying NULL -*** Caught Return value of {closure}() must be of the type bool, null returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, null returned in %s on line %d *** Trying array(0) { } -*** Caught Return value of {closure}() must be of the type bool, array returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, array returned in %s on line %d *** Trying object(stdClass)#6 (0) { } -*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d *** Trying object(Stringable)#7 (0) { } -*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Return value of {closure}() must be of the type bool, resource returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, resource returned in %s on line %d Done diff --git a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt index 6f2ff11eb211c..fa7aacdef3f49 100644 --- a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt @@ -75,30 +75,30 @@ int(1) E_NOTICE: A non well formed numeric value encountered on line %d int(1) *** Trying string(1) "a" -*** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, string returned in %s on line %d *** Trying string(0) "" -*** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, string returned in %s on line %d *** Trying int(9223372036854775807) int(9223372036854775807) *** Trying float(NAN) -*** Caught Return value of {closure}() must be of the type int, float returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, float returned in %s on line %d *** Trying bool(true) int(1) *** Trying bool(false) int(0) *** Trying NULL -*** Caught Return value of {closure}() must be of the type int, null returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, null returned in %s on line %d *** Trying array(0) { } -*** Caught Return value of {closure}() must be of the type int, array returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, array returned in %s on line %d *** Trying object(stdClass)#6 (0) { } -*** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, object returned in %s on line %d *** Trying object(Stringable)#7 (0) { } -*** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, object returned in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Return value of {closure}() must be of the type int, resource returned in %s on line %d +*** Caught Return value of {closure}() must be of type int, resource returned in %s on line %d Testing 'float' type: *** Trying int(1) @@ -113,9 +113,9 @@ float(1.5) E_NOTICE: A non well formed numeric value encountered on line %d float(1) *** Trying string(1) "a" -*** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, string returned in %s on line %d *** Trying string(0) "" -*** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, string returned in %s on line %d *** Trying int(9223372036854775807) float(9.2233720368548E+18) *** Trying float(NAN) @@ -125,18 +125,18 @@ float(1) *** Trying bool(false) float(0) *** Trying NULL -*** Caught Return value of {closure}() must be of the type float, null returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, null returned in %s on line %d *** Trying array(0) { } -*** Caught Return value of {closure}() must be of the type float, array returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, array returned in %s on line %d *** Trying object(stdClass)#6 (0) { } -*** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, object returned in %s on line %d *** Trying object(Stringable)#7 (0) { } -*** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, object returned in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d +*** Caught Return value of {closure}() must be of type float, resource returned in %s on line %d Testing 'string' type: *** Trying int(1) @@ -162,18 +162,18 @@ string(1) "1" *** Trying bool(false) string(0) "" *** Trying NULL -*** Caught Return value of {closure}() must be of the type string, null returned in %s on line %d +*** Caught Return value of {closure}() must be of type string, null returned in %s on line %d *** Trying array(0) { } -*** Caught Return value of {closure}() must be of the type string, array returned in %s on line %d +*** Caught Return value of {closure}() must be of type string, array returned in %s on line %d *** Trying object(stdClass)#6 (0) { } -*** Caught Return value of {closure}() must be of the type string, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type string, object returned in %s on line %d *** Trying object(Stringable)#7 (0) { } string(6) "foobar" *** Trying resource(5) of type (stream) -*** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d +*** Caught Return value of {closure}() must be of type string, resource returned in %s on line %d Testing 'bool' type: *** Trying int(1) @@ -199,17 +199,17 @@ bool(true) *** Trying bool(false) bool(false) *** Trying NULL -*** Caught Return value of {closure}() must be of the type bool, null returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, null returned in %s on line %d *** Trying array(0) { } -*** Caught Return value of {closure}() must be of the type bool, array returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, array returned in %s on line %d *** Trying object(stdClass)#6 (0) { } -*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d *** Trying object(Stringable)#7 (0) { } -*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Return value of {closure}() must be of the type bool, resource returned in %s on line %d +*** Caught Return value of {closure}() must be of type bool, resource returned in %s on line %d Done diff --git a/Zend/tests/type_declarations/scalar_strict.phpt b/Zend/tests/type_declarations/scalar_strict.phpt index 78b404f9f1651..89ab6a024b06c 100644 --- a/Zend/tests/type_declarations/scalar_strict.phpt +++ b/Zend/tests/type_declarations/scalar_strict.phpt @@ -60,52 +60,52 @@ Testing 'int' type: int(1) *** Trying string(1) "1" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying float(1) -*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d *** Trying float(1.5) -*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d *** Trying string(2) "1a" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying string(0) "" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying int(2147483647) int(2147483647) *** Trying float(NAN) -*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d *** Trying bool(true) -*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d *** Trying bool(false) -*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type int, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d Testing 'float' type: @@ -113,7 +113,7 @@ Testing 'float' type: float(1) *** Trying string(1) "1" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying float(1) float(1) @@ -122,13 +122,13 @@ float(1) float(1.5) *** Trying string(2) "1a" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying string(0) "" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying int(2147483647) float(2147483647) @@ -137,42 +137,42 @@ float(2147483647) float(NAN) *** Trying bool(true) -*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d *** Trying bool(false) -*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d Testing 'string' type: *** Trying int(1) -*** Caught Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d *** Trying string(1) "1" string(1) "1" *** Trying float(1) -*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d *** Trying float(1.5) -*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d *** Trying string(2) "1a" string(2) "1a" @@ -184,63 +184,63 @@ string(1) "a" string(0) "" *** Trying int(2147483647) -*** Caught Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d *** Trying float(NAN) -*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d *** Trying bool(true) -*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d *** Trying bool(false) -*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type string, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d Testing 'bool' type: *** Trying int(1) -*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d *** Trying string(1) "1" -*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d *** Trying float(1) -*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d *** Trying float(1.5) -*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d *** Trying string(2) "1a" -*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d *** Trying string(0) "" -*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d *** Trying int(2147483647) -*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d *** Trying float(NAN) -*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d *** Trying bool(true) bool(true) @@ -249,21 +249,21 @@ bool(true) bool(false) *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type bool, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type bool, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d Done diff --git a/Zend/tests/type_declarations/scalar_strict_64bit.phpt b/Zend/tests/type_declarations/scalar_strict_64bit.phpt index d6d38213a4e36..0f39700b7f326 100644 --- a/Zend/tests/type_declarations/scalar_strict_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_strict_64bit.phpt @@ -60,52 +60,52 @@ Testing 'int' type: int(1) *** Trying string(1) "1" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying float(1) -*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d *** Trying float(1.5) -*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d *** Trying string(2) "1a" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying string(0) "" -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying int(9223372036854775807) int(9223372036854775807) *** Trying float(NAN) -*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d *** Trying bool(true) -*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d *** Trying bool(false) -*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type int, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d Testing 'float' type: @@ -113,7 +113,7 @@ Testing 'float' type: float(1) *** Trying string(1) "1" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying float(1) float(1) @@ -122,13 +122,13 @@ float(1) float(1.5) *** Trying string(2) "1a" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying string(0) "" -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying int(9223372036854775807) float(9.2233720368548E+18) @@ -137,42 +137,42 @@ float(9.2233720368548E+18) float(NAN) *** Trying bool(true) -*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d *** Trying bool(false) -*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d Testing 'string' type: *** Trying int(1) -*** Caught Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d *** Trying string(1) "1" string(1) "1" *** Trying float(1) -*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d *** Trying float(1.5) -*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d *** Trying string(2) "1a" string(2) "1a" @@ -184,63 +184,63 @@ string(1) "a" string(0) "" *** Trying int(9223372036854775807) -*** Caught Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d *** Trying float(NAN) -*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d *** Trying bool(true) -*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d *** Trying bool(false) -*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type string, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d Testing 'bool' type: *** Trying int(1) -*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d *** Trying string(1) "1" -*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d *** Trying float(1) -*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d *** Trying float(1.5) -*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d *** Trying string(2) "1a" -*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d *** Trying string(0) "" -*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d *** Trying int(9223372036854775807) -*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d *** Trying float(NAN) -*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d *** Trying bool(true) bool(true) @@ -249,21 +249,21 @@ bool(true) bool(false) *** Trying NULL -*** Caught Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d *** Trying array(0) { } -*** Caught Argument 1 passed to {closure}() must be of the type bool, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught Argument 1 passed to {closure}() must be of the type bool, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d Done diff --git a/Zend/tests/type_declarations/scalar_strict_basic.phpt b/Zend/tests/type_declarations/scalar_strict_basic.phpt index 016757e671bf9..d3050314f42b2 100644 --- a/Zend/tests/type_declarations/scalar_strict_basic.phpt +++ b/Zend/tests/type_declarations/scalar_strict_basic.phpt @@ -57,28 +57,28 @@ Testing 'int' type: int(1) *** Trying float value -*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d *** Trying string value -*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d *** Trying true value -*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d *** Trying false value -*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d *** Trying null value -*** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d *** Trying array value -*** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d *** Trying object value -*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d *** Trying resource value -*** Caught Argument 1 passed to {closure}() must be of the type int, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d Testing 'float' type: @@ -89,65 +89,65 @@ float(1) float(1) *** Trying string value -*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying true value -*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d *** Trying false value -*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d *** Trying null value -*** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d *** Trying array value -*** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d *** Trying object value -*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d *** Trying resource value -*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d Testing 'string' type: *** Trying integer value -*** Caught Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d *** Trying float value -*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d *** Trying string value string(1) "1" *** Trying true value -*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d *** Trying false value -*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d *** Trying null value -*** Caught Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d *** Trying array value -*** Caught Argument 1 passed to {closure}() must be of the type string, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d *** Trying object value -*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d *** Trying resource value -*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d Testing 'bool' type: *** Trying integer value -*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d *** Trying float value -*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d *** Trying string value -*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d *** Trying true value bool(true) @@ -156,15 +156,15 @@ bool(true) bool(false) *** Trying null value -*** Caught Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d *** Trying array value -*** Caught Argument 1 passed to {closure}() must be of the type bool, array given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d *** Trying object value -*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d *** Trying resource value -*** Caught Argument 1 passed to {closure}() must be of the type bool, resource given, called in %s on line %d +*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d Done diff --git a/Zend/tests/type_declarations/static_type_return.phpt b/Zend/tests/type_declarations/static_type_return.phpt index 4a04cfff78b36..a5c8921e0a656 100644 --- a/Zend/tests/type_declarations/static_type_return.phpt +++ b/Zend/tests/type_declarations/static_type_return.phpt @@ -75,7 +75,7 @@ object(B)#3 (0) { object(A)#3 (0) { } -Return value of A::test2() must be an instance of B, instance of A returned +Return value of A::test2() must be of type B, A returned object(A)#3 (0) { } @@ -84,8 +84,8 @@ object(C)#3 (0) { object(A)#3 (0) { } -Return value of A::test4() must be of type B|array, instance of A returned +Return value of A::test4() must be of type B|array, A returned -Return value of {closure}() must be an instance of static, instance of stdClass returned +Return value of {closure}() must be of type static, stdClass returned object(A)#1 (0) { } diff --git a/Zend/tests/type_declarations/static_type_trait.phpt b/Zend/tests/type_declarations/static_type_trait.phpt index ede9fd62b1e2c..41f861643b661 100644 --- a/Zend/tests/type_declarations/static_type_trait.phpt +++ b/Zend/tests/type_declarations/static_type_trait.phpt @@ -31,7 +31,7 @@ object(P)#2 (0) { object(P)#2 (0) { } -Fatal error: Uncaught TypeError: Return value of C::test() must be an instance of P, instance of C returned in %s:%d +Fatal error: Uncaught TypeError: Return value of C::test() must be of type P, C returned in %s:%d Stack trace: #0 %s(%d): C->test(Object(C)) #1 {main} diff --git a/Zend/tests/type_declarations/strict_call_weak.phpt b/Zend/tests/type_declarations/strict_call_weak.phpt index d8dc93bc1edf8..e20524b2d51f8 100644 --- a/Zend/tests/type_declarations/strict_call_weak.phpt +++ b/Zend/tests/type_declarations/strict_call_weak.phpt @@ -13,7 +13,7 @@ require 'strict_call_weak_2.inc'; function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type int, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5 +Fatal error: Uncaught TypeError: function_declared_in_weak_mode() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): function_declared_in_weak_mode(1) #1 {main} diff --git a/Zend/tests/type_declarations/strict_call_weak_explicit.phpt b/Zend/tests/type_declarations/strict_call_weak_explicit.phpt index e083d586e62be..b6b382e5cce22 100644 --- a/Zend/tests/type_declarations/strict_call_weak_explicit.phpt +++ b/Zend/tests/type_declarations/strict_call_weak_explicit.phpt @@ -13,7 +13,7 @@ require 'strict_call_weak_explicit_2.inc'; function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type int, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5 +Fatal error: Uncaught TypeError: function_declared_in_weak_mode() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): function_declared_in_weak_mode(1) #1 {main} diff --git a/Zend/tests/type_declarations/typed_properties_078.phpt b/Zend/tests/type_declarations/typed_properties_078.phpt index c92ed5afc4b1c..07e9384b6f543 100644 --- a/Zend/tests/type_declarations/typed_properties_078.phpt +++ b/Zend/tests/type_declarations/typed_properties_078.phpt @@ -1,5 +1,5 @@ --TEST-- -Typed references must be kept track of and always be only the intersection of the types currently holding that reference +Typed references must be kept track of and always be only the intersection of the type currently holding that reference --FILE-- getMessage(); $msg = strstr($msg, ', called in', true); - $msg = str_replace('1 passed to {closure}()', '...', $msg); + $msg = str_replace('{closure}() expects argument #1', 'Argument ...', $msg); echo $msg; } echo "\n"; @@ -70,86 +70,86 @@ Type int|float: 42 => 42 42.0 => 42.0 INF => INF -"42" => Argument ... must be of type int|float, string given -"42.0" => Argument ... must be of type int|float, string given -"42x" => Argument ... must be of type int|float, string given -"x" => Argument ... must be of type int|float, string given -"" => Argument ... must be of type int|float, string given -true => Argument ... must be of type int|float, bool given -false => Argument ... must be of type int|float, bool given -null => Argument ... must be of type int|float, null given -[] => Argument ... must be of type int|float, array given -new stdClass => Argument ... must be of type int|float, object given -new WithToString => Argument ... must be of type int|float, object given +"42" => Argument ... ($arg) to be of type int|float, string given +"42.0" => Argument ... ($arg) to be of type int|float, string given +"42x" => Argument ... ($arg) to be of type int|float, string given +"x" => Argument ... ($arg) to be of type int|float, string given +"" => Argument ... ($arg) to be of type int|float, string given +true => Argument ... ($arg) to be of type int|float, bool given +false => Argument ... ($arg) to be of type int|float, bool given +null => Argument ... ($arg) to be of type int|float, null given +[] => Argument ... ($arg) to be of type int|float, array given +new stdClass => Argument ... ($arg) to be of type int|float, object given +new WithToString => Argument ... ($arg) to be of type int|float, object given Type int|float|false: 42 => 42 42.0 => 42.0 INF => INF -"42" => Argument ... must be of type int|float|false, string given -"42.0" => Argument ... must be of type int|float|false, string given -"42x" => Argument ... must be of type int|float|false, string given -"x" => Argument ... must be of type int|float|false, string given -"" => Argument ... must be of type int|float|false, string given -true => Argument ... must be of type int|float|false, bool given +"42" => Argument ... ($arg) to be of type int|float|false, string given +"42.0" => Argument ... ($arg) to be of type int|float|false, string given +"42x" => Argument ... ($arg) to be of type int|float|false, string given +"x" => Argument ... ($arg) to be of type int|float|false, string given +"" => Argument ... ($arg) to be of type int|float|false, string given +true => Argument ... ($arg) to be of type int|float|false, bool given false => false -null => Argument ... must be of type int|float|false, null given -[] => Argument ... must be of type int|float|false, array given -new stdClass => Argument ... must be of type int|float|false, object given -new WithToString => Argument ... must be of type int|float|false, object given +null => Argument ... ($arg) to be of type int|float|false, null given +[] => Argument ... ($arg) to be of type int|float|false, array given +new stdClass => Argument ... ($arg) to be of type int|float|false, object given +new WithToString => Argument ... ($arg) to be of type int|float|false, object given Type int|float|bool: 42 => 42 42.0 => 42.0 INF => INF -"42" => Argument ... must be of type int|float|bool, string given -"42.0" => Argument ... must be of type int|float|bool, string given -"42x" => Argument ... must be of type int|float|bool, string given -"x" => Argument ... must be of type int|float|bool, string given -"" => Argument ... must be of type int|float|bool, string given +"42" => Argument ... ($arg) to be of type int|float|bool, string given +"42.0" => Argument ... ($arg) to be of type int|float|bool, string given +"42x" => Argument ... ($arg) to be of type int|float|bool, string given +"x" => Argument ... ($arg) to be of type int|float|bool, string given +"" => Argument ... ($arg) to be of type int|float|bool, string given true => true false => false -null => Argument ... must be of type int|float|bool, null given -[] => Argument ... must be of type int|float|bool, array given -new stdClass => Argument ... must be of type int|float|bool, object given -new WithToString => Argument ... must be of type int|float|bool, object given +null => Argument ... ($arg) to be of type int|float|bool, null given +[] => Argument ... ($arg) to be of type int|float|bool, array given +new stdClass => Argument ... ($arg) to be of type int|float|bool, object given +new WithToString => Argument ... ($arg) to be of type int|float|bool, object given Type int|bool: 42 => 42 -42.0 => Argument ... must be of type int|bool, float given -INF => Argument ... must be of type int|bool, float given -"42" => Argument ... must be of type int|bool, string given -"42.0" => Argument ... must be of type int|bool, string given -"42x" => Argument ... must be of type int|bool, string given -"x" => Argument ... must be of type int|bool, string given -"" => Argument ... must be of type int|bool, string given +42.0 => Argument ... ($arg) to be of type int|bool, float given +INF => Argument ... ($arg) to be of type int|bool, float given +"42" => Argument ... ($arg) to be of type int|bool, string given +"42.0" => Argument ... ($arg) to be of type int|bool, string given +"42x" => Argument ... ($arg) to be of type int|bool, string given +"x" => Argument ... ($arg) to be of type int|bool, string given +"" => Argument ... ($arg) to be of type int|bool, string given true => true false => false -null => Argument ... must be of type int|bool, null given -[] => Argument ... must be of type int|bool, array given -new stdClass => Argument ... must be of type int|bool, object given -new WithToString => Argument ... must be of type int|bool, object given +null => Argument ... ($arg) to be of type int|bool, null given +[] => Argument ... ($arg) to be of type int|bool, array given +new stdClass => Argument ... ($arg) to be of type int|bool, object given +new WithToString => Argument ... ($arg) to be of type int|bool, object given Type int|string|null: 42 => 42 -42.0 => Argument ... must be of type string|int|null, float given -INF => Argument ... must be of type string|int|null, float given +42.0 => Argument ... ($arg) to be of type string|int|null, float given +INF => Argument ... ($arg) to be of type string|int|null, float given "42" => "42" "42.0" => "42.0" "42x" => "42x" "x" => "x" "" => "" -true => Argument ... must be of type string|int|null, bool given -false => Argument ... must be of type string|int|null, bool given +true => Argument ... ($arg) to be of type string|int|null, bool given +false => Argument ... ($arg) to be of type string|int|null, bool given null => null -[] => Argument ... must be of type string|int|null, array given -new stdClass => Argument ... must be of type string|int|null, object given -new WithToString => Argument ... must be of type string|int|null, object given +[] => Argument ... ($arg) to be of type string|int|null, array given +new stdClass => Argument ... ($arg) to be of type string|int|null, object given +new WithToString => Argument ... ($arg) to be of type string|int|null, object given Type string|bool: -42 => Argument ... must be of type string|bool, int given -42.0 => Argument ... must be of type string|bool, float given -INF => Argument ... must be of type string|bool, float given +42 => Argument ... ($arg) to be of type string|bool, int given +42.0 => Argument ... ($arg) to be of type string|bool, float given +INF => Argument ... ($arg) to be of type string|bool, float given "42" => "42" "42.0" => "42.0" "42x" => "42x" @@ -157,55 +157,55 @@ INF => Argument ... must be of type string|bool, float given "" => "" true => true false => false -null => Argument ... must be of type string|bool, null given -[] => Argument ... must be of type string|bool, array given -new stdClass => Argument ... must be of type string|bool, object given -new WithToString => Argument ... must be of type string|bool, object given +null => Argument ... ($arg) to be of type string|bool, null given +[] => Argument ... ($arg) to be of type string|bool, array given +new stdClass => Argument ... ($arg) to be of type string|bool, object given +new WithToString => Argument ... ($arg) to be of type string|bool, object given Type float|array: 42 => 42.0 42.0 => 42.0 INF => INF -"42" => Argument ... must be of type array|float, string given -"42.0" => Argument ... must be of type array|float, string given -"42x" => Argument ... must be of type array|float, string given -"x" => Argument ... must be of type array|float, string given -"" => Argument ... must be of type array|float, string given -true => Argument ... must be of type array|float, bool given -false => Argument ... must be of type array|float, bool given -null => Argument ... must be of type array|float, null given +"42" => Argument ... ($arg) to be of type array|float, string given +"42.0" => Argument ... ($arg) to be of type array|float, string given +"42x" => Argument ... ($arg) to be of type array|float, string given +"x" => Argument ... ($arg) to be of type array|float, string given +"" => Argument ... ($arg) to be of type array|float, string given +true => Argument ... ($arg) to be of type array|float, bool given +false => Argument ... ($arg) to be of type array|float, bool given +null => Argument ... ($arg) to be of type array|float, null given [] => [] -new stdClass => Argument ... must be of type array|float, object given -new WithToString => Argument ... must be of type array|float, object given +new stdClass => Argument ... ($arg) to be of type array|float, object given +new WithToString => Argument ... ($arg) to be of type array|float, object given Type string|array: -42 => Argument ... must be of type array|string, int given -42.0 => Argument ... must be of type array|string, float given -INF => Argument ... must be of type array|string, float given +42 => Argument ... ($arg) to be of type array|string, int given +42.0 => Argument ... ($arg) to be of type array|string, float given +INF => Argument ... ($arg) to be of type array|string, float given "42" => "42" "42.0" => "42.0" "42x" => "42x" "x" => "x" "" => "" -true => Argument ... must be of type array|string, bool given -false => Argument ... must be of type array|string, bool given -null => Argument ... must be of type array|string, null given +true => Argument ... ($arg) to be of type array|string, bool given +false => Argument ... ($arg) to be of type array|string, bool given +null => Argument ... ($arg) to be of type array|string, null given [] => [] -new stdClass => Argument ... must be of type array|string, object given -new WithToString => Argument ... must be of type array|string, object given +new stdClass => Argument ... ($arg) to be of type array|string, object given +new WithToString => Argument ... ($arg) to be of type array|string, object given Type bool|array: -42 => Argument ... must be of type array|bool, int given -42.0 => Argument ... must be of type array|bool, float given -INF => Argument ... must be of type array|bool, float given -"42" => Argument ... must be of type array|bool, string given -"42.0" => Argument ... must be of type array|bool, string given -"42x" => Argument ... must be of type array|bool, string given -"x" => Argument ... must be of type array|bool, string given -"" => Argument ... must be of type array|bool, string given +42 => Argument ... ($arg) to be of type array|bool, int given +42.0 => Argument ... ($arg) to be of type array|bool, float given +INF => Argument ... ($arg) to be of type array|bool, float given +"42" => Argument ... ($arg) to be of type array|bool, string given +"42.0" => Argument ... ($arg) to be of type array|bool, string given +"42x" => Argument ... ($arg) to be of type array|bool, string given +"x" => Argument ... ($arg) to be of type array|bool, string given +"" => Argument ... ($arg) to be of type array|bool, string given true => true false => false -null => Argument ... must be of type array|bool, null given +null => Argument ... ($arg) to be of type array|bool, null given [] => [] -new stdClass => Argument ... must be of type array|bool, object given -new WithToString => Argument ... must be of type array|bool, object given +new stdClass => Argument ... ($arg) to be of type array|bool, object given +new WithToString => Argument ... ($arg) to be of type array|bool, object given diff --git a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt index 441eaab854804..c48e95f640e74 100644 --- a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt +++ b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt @@ -35,7 +35,7 @@ function test(string $type, array $values) { } catch (TypeError $e) { $msg = $e->getMessage(); $msg = strstr($msg, ', called in', true); - $msg = str_replace('1 passed to {closure}()', '...', $msg); + $msg = str_replace('{closure}() expects argument #1', 'Argument ...', $msg); echo $msg; } echo "\n"; @@ -71,14 +71,14 @@ INF => INF "42" => 42 "42.0" => 42.0 "42x" => 42 (A non well formed numeric value encountered) -"x" => Argument ... must be of type int|float, string given -"" => Argument ... must be of type int|float, string given +"x" => Argument ... ($arg) to be of type int|float, string given +"" => Argument ... ($arg) to be of type int|float, string given true => 1 false => 0 -null => Argument ... must be of type int|float, null given -[] => Argument ... must be of type int|float, array given -new stdClass => Argument ... must be of type int|float, object given -new WithToString => Argument ... must be of type int|float, object given +null => Argument ... ($arg) to be of type int|float, null given +[] => Argument ... ($arg) to be of type int|float, array given +new stdClass => Argument ... ($arg) to be of type int|float, object given +new WithToString => Argument ... ($arg) to be of type int|float, object given Type int|float|false: 42 => 42 @@ -87,14 +87,14 @@ INF => INF "42" => 42 "42.0" => 42.0 "42x" => 42 (A non well formed numeric value encountered) -"x" => Argument ... must be of type int|float|false, string given -"" => Argument ... must be of type int|float|false, string given +"x" => Argument ... ($arg) to be of type int|float|false, string given +"" => Argument ... ($arg) to be of type int|float|false, string given true => 1 false => false -null => Argument ... must be of type int|float|false, null given -[] => Argument ... must be of type int|float|false, array given -new stdClass => Argument ... must be of type int|float|false, object given -new WithToString => Argument ... must be of type int|float|false, object given +null => Argument ... ($arg) to be of type int|float|false, null given +[] => Argument ... ($arg) to be of type int|float|false, array given +new stdClass => Argument ... ($arg) to be of type int|float|false, object given +new WithToString => Argument ... ($arg) to be of type int|float|false, object given Type int|float|bool: 42 => 42 @@ -107,10 +107,10 @@ INF => INF "" => false true => true false => false -null => Argument ... must be of type int|float|bool, null given -[] => Argument ... must be of type int|float|bool, array given -new stdClass => Argument ... must be of type int|float|bool, object given -new WithToString => Argument ... must be of type int|float|bool, object given +null => Argument ... ($arg) to be of type int|float|bool, null given +[] => Argument ... ($arg) to be of type int|float|bool, array given +new stdClass => Argument ... ($arg) to be of type int|float|bool, object given +new WithToString => Argument ... ($arg) to be of type int|float|bool, object given Type int|bool: 42 => 42 @@ -123,10 +123,10 @@ INF => true "" => false true => true false => false -null => Argument ... must be of type int|bool, null given -[] => Argument ... must be of type int|bool, array given -new stdClass => Argument ... must be of type int|bool, object given -new WithToString => Argument ... must be of type int|bool, object given +null => Argument ... ($arg) to be of type int|bool, null given +[] => Argument ... ($arg) to be of type int|bool, array given +new stdClass => Argument ... ($arg) to be of type int|bool, object given +new WithToString => Argument ... ($arg) to be of type int|bool, object given Type int|string|null: 42 => 42 @@ -140,8 +140,8 @@ INF => "INF" true => 1 false => 0 null => null -[] => Argument ... must be of type string|int|null, array given -new stdClass => Argument ... must be of type string|int|null, object given +[] => Argument ... ($arg) to be of type string|int|null, array given +new stdClass => Argument ... ($arg) to be of type string|int|null, object given new WithToString => "__toString()" Type string|bool: @@ -155,9 +155,9 @@ INF => "INF" "" => "" true => true false => false -null => Argument ... must be of type string|bool, null given -[] => Argument ... must be of type string|bool, array given -new stdClass => Argument ... must be of type string|bool, object given +null => Argument ... ($arg) to be of type string|bool, null given +[] => Argument ... ($arg) to be of type string|bool, array given +new stdClass => Argument ... ($arg) to be of type string|bool, object given new WithToString => "__toString()" Type float|array: @@ -167,14 +167,14 @@ INF => INF "42" => 42.0 "42.0" => 42.0 "42x" => 42.0 (A non well formed numeric value encountered) -"x" => Argument ... must be of type array|float, string given -"" => Argument ... must be of type array|float, string given +"x" => Argument ... ($arg) to be of type array|float, string given +"" => Argument ... ($arg) to be of type array|float, string given true => 1.0 false => 0.0 -null => Argument ... must be of type array|float, null given +null => Argument ... ($arg) to be of type array|float, null given [] => [] -new stdClass => Argument ... must be of type array|float, object given -new WithToString => Argument ... must be of type array|float, object given +new stdClass => Argument ... ($arg) to be of type array|float, object given +new WithToString => Argument ... ($arg) to be of type array|float, object given Type string|array: 42 => "42" @@ -187,9 +187,9 @@ INF => "INF" "" => "" true => "1" false => "" -null => Argument ... must be of type array|string, null given +null => Argument ... ($arg) to be of type array|string, null given [] => [] -new stdClass => Argument ... must be of type array|string, object given +new stdClass => Argument ... ($arg) to be of type array|string, object given new WithToString => "__toString()" Type bool|array: @@ -203,7 +203,7 @@ INF => true "" => false true => true false => false -null => Argument ... must be of type array|bool, null given +null => Argument ... ($arg) to be of type array|bool, null given [] => [] -new stdClass => Argument ... must be of type array|bool, object given -new WithToString => Argument ... must be of type array|bool, object given +new stdClass => Argument ... ($arg) to be of type array|bool, object given +new WithToString => Argument ... ($arg) to be of type array|bool, object given diff --git a/Zend/tests/type_declarations/weak_include_strict.phpt b/Zend/tests/type_declarations/weak_include_strict.phpt index 52f5f55cdb4a8..61f33818e2420 100644 --- a/Zend/tests/type_declarations/weak_include_strict.phpt +++ b/Zend/tests/type_declarations/weak_include_strict.phpt @@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc'; // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type int, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5 +Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): takes_int(1) #1 %s(%d): require('%s') diff --git a/Zend/tests/typehints/or_null.phpt b/Zend/tests/typehints/or_null.phpt index 552db7d058bc4..55714620c28b6 100644 --- a/Zend/tests/typehints/or_null.phpt +++ b/Zend/tests/typehints/or_null.phpt @@ -219,99 +219,99 @@ try { ?> --EXPECTF-- -TypeError: Argument 1 passed to unloadedClass() must be an instance of I\Dont\Exist or null, instance of stdClass given, called in %s on line 8 and defined in %s:5 +TypeError: unloadedClass() expects argument #1 ($param) to be of type ?I\Dont\Exist, stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(8): unloadedClass(Object(stdClass)) #1 {main} -TypeError: Argument 1 passed to loadedClass() must be an instance of RealClass or null, instance of stdClass given, called in %s on line 20 and defined in %s:16 +TypeError: loadedClass() expects argument #1 ($param) to be of type ?RealClass, stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(20): loadedClass(Object(stdClass)) #1 {main} -TypeError: Argument 1 passed to loadedInterface() must implement interface RealInterface or be null, instance of stdClass given, called in %s on line 26 and defined in %s:17 +TypeError: loadedInterface() expects argument #1 ($param) to be of type ?RealInterface, stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(26): loadedInterface(Object(stdClass)) #1 {main} -TypeError: Argument 1 passed to unloadedClass() must be an instance of I\Dont\Exist or null, int given, called in %s on line 32 and defined in %s:5 +TypeError: unloadedClass() expects argument #1 ($param) to be of type ?I\Dont\Exist, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(32): unloadedClass(1) #1 {main} -TypeError: Argument 1 passed to loadedClass() must be an instance of RealClass or null, int given, called in %s on line 38 and defined in %s:16 +TypeError: loadedClass() expects argument #1 ($param) to be of type ?RealClass, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(38): loadedClass(1) #1 {main} -TypeError: Argument 1 passed to loadedInterface() must implement interface RealInterface or be null, int given, called in %s on line 44 and defined in %s:17 +TypeError: loadedInterface() expects argument #1 ($param) to be of type ?RealInterface, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(44): loadedInterface(1) #1 {main} -TypeError: Argument 1 passed to callableF() must be callable or null, int given, called in %s on line 52 and defined in %s:49 +TypeError: callableF() expects argument #1 ($param) to be of type ?callable, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(52): callableF(1) #1 {main} -TypeError: Argument 1 passed to iterableF() must be iterable or null, int given, called in %s on line 60 and defined in %s:57 +TypeError: iterableF() expects argument #1 ($param) to be of type ?iterable, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(60): iterableF(1) #1 {main} -TypeError: Argument 1 passed to intF() must be of the type int or null, object given, called in %s on line 68 and defined in %s:65 +TypeError: intF() expects argument #1 ($param) to be of type ?int, object given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(68): intF(Object(stdClass)) #1 {main} -TypeError: Return value of returnUnloadedClass() must be an instance of I\Dont\Exist or null, instance of stdClass returned in %s:74 +TypeError: Return value of returnUnloadedClass() must be of type ?I\Dont\Exist, stdClass returned in %s:74 Stack trace: #0 %s(78): returnUnloadedClass() #1 {main} -TypeError: Return value of returnLoadedClass() must be an instance of RealClass or null, instance of stdClass returned in %s:84 +TypeError: Return value of returnLoadedClass() must be of type ?RealClass, stdClass returned in %s:84 Stack trace: #0 %s(88): returnLoadedClass() #1 {main} -TypeError: Return value of returnLoadedInterface() must implement interface RealInterface or be null, instance of stdClass returned in %s:94 +TypeError: Return value of returnLoadedInterface() must be of type ?RealInterface, stdClass returned in %s:94 Stack trace: #0 %s(98): returnLoadedInterface() #1 {main} -TypeError: Return value of returnUnloadedClassScalar() must be an instance of I\Dont\Exist or null, int returned in %s:104 +TypeError: Return value of returnUnloadedClassScalar() must be of type ?I\Dont\Exist, int returned in %s:104 Stack trace: #0 %s(108): returnUnloadedClassScalar() #1 {main} -TypeError: Return value of returnLoadedClassScalar() must be an instance of RealClass or null, int returned in %s:114 +TypeError: Return value of returnLoadedClassScalar() must be of type ?RealClass, int returned in %s:114 Stack trace: #0 %s(118): returnLoadedClassScalar() #1 {main} -TypeError: Return value of returnLoadedInterfaceScalar() must implement interface RealInterface or be null, int returned in %s:124 +TypeError: Return value of returnLoadedInterfaceScalar() must be of type ?RealInterface, int returned in %s:124 Stack trace: #0 %s(128): returnLoadedInterfaceScalar() #1 {main} -TypeError: Return value of returnCallable() must be callable or null, int returned in %s:134 +TypeError: Return value of returnCallable() must be of type ?callable, int returned in %s:134 Stack trace: #0 %s(138): returnCallable() #1 {main} -TypeError: Return value of returnIterable() must be iterable or null, int returned in %s:144 +TypeError: Return value of returnIterable() must be of type ?iterable, int returned in %s:144 Stack trace: #0 %s(148): returnIterable() #1 {main} -TypeError: Return value of returnInt() must be of the type int or null, object returned in %s:154 +TypeError: Return value of returnInt() must be of type ?int, object returned in %s:154 Stack trace: #0 %s(158): returnInt() #1 {main} -TypeError: Return value of returnMissingUnloadedClass() must be an instance of I\Dont\Exist or null, none returned in %s:164 +TypeError: Return value of returnMissingUnloadedClass() must be of type ?I\Dont\Exist, none returned in %s:164 Stack trace: #0 %s(167): returnMissingUnloadedClass() #1 {main} -TypeError: Return value of returnMissingLoadedClass() must be an instance of RealClass or null, none returned in %s:173 +TypeError: Return value of returnMissingLoadedClass() must be of type ?RealClass, none returned in %s:173 Stack trace: #0 %s(176): returnMissingLoadedClass() #1 {main} -TypeError: Return value of returnMissingLoadedInterface() must implement interface RealInterface or be null, none returned in %s:182 +TypeError: Return value of returnMissingLoadedInterface() must be of type ?RealInterface, none returned in %s:182 Stack trace: #0 %s(185): returnMissingLoadedInterface() #1 {main} -TypeError: Return value of returnMissingCallable() must be callable or null, none returned in %s:191 +TypeError: Return value of returnMissingCallable() must be of type ?callable, none returned in %s:191 Stack trace: #0 %s(194): returnMissingCallable() #1 {main} -TypeError: Return value of returnMissingIterable() must be iterable or null, none returned in %s:200 +TypeError: Return value of returnMissingIterable() must be of type ?iterable, none returned in %s:200 Stack trace: #0 %s(203): returnMissingIterable() #1 {main} -TypeError: Return value of returnMissingInt() must be of the type int or null, none returned in %s:209 +TypeError: Return value of returnMissingInt() must be of type ?int, none returned in %s:209 Stack trace: #0 %s(212): returnMissingInt() #1 {main} diff --git a/Zend/tests/variadic/typehint_error.phpt b/Zend/tests/variadic/typehint_error.phpt index d9a5ea291f108..712e21d3ac1f1 100644 --- a/Zend/tests/variadic/typehint_error.phpt +++ b/Zend/tests/variadic/typehint_error.phpt @@ -33,7 +33,7 @@ array(3) { } } -Fatal error: Uncaught TypeError: Argument 3 passed to test() must be of the type array, int given, called in %s:%d +Fatal error: Uncaught TypeError: test() expects argument #3 ($args) to be of type array, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): test(Array, Array, 2) #1 {main} diff --git a/Zend/tests/variadic/typehint_suppressed_error.phpt b/Zend/tests/variadic/typehint_suppressed_error.phpt index e7906ea2f2f68..d1168f4025deb 100644 --- a/Zend/tests/variadic/typehint_suppressed_error.phpt +++ b/Zend/tests/variadic/typehint_suppressed_error.phpt @@ -15,4 +15,4 @@ try { ?> --EXPECTF-- -string(%d) "Argument 3 passed to test() must be of the type array, int given, called in %s on line %d" +string(%d) "test() expects argument #3 ($args) to be of type array, int given, called in %s on line %d" diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ed8440f1047ea..595208033b189 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -207,8 +207,6 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int min_ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, zend_expected_type expected_type, zval *arg) /* {{{ */ { - const char *space; - const char *class_name; static const char * const expected_error[] = { Z_EXPECTED_TYPES(Z_EXPECTED_TYPE_STR) NULL @@ -217,38 +215,55 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, z if (EG(exception)) { return; } - class_name = get_active_class_name(&space); - zend_type_error("%s%s%s() expects parameter %d to be %s, %s given", - class_name, space, get_active_function_name(), num, expected_error[expected_type], zend_zval_type_name(arg)); + + zend_argument_type_error(num, "to be %s, %s given", expected_error[expected_type], zend_zval_type_name(arg)); } /* }}} */ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, const char *name, zval *arg) /* {{{ */ { - const char *space; - const char *class_name; - if (EG(exception)) { return; } - class_name = get_active_class_name(&space); - zend_type_error("%s%s%s() expects parameter %d to be %s, %s given", - class_name, space, get_active_function_name(), num, name, zend_zval_type_name(arg)); + + zend_argument_type_error(num, "to be of type %s, %s given", name, zend_zval_type_name(arg)); } /* }}} */ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *error) /* {{{ */ +{ + if (EG(exception)) { + return; + } + + zend_argument_type_error(num, "to be a valid callback, %s", error); + efree(error); +} +/* }}} */ + +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_error(zend_class_entry *error_ce, uint32_t arg_num, const char *format, ...) /* {{{ */ { const char *space; const char *class_name; - + const char *arg_name; + char *message = NULL; if (EG(exception)) { return; } + class_name = get_active_class_name(&space); - zend_type_error("%s%s%s() expects parameter %d to be a valid callback, %s", - class_name, space, get_active_function_name(), num, error); - efree(error); + arg_name = get_active_function_arg_name(arg_num); + + va_list va; + va_start(va, format); + zend_vspprintf(&message, 0, format, va); + va_end(va); + + zend_throw_error(error_ce, "%s%s%s() expects argument #%d%s%s%s %s", + class_name, space, get_active_function_name(), arg_num, + arg_name ? " ($" : "", arg_name ? arg_name : "", arg_name ? ")" : "", message + ); + efree(message); } /* }}} */ @@ -268,23 +283,13 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pc *pce = zend_lookup_class(Z_STR_P(arg)); if (ce_base) { if ((!*pce || !instanceof_function(*pce, ce_base))) { - const char *space; - const char *class_name = get_active_class_name(&space); - - zend_type_error("%s%s%s() expects parameter %d to be a class name derived from %s, '%s' given", - class_name, space, get_active_function_name(), num, - ZSTR_VAL(ce_base->name), Z_STRVAL_P(arg)); + zend_argument_type_error(num, "to be a class name derived from %s, '%s' given", ZSTR_VAL(ce_base->name), Z_STRVAL_P(arg)); *pce = NULL; return 0; } } if (!*pce) { - const char *space; - const char *class_name = get_active_class_name(&space); - - zend_type_error("%s%s%s() expects parameter %d to be a valid class name, '%s' given", - class_name, space, get_active_function_name(), num, - Z_STRVAL_P(arg)); + zend_argument_type_error(num, "to be a valid class name, '%s' given", Z_STRVAL_P(arg)); return 0; } return 1; @@ -547,7 +552,8 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons char **p = va_arg(*va, char **); size_t *pl = va_arg(*va, size_t *); if (!zend_parse_arg_path(arg, p, pl, check_null)) { - return "a valid path"; + zend_spprintf(error, 0, "a valid path, %s given", zend_zval_type_name(arg)); + return ""; } } break; @@ -556,7 +562,8 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons { zend_string **str = va_arg(*va, zend_string **); if (!zend_parse_arg_path_str(arg, str, check_null)) { - return "a valid path"; + zend_spprintf(error, 0, "a valid path, %s given", zend_zval_type_name(arg)); + return ""; } } break; @@ -653,7 +660,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons } if (!try_convert_to_string(arg)) { *pce = NULL; - return "valid class name"; + return "a valid class name"; } if ((lookup = zend_lookup_class(Z_STR_P(arg))) == NULL) { @@ -663,14 +670,14 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons } if (ce_base) { if ((!*pce || !instanceof_function(*pce, ce_base))) { - zend_spprintf(error, 0, "to be a class name derived from %s, '%s' given", + zend_spprintf(error, 0, "a class name derived from %s, '%s' given", ZSTR_VAL(ce_base->name), Z_STRVAL_P(arg)); *pce = NULL; return ""; } } if (!*pce) { - zend_spprintf(error, 0, "to be a valid class name, '%s' given", + zend_spprintf(error, 0, "a valid class name, '%s' given", Z_STRVAL_P(arg)); return ""; } @@ -697,11 +704,11 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons } if (is_callable_error) { - zend_spprintf(error, 0, "to be a valid callback, %s", is_callable_error); + zend_spprintf(error, 0, "a valid callback, %s", is_callable_error); efree(is_callable_error); return ""; } else { - return "valid callback"; + return "a valid callback"; } } @@ -737,19 +744,16 @@ static int zend_parse_arg(int arg_num, zval *arg, va_list *va, const char **spec return FAILURE; } if (!(flags & ZEND_PARSE_PARAMS_QUIET) && (*expected_type || error)) { - const char *space; - const char *class_name = get_active_class_name(&space); - if (error) { - zend_type_error("%s%s%s() expects parameter %d %s", - class_name, space, get_active_function_name(), arg_num, error); + zend_argument_type_error(arg_num, "to be %s", error); efree(error); } else { - zend_type_error("%s%s%s() expects parameter %d to be %s, %s given", - class_name, space, get_active_function_name(), arg_num, expected_type, - zend_zval_type_name(arg)); + zend_argument_type_error(arg_num, "to be of type %s, %s given", expected_type, zend_zval_type_name(arg)); } + } else if (error) { + efree(error); } + return FAILURE; } diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 2f1b58eb75528..9fd656b276db9 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -1124,17 +1124,19 @@ static zend_always_inline zval *zend_try_array_init(zval *zv) #define FAST_ZPP 1 #define Z_EXPECTED_TYPES(_) \ - _(Z_EXPECTED_LONG, "int") \ - _(Z_EXPECTED_BOOL, "bool") \ - _(Z_EXPECTED_STRING, "string") \ - _(Z_EXPECTED_ARRAY, "array") \ - _(Z_EXPECTED_FUNC, "valid callback") \ - _(Z_EXPECTED_RESOURCE, "resource") \ + _(Z_EXPECTED_LONG, "of type int") \ + _(Z_EXPECTED_BOOL, "of type bool") \ + _(Z_EXPECTED_STRING, "of type string") \ + _(Z_EXPECTED_ARRAY, "of type array") \ + _(Z_EXPECTED_FUNC, "a valid callback") \ + _(Z_EXPECTED_RESOURCE, "of type resource") \ _(Z_EXPECTED_PATH, "a valid path") \ - _(Z_EXPECTED_OBJECT, "object") \ - _(Z_EXPECTED_DOUBLE, "float") \ - _(Z_EXPECTED_NUMBER, "int or float") \ - _(Z_EXPECTED_STRING_OR_ARRAY, "string or array") \ + _(Z_EXPECTED_OBJECT, "of type object") \ + _(Z_EXPECTED_DOUBLE, "of type float") \ + _(Z_EXPECTED_NUMBER, "of type int|float") \ + _(Z_EXPECTED_STRING_OR_ARRAY, "of type string|array") \ + +#define Z_EXPECTED_TYPE #define Z_EXPECTED_TYPE_ENUM(id, str) id, #define Z_EXPECTED_TYPE_STR(id, str) str, @@ -1149,6 +1151,11 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int min_ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, zend_expected_type expected_type, zval *arg); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, const char *name, zval *arg); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *error); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_error(zend_class_entry *error_ce, uint32_t arg_num, const char *format, ...); +#define zend_argument_type_error(arg_num, ...) \ + zend_argument_error(zend_ce_type_error, arg_num, __VA_ARGS__) +#define zend_argument_value_error(arg_num, ...) \ + zend_argument_error(zend_ce_value_error, arg_num, __VA_ARGS__) #define ZPP_ERROR_OK 0 #define ZPP_ERROR_FAILURE 1 diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 80651a880e606..2ec192c03556e 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1388,8 +1388,7 @@ ZEND_FUNCTION(set_error_handler) if (Z_TYPE_P(error_handler) != IS_NULL) { /* NULL == unset */ if (!zend_is_callable(error_handler, 0, NULL)) { zend_string *error_handler_name = zend_get_callable_name(error_handler); - zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback", - get_active_function_name(), error_handler_name?ZSTR_VAL(error_handler_name):"unknown"); + zend_error(E_WARNING, "%s() expects argument #1 ($error_handler) to be a valid callback", get_active_function_name()); zend_string_release_ex(error_handler_name, 0); return; } @@ -1453,8 +1452,7 @@ ZEND_FUNCTION(set_exception_handler) if (Z_TYPE_P(exception_handler) != IS_NULL) { /* NULL == unset */ if (!zend_is_callable(exception_handler, 0, NULL)) { zend_string *exception_handler_name = zend_get_callable_name(exception_handler); - zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback", - get_active_function_name(), exception_handler_name?ZSTR_VAL(exception_handler_name):"unknown"); + zend_error(E_WARNING, "%s() expects argument #1 ($exception_handler) to be a valid callback", get_active_function_name()); zend_string_release_ex(exception_handler_name, 0); return; } diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 3fbbcef0feb67..7da6810a111eb 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -640,30 +640,12 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_erro } } -/* Test used to preserve old error messages for non-union types. - * We might want to canonicalize all type errors instead. */ -static zend_bool is_union_type(zend_type type) { - if (ZEND_TYPE_HAS_LIST(type)) { - return 1; - } - uint32_t type_mask_without_null = ZEND_TYPE_PURE_MASK_WITHOUT_NULL(type); - if (ZEND_TYPE_HAS_CLASS(type)) { - return type_mask_without_null != 0; - } - if (type_mask_without_null == MAY_BE_BOOL) { - return 0; - } - /* Check that only one bit is set. */ - return (type_mask_without_null & (type_mask_without_null - 1)) != 0; -} - static ZEND_COLD void zend_verify_type_error_common( const zend_function *zf, const zend_arg_info *arg_info, void **cache_slot, zval *value, const char **fname, const char **fsep, const char **fclass, - zend_string **need_msg, const char **given_msg, const char **given_kind) + zend_string **need_msg, const char **given_kind) { - smart_str str = {0}; *fname = ZSTR_VAL(zf->common.function_name); if (zf->common.scope) { *fsep = "::"; @@ -673,90 +655,18 @@ static ZEND_COLD void zend_verify_type_error_common( *fclass = ""; } - if (is_union_type(arg_info->type)) { - zend_string *type_str = zend_type_to_string_resolved(arg_info->type, zf->common.scope); - smart_str_appends(&str, "be of type "); - smart_str_append(&str, type_str); - zend_string_release(type_str); - } else if (ZEND_TYPE_HAS_CLASS(arg_info->type)) { - zend_bool is_interface = 0; - zend_class_entry *ce = *cache_slot; - if (!ce) { - ce = zend_fetch_class(ZEND_TYPE_NAME(arg_info->type), - (ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD)); - } - if (ce) { - if (ce->ce_flags & ZEND_ACC_INTERFACE) { - smart_str_appends(&str, "implement interface "); - is_interface = 1; - } else { - smart_str_appends(&str, "be an instance of "); - } - smart_str_append(&str, ce->name); - } else { - /* We don't know whether it's a class or interface, assume it's a class */ - smart_str_appends(&str, "be an instance of "); - smart_str_append(&str, ZEND_TYPE_NAME(arg_info->type)); - } - - if (ZEND_TYPE_ALLOW_NULL(arg_info->type)) { - smart_str_appends(&str, is_interface ? " or be null" : " or null"); - } - } else { - uint32_t type_mask = ZEND_TYPE_PURE_MASK_WITHOUT_NULL(arg_info->type); - switch (type_mask) { - case MAY_BE_OBJECT: - smart_str_appends(&str, "be an object"); - break; - case MAY_BE_CALLABLE: - smart_str_appends(&str, "be callable"); - break; - case MAY_BE_ITERABLE: - smart_str_appends(&str, "be iterable"); - break; - case MAY_BE_STATIC: { - zend_class_entry *called_scope = zend_get_called_scope(EG(current_execute_data)); - smart_str_appends(&str, "be an instance of "); - if (called_scope) { - smart_str_append(&str, called_scope->name); - } else { - smart_str_appends(&str, "static"); - } - break; - } - default: - { - /* Hack to print the type without null */ - zend_type type = arg_info->type; - ZEND_TYPE_FULL_MASK(type) &= ~MAY_BE_NULL; - zend_string *type_str = zend_type_to_string(type); - smart_str_appends(&str, "be of the type "); - smart_str_append(&str, type_str); - zend_string_release(type_str); - break; - } - } - - if (ZEND_TYPE_ALLOW_NULL(arg_info->type)) { - smart_str_appends(&str, " or null"); - } - } - - *need_msg = smart_str_extract(&str); + *need_msg = zend_type_to_string_resolved(arg_info->type, zf->common.scope); if (value) { zend_bool has_class = ZEND_TYPE_HAS_CLASS(arg_info->type) || (ZEND_TYPE_FULL_MASK(arg_info->type) & MAY_BE_STATIC); if (has_class && Z_TYPE_P(value) == IS_OBJECT) { - *given_msg = "instance of "; *given_kind = ZSTR_VAL(Z_OBJCE_P(value)->name); } else { - *given_msg = zend_zval_type_name(value); - *given_kind = ""; + *given_kind = zend_zval_type_name(value); } } else { - *given_msg = "none"; - *given_kind = ""; + *given_kind = "none"; } } @@ -767,7 +677,7 @@ ZEND_API ZEND_COLD void zend_verify_arg_error( zend_execute_data *ptr = EG(current_execute_data)->prev_execute_data; const char *fname, *fsep, *fclass; zend_string *need_msg; - const char *given_msg, *given_kind; + const char *given_msg; if (EG(exception)) { /* The type verification itself might have already thrown an exception @@ -778,18 +688,20 @@ ZEND_API ZEND_COLD void zend_verify_arg_error( if (value) { zend_verify_type_error_common( zf, arg_info, cache_slot, value, - &fname, &fsep, &fclass, &need_msg, &given_msg, &given_kind); + &fname, &fsep, &fclass, &need_msg, &given_msg); if (zf->common.type == ZEND_USER_FUNCTION) { if (ptr && ptr->func && ZEND_USER_CODE(ptr->func->common.type)) { - zend_type_error("Argument %d passed to %s%s%s() must %s, %s%s given, called in %s on line %d", - arg_num, fclass, fsep, fname, ZSTR_VAL(need_msg), given_msg, given_kind, + zend_type_error("%s%s%s() expects argument #%d ($%s) to be of type %s, %s given, called in %s on line %d", + fclass, fsep, fname, arg_num, ZSTR_VAL(arg_info->name), ZSTR_VAL(need_msg), given_msg, ZSTR_VAL(ptr->func->op_array.filename), ptr->opline->lineno); } else { - zend_type_error("Argument %d passed to %s%s%s() must %s, %s%s given", arg_num, fclass, fsep, fname, ZSTR_VAL(need_msg), given_msg, given_kind); + zend_type_error("%s%s%s() expects argument #%d ($%s) to be of type %s, %s given", + fclass, fsep, fname, arg_num, ZSTR_VAL(arg_info->name), ZSTR_VAL(need_msg), given_msg); } } else { - zend_type_error("Argument %d passed to %s%s%s() must %s, %s%s given", arg_num, fclass, fsep, fname, ZSTR_VAL(need_msg), given_msg, given_kind); + zend_type_error("%s%s%s() expects argument #%d ($%s) to be of type %s, %s given", + fclass, fsep, fname, arg_num, ((zend_internal_arg_info*) arg_info)->name, ZSTR_VAL(need_msg), given_msg); } zend_string_release(need_msg); @@ -1259,14 +1171,14 @@ ZEND_API ZEND_COLD void zend_verify_return_error( const zend_arg_info *arg_info = &zf->common.arg_info[-1]; const char *fname, *fsep, *fclass; zend_string *need_msg; - const char *given_msg, *given_kind; + const char *given_msg; zend_verify_type_error_common( zf, arg_info, cache_slot, value, - &fname, &fsep, &fclass, &need_msg, &given_msg, &given_kind); + &fname, &fsep, &fclass, &need_msg, &given_msg); - zend_type_error("Return value of %s%s%s() must %s, %s%s returned", - fclass, fsep, fname, ZSTR_VAL(need_msg), given_msg, given_kind); + zend_type_error("Return value of %s%s%s() must be of type %s, %s returned", + fclass, fsep, fname, ZSTR_VAL(need_msg), given_msg); zend_string_release(need_msg); } @@ -1278,14 +1190,14 @@ static ZEND_COLD void zend_verify_internal_return_error( const zend_arg_info *arg_info = &zf->common.arg_info[-1]; const char *fname, *fsep, *fclass; zend_string *need_msg; - const char *given_msg, *given_kind; + const char *given_msg; zend_verify_type_error_common( zf, arg_info, cache_slot, value, - &fname, &fsep, &fclass, &need_msg, &given_msg, &given_kind); + &fname, &fsep, &fclass, &need_msg, &given_msg); - zend_error_noreturn(E_CORE_ERROR, "Return value of %s%s%s() must %s, %s%s returned", - fclass, fsep, fname, ZSTR_VAL(need_msg), given_msg, given_kind); + zend_error_noreturn(E_CORE_ERROR, "Return value of %s%s%s() must be of type %s, %s returned", + fclass, fsep, fname, ZSTR_VAL(need_msg), given_msg); } static ZEND_COLD void zend_verify_void_return_error(const zend_function *zf, const char *returned_msg, const char *returned_kind) @@ -2011,11 +1923,17 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_non_static_method_cal static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_param_must_be_ref(const zend_function *func, uint32_t arg_num) { - zend_error(E_WARNING, "Parameter %d to %s%s%s() expected to be a reference, value given", - arg_num, + const char *arg_name = get_function_arg_name(func, arg_num); + + zend_error(E_WARNING, "%s%s%s() expects argument #%d%s%s%s to be passed by reference, value given", func->common.scope ? ZSTR_VAL(func->common.scope->name) : "", func->common.scope ? "::" : "", - ZSTR_VAL(func->common.function_name)); + ZSTR_VAL(func->common.function_name), + arg_num, + arg_name ? " ($" : "", + arg_name ? arg_name : "", + arg_name ? ")" : "" + ); } static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_use_scalar_as_array(void) @@ -2632,7 +2550,7 @@ static ZEND_COLD void ZEND_FASTCALL zend_array_key_exists_error( ZVAL_UNDEFINED_OP2(); } if (!EG(exception)) { - zend_type_error("array_key_exists() expects parameter 2 to be array, %s given", + zend_type_error("array_key_exists() expects argument #2 ($array) to be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(subject))); } } diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index f29a5eb050229..8c4f928e3392c 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -287,6 +287,8 @@ static zend_always_inline void zend_vm_stack_free_call_frame(zend_execute_data * /* services */ ZEND_API const char *get_active_class_name(const char **space); ZEND_API const char *get_active_function_name(void); +ZEND_API const char *get_active_function_arg_name(uint32_t arg_num); +ZEND_API const char *get_function_arg_name(const zend_function *func, uint32_t arg_num); ZEND_API const char *zend_get_executed_filename(void); ZEND_API zend_string *zend_get_executed_filename_ex(void); ZEND_API uint32_t zend_get_executed_lineno(void); diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index e2410cf6afe96..80d0cf26ee661 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -488,6 +488,37 @@ ZEND_API const char *get_active_function_name(void) /* {{{ */ } /* }}} */ +ZEND_API const char *get_active_function_arg_name(uint32_t arg_num) /* {{{ */ +{ + zend_function *func; + + if (!zend_is_executing()) { + return NULL; + } + + func = EG(current_execute_data)->func; + + return get_function_arg_name(func, arg_num); +} +/* }}} */ + +ZEND_API const char *get_function_arg_name(const zend_function *func, uint32_t arg_num) /* {{{ */ +{ + if (!func || func->common.num_args < arg_num) { + return NULL; + } + + switch (func->type) { + case ZEND_USER_FUNCTION: + return ZSTR_VAL(func->common.arg_info[arg_num - 1].name); + case ZEND_INTERNAL_FUNCTION: + return ((zend_internal_arg_info*) func->common.arg_info)[arg_num - 1].name; + default: + return NULL; + } +} +/* }}} */ + ZEND_API const char *zend_get_executed_filename(void) /* {{{ */ { zend_execute_data *ex = EG(current_execute_data); @@ -717,11 +748,18 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) / } else if (!ARG_MAY_BE_SENT_BY_REF(func, i + 1)) { /* By-value send is not allowed -- emit a warning, * but still perform the call with a by-value send. */ + const char *arg_name = get_function_arg_name(func, i + 1); + zend_error(E_WARNING, - "Parameter %d to %s%s%s() expected to be a reference, value given", i+1, + "%s%s%s() expects argument #%d%s%s%s to be passed by reference, value given", func->common.scope ? ZSTR_VAL(func->common.scope->name) : "", func->common.scope ? "::" : "", - ZSTR_VAL(func->common.function_name)); + ZSTR_VAL(func->common.function_name), + i+1, + arg_name ? " ($" : "", + arg_name ? arg_name : "", + arg_name ? ")" : "" + ); if (UNEXPECTED(EG(exception))) { ZEND_CALL_NUM_ARGS(call) = i; zend_vm_stack_free_args(call); diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 1ecb226042062..7f0de717a4bb1 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3775,7 +3775,7 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV, NUM) init_func_run_time_cache(&func->op_array); } } else { - zend_type_error("%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); + zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); efree(error); FREE_OP2(); HANDLE_EXCEPTION(); @@ -4938,7 +4938,7 @@ ZEND_VM_HANDLER(119, ZEND_SEND_ARRAY, ANY, ANY, NUM) ZEND_VM_C_GOTO(send_array); } } - zend_type_error("call_user_func_array() expects parameter 2 to be array, %s given", zend_get_type_by_const(Z_TYPE_P(args))); + zend_type_error("call_user_func_array() expects argument #2 ($args) to be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args))); FREE_UNFETCHED_OP2(); FREE_OP1(); HANDLE_EXCEPTION(); @@ -7909,7 +7909,7 @@ ZEND_VM_COLD_CONST_HANDLER(121, ZEND_STRLEN, CONST|TMPVAR|CV, ANY) zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen() expects parameter 1 to be string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); + zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -8517,7 +8517,7 @@ ZEND_VM_COLD_CONST_HANDLER(191, ZEND_GET_CLASS, UNUSED|CONST|TMPVAR|CV, UNUSED) if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects parameter 1 to be object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index b6a11e81d150f..c9bb2011310f8 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1981,7 +1981,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O goto send_array; } } - zend_type_error("call_user_func_array() expects parameter 2 to be array, %s given", zend_get_type_by_const(Z_TYPE_P(args))); + zend_type_error("call_user_func_array() expects argument #2 ($args) to be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args))); FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var); FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); @@ -4464,7 +4464,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen() expects parameter 1 to be string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); + zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -5889,7 +5889,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONS init_func_run_time_cache(&func->op_array); } } else { - zend_type_error("%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); + zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); efree(error); HANDLE_EXCEPTION(); @@ -8065,7 +8065,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPV init_func_run_time_cache(&func->op_array); } } else { - zend_type_error("%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); + zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); efree(error); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); @@ -9333,7 +9333,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CO if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects parameter 1 to be object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -10320,7 +10320,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_H init_func_run_time_cache(&func->op_array); } } else { - zend_type_error("%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); + zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); efree(error); HANDLE_EXCEPTION(); @@ -13305,7 +13305,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEN zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen() expects parameter 1 to be string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); + zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -16412,7 +16412,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED_H if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects parameter 1 to be object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -33308,7 +33308,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_UNUSED_UNUSED_H if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects parameter 1 to be object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class() expects argument 1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -36702,7 +36702,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CV_HANDLER(ZEND_OP zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen() expects parameter 1 to be string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); + zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -45260,7 +45260,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CV_UNUSED_HANDL if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects parameter 1 to be object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; diff --git a/ext/curl/tests/curl_setopt_error.phpt b/ext/curl/tests/curl_setopt_error.phpt index 0a7db7265fc37..e6a76e7afacf6 100644 --- a/ext/curl/tests/curl_setopt_error.phpt +++ b/ext/curl/tests/curl_setopt_error.phpt @@ -20,6 +20,6 @@ curl_setopt($ch, -10, 0); ?> --EXPECTF-- *** curl_setopt() call with incorrect parameters -curl_setopt() expects parameter 2 to be int, string given +curl_setopt() expects argument #2 ($option) to be of type int, string given Warning: curl_setopt(): Invalid curl configuration option in %scurl_setopt_error.php on line %d diff --git a/ext/date/tests/014.phpt b/ext/date/tests/014.phpt index f57f3e4b1d811..ce346c2ba9861 100644 --- a/ext/date/tests/014.phpt +++ b/ext/date/tests/014.phpt @@ -33,7 +33,7 @@ object(DateTimeZone)#%d (2) { } int(0) -Fatal error: Uncaught TypeError: timezone_offset_get() expects parameter 1 to be DateTimeZone, object given in %s:%d +Fatal error: Uncaught TypeError: timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, object given in %s:%d Stack trace: #0 %s(%d): timezone_offset_get(Object(DateTime), Object(DateTimeZone)) #1 {main} diff --git a/ext/date/tests/68062.phpt b/ext/date/tests/68062.phpt index 1270382158a8a..63e40a3bd00cb 100644 --- a/ext/date/tests/68062.phpt +++ b/ext/date/tests/68062.phpt @@ -14,4 +14,4 @@ try { } --EXPECT-- 3600 -DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given +DateTimeZone::getOffset() expects argument #1 ($datetime) to be of type DateTimeInterface, int given diff --git a/ext/date/tests/DateTimeImmutable_createFromMutable.phpt b/ext/date/tests/DateTimeImmutable_createFromMutable.phpt index 671afc12296e6..8651a90d34e52 100644 --- a/ext/date/tests/DateTimeImmutable_createFromMutable.phpt +++ b/ext/date/tests/DateTimeImmutable_createFromMutable.phpt @@ -24,4 +24,4 @@ object(DateTimeImmutable)#%d (3) { ["timezone"]=> string(13) "Europe/London" } -DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given +DateTimeImmutable::createFromMutable() expects argument #1 ($object) to be of type DateTime, object given diff --git a/ext/date/tests/DateTime_createFromImmutable.phpt b/ext/date/tests/DateTime_createFromImmutable.phpt index 841a3d4d33be0..153e7f3cbffa5 100644 --- a/ext/date/tests/DateTime_createFromImmutable.phpt +++ b/ext/date/tests/DateTime_createFromImmutable.phpt @@ -30,4 +30,4 @@ object(DateTime)#%d (3) { string(13) "Europe/London" } bool(true) -DateTime::createFromImmutable() expects parameter 1 to be DateTimeImmutable, object given +DateTime::createFromImmutable() expects argument #1 ($object) to be of type DateTimeImmutable, object given diff --git a/ext/date/tests/bug36988.phpt b/ext/date/tests/bug36988.phpt index 691bb4a7e24d7..ecb6e8ad7ac17 100644 --- a/ext/date/tests/bug36988.phpt +++ b/ext/date/tests/bug36988.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -mktime() expects parameter 6 to be int, float given +mktime() expects argument #6 ($year) to be of type int, float given diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt index b1f7f25d7bc7b..639868aecb356 100644 --- a/ext/date/tests/bug52062.phpt +++ b/ext/date/tests/bug52062.phpt @@ -28,7 +28,7 @@ var_dump($i->format('%s')); string(32) "5138-11-16 09:46:40 100000000000" bool(false) string(12) "100000000000" -DateTime::setTimestamp() expects parameter 1 to be int, float given +DateTime::setTimestamp() expects argument #1 ($timestamp) to be of type int, float given string(32) "5138-11-16 09:46:40 100000000000" bool(false) string(10) "1215752192" diff --git a/ext/date/tests/bug70245.phpt b/ext/date/tests/bug70245.phpt index b480192326b75..2443d91d019da 100644 --- a/ext/date/tests/bug70245.phpt +++ b/ext/date/tests/bug70245.phpt @@ -9,5 +9,5 @@ try { echo $e->getMessage(), "\n"; } ?> ---EXPECTF-- -strtotime() expects parameter 2 to be int, object given +--EXPECT-- +strtotime() expects argument #2 ($now) to be of type int, object given diff --git a/ext/date/tests/microtime_error.phpt b/ext/date/tests/microtime_error.phpt index 0736d3cf24992..d746e5b3ac7bb 100644 --- a/ext/date/tests/microtime_error.phpt +++ b/ext/date/tests/microtime_error.phpt @@ -47,11 +47,11 @@ float(%s) int(0) } } -microtime() expects parameter 1 to be bool, array given +microtime() expects argument #1 ($get_as_float) to be of type bool, array given --> bad arg: object(stdClass)#%d (0) { } -microtime() expects parameter 1 to be bool, object given +microtime() expects argument #1 ($get_as_float) to be of type bool, object given --> bad arg: int(1) float(%s) diff --git a/ext/date/tests/timezone_offset_get_error.phpt b/ext/date/tests/timezone_offset_get_error.phpt index 69e81cb8461d2..1782ced195aea 100644 --- a/ext/date/tests/timezone_offset_get_error.phpt +++ b/ext/date/tests/timezone_offset_get_error.phpt @@ -65,17 +65,16 @@ try { *** Testing timezone_offset_get() : error conditions *** -- Testing timezone_offset_get() function with an invalid values for $object argument -- -string(74) "timezone_offset_get() expects parameter 1 to be DateTimeZone, object given" +string(92) "timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, object given" -string(71) "timezone_offset_get() expects parameter 1 to be DateTimeZone, int given" +string(89) "timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, int given" -string(72) "timezone_offset_get() expects parameter 1 to be DateTimeZone, null given" +string(90) "timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, null given" -- Testing timezone_offset_get() function with an invalid values for $datetime argument -- -string(79) "timezone_offset_get() expects parameter 2 to be DateTimeInterface, object given" +string(99) "timezone_offset_get() expects argument #2 ($datetime) to be of type DateTimeInterface, object given" -string(76) "timezone_offset_get() expects parameter 2 to be DateTimeInterface, int given" - -string(77) "timezone_offset_get() expects parameter 2 to be DateTimeInterface, null given" +string(96) "timezone_offset_get() expects argument #2 ($datetime) to be of type DateTimeInterface, int given" +string(97) "timezone_offset_get() expects argument #2 ($datetime) to be of type DateTimeInterface, null given" diff --git a/ext/ffi/tests/045.phpt b/ext/ffi/tests/045.phpt index 981b7c31d2bac..411a03702b179 100644 --- a/ext/ffi/tests/045.phpt +++ b/ext/ffi/tests/045.phpt @@ -23,5 +23,5 @@ try { --EXPECTF-- bool(true) bool(false) -TypeError: FFI::isNull() expects parameter 1 to be FFI\CData, null given +TypeError: FFI::isNull() expects argument #1 ($ptr) to be of type FFI\CData, null given FFI\Exception: Cannot instantiate FFI\CData of zero size diff --git a/ext/fileinfo/tests/finfo_open_001.phpt b/ext/fileinfo/tests/finfo_open_001.phpt index af06278fae1c1..2ceb80444c7f5 100644 --- a/ext/fileinfo/tests/finfo_open_001.phpt +++ b/ext/fileinfo/tests/finfo_open_001.phpt @@ -19,7 +19,7 @@ var_dump(finfo_open(FILEINFO_MIME, '/foo/bar/inexistent')); ?> --EXPECTF-- -finfo_open() expects parameter 2 to be a valid path, string given +finfo_open() expects argument #2 ($arg) to be a valid path, string given resource(%d) of type (file_info) resource(%d) of type (file_info) diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index deb35bb95f706..6e0c02c489084 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -42,5 +42,5 @@ bool(false) Notice: finfo_open(): Warning: using regular magic file `%smagic' in %sfinfo_open_error.php on line %d resource(6) of type (file_info) -finfo_open() expects parameter 1 to be int, string given -finfo::__construct() expects parameter 1 to be int, string given +finfo_open() expects argument #1 ($options) to be of type int, string given +finfo::__construct() expects argument #1 ($options) to be of type int, string given diff --git a/ext/gd/tests/imagegd2_nullbyte_injection.phpt b/ext/gd/tests/imagegd2_nullbyte_injection.phpt index 30394cc1a5eeb..775da28b7fc43 100644 --- a/ext/gd/tests/imagegd2_nullbyte_injection.phpt +++ b/ext/gd/tests/imagegd2_nullbyte_injection.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -imagegd() expects parameter 2 to be a valid path, string given +imagegd() expects argument #2 ($to) to be a valid path, string given diff --git a/ext/gd/tests/imagegd_nullbyte_injection.phpt b/ext/gd/tests/imagegd_nullbyte_injection.phpt index f53d9b5dac9d7..e9d0af3c93c9f 100644 --- a/ext/gd/tests/imagegd_nullbyte_injection.phpt +++ b/ext/gd/tests/imagegd_nullbyte_injection.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -imagegd() expects parameter 2 to be a valid path, string given +imagegd() expects argument #2 ($to) to be a valid path, string given diff --git a/ext/gd/tests/imagexbm_nullbyte_injection.phpt b/ext/gd/tests/imagexbm_nullbyte_injection.phpt index a24aa3c0079c8..a84bc78eebd16 100644 --- a/ext/gd/tests/imagexbm_nullbyte_injection.phpt +++ b/ext/gd/tests/imagexbm_nullbyte_injection.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECTF-- -imagexbm() expects parameter 2 to be a valid path, string given +imagexbm() expects argument #2 ($filename) to be a valid path, string given diff --git a/ext/gmp/tests/gmp_clrbit.phpt b/ext/gmp/tests/gmp_clrbit.phpt index 255b9947b90d2..5169cc79865f5 100644 --- a/ext/gmp/tests/gmp_clrbit.phpt +++ b/ext/gmp/tests/gmp_clrbit.phpt @@ -47,5 +47,5 @@ Warning: gmp_clrbit(): Index must be greater than or equal to zero in %s on line string(7) "1000000" string(7) "1000000" string(30) "238462734628347239571822592658" -gmp_clrbit() expects parameter 1 to be GMP, array given +gmp_clrbit() expects argument #1 ($a) to be of type GMP, array given Done diff --git a/ext/gmp/tests/gmp_pow.phpt b/ext/gmp/tests/gmp_pow.phpt index e9525867e150f..afa8cc13e912d 100644 --- a/ext/gmp/tests/gmp_pow.phpt +++ b/ext/gmp/tests/gmp_pow.phpt @@ -47,7 +47,7 @@ Warning: gmp_pow(): Negative exponent not supported in %s on line %d string(1) "0" string(14) "10240000000000" string(14) "10240000000000" -gmp_pow() expects parameter 2 to be int, array given +gmp_pow() expects argument #2 ($exp) to be of type int, array given Warning: gmp_pow(): Unable to convert variable to GMP - wrong type in %s on line %d bool(false) diff --git a/ext/gmp/tests/gmp_setbit.phpt b/ext/gmp/tests/gmp_setbit.phpt index 15270eaf7bf56..30d9021247919 100644 --- a/ext/gmp/tests/gmp_setbit.phpt +++ b/ext/gmp/tests/gmp_setbit.phpt @@ -57,6 +57,6 @@ string(1) "7" string(12) "100008388608" string(12) "100000000000" string(12) "100000000008" -gmp_setbit() expects parameter 1 to be GMP, string given -gmp_setbit() expects parameter 1 to be GMP, array given +gmp_setbit() expects argument #1 ($a) to be of type GMP, string given +gmp_setbit() expects argument #1 ($a) to be of type GMP, array given Done diff --git a/ext/imap/tests/imap_expunge_error.phpt b/ext/imap/tests/imap_expunge_error.phpt index f1298843bbc89..3b6686a68d532 100644 --- a/ext/imap/tests/imap_expunge_error.phpt +++ b/ext/imap/tests/imap_expunge_error.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_num_recent() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_num_recent() expects parameter 1 to be resource, string given in %s on line %d +Warning: imap_num_recent() expects argument #1 to be of type resource, string given in %s on line %d -Warning: imap_num_recent() expects parameter 1 to be resource, bool given in %s on line %d +Warning: imap_num_recent() expects argument #1 to be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_gc_error.phpt b/ext/imap/tests/imap_gc_error.phpt index 9606c1ae2db9d..e3c05c68550f3 100644 --- a/ext/imap/tests/imap_gc_error.phpt +++ b/ext/imap/tests/imap_gc_error.phpt @@ -28,8 +28,8 @@ Checking with no parameters Warning: imap_gc() Expects exactly 2 parameters, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_gc() Expects parameter 1 to be resource, string given in %s on line %d +Warning: imap_gc() expects argument #1 to be of type resource, string given in %s on line %d -Warning: imap_gc() Expects parameter 1 to be resource, bool given in %s on line %d +Warning: imap_gc() expects argument #1 to be of type resource, bool given in %s on line %d Warning: imap_gc(): Invalid value for the flags parameter in %s on line %d diff --git a/ext/imap/tests/imap_headers.phpt b/ext/imap/tests/imap_headers.phpt index cd9d6d387f680..73c0c52306556 100644 --- a/ext/imap/tests/imap_headers.phpt +++ b/ext/imap/tests/imap_headers.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_headers() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_headers() expects parameter 1 to be resource, string given in %s on line %d +Warning: imap_headers() expects argument #1 to be of type resource, string given in %s on line %d -Warning: imap_headers() expects parameter 1 to be resource, bool given in %s on line %d +Warning: imap_headers() expects argument #1 to be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_num_msg_error.phpt b/ext/imap/tests/imap_num_msg_error.phpt index fffa3ae951e2e..e6a5650e6d689 100644 --- a/ext/imap/tests/imap_num_msg_error.phpt +++ b/ext/imap/tests/imap_num_msg_error.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_num_msg() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_num_msg() expects parameter 1 to be resource, string given in %s on line %d +Warning: imap_num_msg() expects argument #1 to be of type resource, string given in %s on line %d -Warning: imap_num_msg() expects parameter 1 to be resource, bool given in %s on line %d +Warning: imap_num_msg() expects argument #1 to be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_num_recent_error.phpt b/ext/imap/tests/imap_num_recent_error.phpt index b0ad5cefa0dce..4f4fef50541bf 100644 --- a/ext/imap/tests/imap_num_recent_error.phpt +++ b/ext/imap/tests/imap_num_recent_error.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_expunge() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_expunge() expects parameter 1 to be resource, string given in %s on line %d +Warning: imap_expunge() expects argument #1 to be of type resource, string given in %s on line %d -Warning: imap_expunge() expects parameter 1 to be resource, bool given in %s on line %d +Warning: imap_expunge() expects argument #1 to be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_ping_error.phpt b/ext/imap/tests/imap_ping_error.phpt index 5c2498c302999..918407ac0636a 100644 --- a/ext/imap/tests/imap_ping_error.phpt +++ b/ext/imap/tests/imap_ping_error.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_ping() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_ping() expects parameter 1 to be resource, string given in %s on line %d +Warning: imap_ping() expects argument #1 to be of type resource, string given in %s on line %d -Warning: imap_ping() expects parameter 1 to be resource, bool given in %s on line %d +Warning: imap_ping() expects argument #1 to be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_timeout_basic.phpt b/ext/imap/tests/imap_timeout_basic.phpt index a69b86b59509f..7b83309ef7a52 100644 --- a/ext/imap/tests/imap_timeout_basic.phpt +++ b/ext/imap/tests/imap_timeout_basic.phpt @@ -44,7 +44,7 @@ Checking with no parameters Warning: imap_timeout() expects at least 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_timeout() expects parameter 1 to be int, %s given in %s on line %d +Warning: imap_timeout() expects argument #1 to be of type int, %s given in %s on line %d GET values: int(%d) int(%d) diff --git a/ext/intl/tests/breakiter___construct_error.phpt b/ext/intl/tests/breakiter___construct_error.phpt index 8b36b4a7cf75f..35a145dceccb1 100644 --- a/ext/intl/tests/breakiter___construct_error.phpt +++ b/ext/intl/tests/breakiter___construct_error.phpt @@ -43,6 +43,6 @@ Exception: IntlRuleBasedBreakIterator::__construct() expects at least 1 paramete Exception: IntlRuleBasedBreakIterator::__construct() expects at most 2 parameters, 3 given in %s on line %d -Exception: IntlRuleBasedBreakIterator::__construct() expects parameter 2 to be bool, array given in %s on line %d +Exception: IntlRuleBasedBreakIterator::__construct() expects argument #2 ($areCompiled) to be of type bool, array given in %s on line %d Exception: IntlRuleBasedBreakIterator::__construct(): rbbi_create_instance: unable to create instance from compiled rules in %s on line %d diff --git a/ext/intl/tests/bug48227.phpt b/ext/intl/tests/bug48227.phpt index a5946e035f578..28a614da030a5 100644 --- a/ext/intl/tests/bug48227.phpt +++ b/ext/intl/tests/bug48227.phpt @@ -16,7 +16,7 @@ foreach (['', 1, NULL, $x] as $value) { ?> --EXPECT-- -NumberFormatter::format() expects parameter 1 to be number, string given +NumberFormatter::format() expects argument #1 ($value) to be of type number, string given string(1) "1" string(1) "0" -NumberFormatter::format() expects parameter 1 to be number, object given +NumberFormatter::format() expects argument #1 ($value) to be of type number, object given diff --git a/ext/intl/tests/calendar_add_error.phpt b/ext/intl/tests/calendar_add_error.phpt index f0fd43558ebe1..e30ed02856861 100644 --- a/ext/intl/tests/calendar_add_error.phpt +++ b/ext/intl/tests/calendar_add_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_add(1, 2, 3)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_add() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_add() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_add(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt index 66fb62f224720..a9bbed25e6d3c 100644 --- a/ext/intl/tests/calendar_before_after_error.phpt +++ b/ext/intl/tests/calendar_before_after_error.phpt @@ -65,9 +65,9 @@ error: 0, IntlCalendar::after() expects exactly 1 parameter, 0 given error: 0, IntlCalendar::before() expects exactly 1 parameter, 0 given -error: 0, IntlCalendar::after() expects parameter 1 to be IntlCalendar, int given +error: 0, IntlCalendar::after() expects argument #1 ($calendar) to be of type IntlCalendar, int given -error: 0, IntlCalendar::before() expects parameter 1 to be IntlCalendar, int given +error: 0, IntlCalendar::before() expects argument #1 ($calendar) to be of type IntlCalendar, int given error: 0, IntlCalendar::after() expects exactly 1 parameter, 2 given diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt index 7fec27399e31f..c56f9065fc695 100644 --- a/ext/intl/tests/calendar_clear_error.phpt +++ b/ext/intl/tests/calendar_clear_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: intlcal_clear(): intlcal_clear: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_clear() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_clear() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_clear(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt index 04896458b241b..0d4665af60983 100644 --- a/ext/intl/tests/calendar_equals_error.phpt +++ b/ext/intl/tests/calendar_equals_error.phpt @@ -47,10 +47,10 @@ try { --EXPECT-- error: 0, IntlCalendar::equals() expects exactly 1 parameter, 0 given -error: 0, IntlCalendar::equals() expects parameter 1 to be IntlCalendar, object given +error: 0, IntlCalendar::equals() expects argument #1 ($calendar) to be of type IntlCalendar, object given error: 0, IntlCalendar::equals() expects exactly 1 parameter, 2 given -error: 0, intlcal_equals() expects parameter 2 to be IntlCalendar, array given +error: 0, intlcal_equals() expects argument #2 ($calendar) to be of type IntlCalendar, array given -error: 0, intlcal_equals() expects parameter 1 to be IntlCalendar, int given +error: 0, intlcal_equals() expects argument #1 ($calendarObject) to be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt index 1957dbbc2d739..872fea825d8e5 100644 --- a/ext/intl/tests/calendar_fieldDifference_error.phpt +++ b/ext/intl/tests/calendar_fieldDifference_error.phpt @@ -32,7 +32,7 @@ Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU bool(false) intlcal_field_difference() expects exactly 3 parameters, 4 given -Fatal error: Uncaught TypeError: intlcal_field_difference() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_field_difference() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_field_difference(1, 0, 1) #1 {main} diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt index c138be81965a4..644e580f11683 100644 --- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt +++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt @@ -19,7 +19,7 @@ var_dump(intlcal_get_day_of_week_type(1, 1)); Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_get_day_of_week_type() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_day_of_week_type() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_day_of_week_type(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_getErrorCode_error.phpt b/ext/intl/tests/calendar_getErrorCode_error.phpt index 9dafc0ed948cb..4d69bdedfd6fb 100644 --- a/ext/intl/tests/calendar_getErrorCode_error.phpt +++ b/ext/intl/tests/calendar_getErrorCode_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_error_code(null)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_error_code() expects parameter 1 to be IntlCalendar, null given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_error_code() expects argument #1 ($calendar) to be of type IntlCalendar, null given in %s:%d Stack trace: #0 %s(%d): intlcal_get_error_code(NULL) #1 {main} diff --git a/ext/intl/tests/calendar_getErrorMessage_error.phpt b/ext/intl/tests/calendar_getErrorMessage_error.phpt index abdfef45b6727..68b1ad1d6cf67 100644 --- a/ext/intl/tests/calendar_getErrorMessage_error.phpt +++ b/ext/intl/tests/calendar_getErrorMessage_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_error_message(null)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_error_message() expects parameter 1 to be IntlCalendar, null given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_error_message() expects argument #1 ($calendar) to be of type IntlCalendar, null given in %s:%d Stack trace: #0 %s(%d): intlcal_get_error_message(NULL) #1 {main} diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt index f91e81dd694f8..22de5dadcdbd7 100644 --- a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_first_day_of_week(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_first_day_of_week() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_first_day_of_week() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_first_day_of_week(1) #1 {main} diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt index 64e7530d9c941..644a7eab1c5e8 100644 --- a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_minimal_days_in_first_week(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_minimal_days_in_first_week() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_minimal_days_in_first_week() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_minimal_days_in_first_week(1) #1 {main} diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt index 1e2b3f85dbb3e..b49861ba49404 100644 --- a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_skipped_wall_time_option(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_skipped_wall_time_option() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_skipped_wall_time_option() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_skipped_wall_time_option(1) #1 {main} diff --git a/ext/intl/tests/calendar_getTimeZone_error.phpt b/ext/intl/tests/calendar_getTimeZone_error.phpt index 683d1e66ee014..be9585a8217c3 100644 --- a/ext/intl/tests/calendar_getTimeZone_error.phpt +++ b/ext/intl/tests/calendar_getTimeZone_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_time_zone(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_time_zone() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_time_zone() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_time_zone(1) #1 {main} diff --git a/ext/intl/tests/calendar_getTime_error.phpt b/ext/intl/tests/calendar_getTime_error.phpt index ca0924ee97e8e..6c917103cb941 100644 --- a/ext/intl/tests/calendar_getTime_error.phpt +++ b/ext/intl/tests/calendar_getTime_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_time(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_time() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_time() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_getType_error.phpt b/ext/intl/tests/calendar_getType_error.phpt index 1c0e92b07fe57..f623bd3e8bc2b 100644 --- a/ext/intl/tests/calendar_getType_error.phpt +++ b/ext/intl/tests/calendar_getType_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_type(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_type() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_type() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_type(1) #1 {main} diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt index 12bfbaa5fbae5..b9d7f30299a63 100644 --- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt +++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt @@ -18,7 +18,7 @@ var_dump(intlcal_get_weekend_transition(1, 1)); Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_get_weekend_transition() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_weekend_transition() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_weekend_transition(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt index 211636cd63e51..7392294b961df 100644 --- a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt +++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt @@ -71,10 +71,10 @@ bool(false) Warning: intlcal_get_minimum(): intlcal_get_minimum: invalid field in %s on line %d bool(false) -error: 0, intlcal_get_least_maximum() expects parameter 1 to be IntlCalendar, int given +error: 0, intlcal_get_least_maximum() expects argument #1 ($calendar) to be of type IntlCalendar, int given -error: 0, intlcal_get_maximum() expects parameter 1 to be IntlCalendar, int given +error: 0, intlcal_get_maximum() expects argument #1 ($calendar) to be of type IntlCalendar, int given -error: 0, intlcal_get_greatest_minimum() expects parameter 1 to be IntlCalendar, int given +error: 0, intlcal_get_greatest_minimum() expects argument #1 ($calendar) to be of type IntlCalendar, int given -error: 0, intlcal_get_minimum() expects parameter 1 to be IntlCalendar, int given +error: 0, intlcal_get_minimum() expects argument #1 ($calendar) to be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt index 5921d0c0d38bc..5fe75fe17a4dc 100644 --- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt +++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt @@ -93,11 +93,11 @@ error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: invalid fiel bool(false) error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: invalid field bool(false) -error: 0, intlcal_get() expects parameter 2 to be int, string given +error: 0, intlcal_get() expects argument #2 ($field) to be of type int, string given -error: 0, intlcal_get_actual_maximum() expects parameter 2 to be int, string given +error: 0, intlcal_get_actual_maximum() expects argument #2 ($field) to be of type int, string given -error: 0, intlcal_get_actual_minimum() expects parameter 2 to be int, string given +error: 0, intlcal_get_actual_minimum() expects argument #2 ($field) to be of type int, string given error: 0, intlcal_get() expects exactly 2 parameters, 1 given diff --git a/ext/intl/tests/calendar_inDaylightTime_error.phpt b/ext/intl/tests/calendar_inDaylightTime_error.phpt index 4eab7b2fe4e3f..fb4492cb08b57 100644 --- a/ext/intl/tests/calendar_inDaylightTime_error.phpt +++ b/ext/intl/tests/calendar_inDaylightTime_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_in_daylight_time(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_in_daylight_time() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_in_daylight_time() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_in_daylight_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt index ce1536f92021b..4acb3b6143e7f 100644 --- a/ext/intl/tests/calendar_isEquivalentTo_error.phpt +++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt @@ -49,14 +49,14 @@ try { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } --EXPECT-- -error: 0, IntlCalendar::isEquivalentTo() expects parameter 1 to be IntlCalendar, int given +error: 0, IntlCalendar::isEquivalentTo() expects argument #1 ($calendar) to be of type IntlCalendar, int given error: 0, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given -error: 0, IntlCalendar::isEquivalentTo() expects parameter 1 to be IntlCalendar, int given +error: 0, IntlCalendar::isEquivalentTo() expects argument #1 ($calendar) to be of type IntlCalendar, int given error: 0, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given -error: 0, intlcal_is_equivalent_to() expects parameter 2 to be IntlCalendar, int given +error: 0, intlcal_is_equivalent_to() expects argument #2 ($calendar) to be of type IntlCalendar, int given -error: 0, intlcal_is_equivalent_to() expects parameter 1 to be IntlCalendar, int given +error: 0, intlcal_is_equivalent_to() expects argument #1 ($calendarObject) to be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_isLenient_error.phpt b/ext/intl/tests/calendar_isLenient_error.phpt index 4edbf70e55914..9e4a573908ac4 100644 --- a/ext/intl/tests/calendar_isLenient_error.phpt +++ b/ext/intl/tests/calendar_isLenient_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_is_lenient(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_is_lenient() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_is_lenient() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_is_lenient(1) #1 {main} diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt index 169fb2dd431bc..905e7c082d912 100644 --- a/ext/intl/tests/calendar_isSet_error.phpt +++ b/ext/intl/tests/calendar_isSet_error.phpt @@ -19,7 +19,7 @@ var_dump(intlcal_is_set(1, 2)); Warning: IntlCalendar::isSet(): intlcal_is_set: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_is_set() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_is_set() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_is_set(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt index 0ed3e507b0396..138939d61ef73 100644 --- a/ext/intl/tests/calendar_isWeekend_error.phpt +++ b/ext/intl/tests/calendar_isWeekend_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_is_weekend(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_is_weekend() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_is_weekend() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_is_weekend(1) #1 {main} diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt index b627e836173d7..e37c6d24b2da7 100644 --- a/ext/intl/tests/calendar_roll_error.phpt +++ b/ext/intl/tests/calendar_roll_error.phpt @@ -19,7 +19,7 @@ var_dump(intlcal_roll(1, 2, 3)); Warning: IntlCalendar::roll(): intlcal_roll: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_roll() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_roll() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_roll(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt index bb4e01ca00050..abaad1570849f 100644 --- a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: intlcal_set_first_day_of_week(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_set_first_day_of_week() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_first_day_of_week() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_first_day_of_week(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_setLenient_error.phpt b/ext/intl/tests/calendar_setLenient_error.phpt index 896b2e430a8b3..7e16004dc25dc 100644 --- a/ext/intl/tests/calendar_setLenient_error.phpt +++ b/ext/intl/tests/calendar_setLenient_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_set_lenient(1, false)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_set_lenient() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_lenient() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_lenient(1, false) #1 {main} diff --git a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt index 9bf3cb17dcae6..1973018628865 100644 --- a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: intlcal_set_minimal_days_in_first_week(): intlcal_set_minimal_days_in_first_week: invalid number of days; must be between 1 and 7 in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_set_minimal_days_in_first_week() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_minimal_days_in_first_week() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_minimal_days_in_first_week(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt index 079517b29028c..795d5d56f9e8e 100644 --- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: invalid option in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_set_repeated_wall_time_option() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_repeated_wall_time_option() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_repeated_wall_time_option(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt index c44208d1cef1f..e8204c0d9f3cb 100644 --- a/ext/intl/tests/calendar_setTimeZone_error.phpt +++ b/ext/intl/tests/calendar_setTimeZone_error.phpt @@ -47,4 +47,4 @@ error: 0, IntlCalendar::setTimeZone() expects exactly 1 parameter, 0 given error: 0, intlcal_set_time_zone() expects exactly 2 parameters, 3 given -error: 0, intlcal_set_time_zone() expects parameter 1 to be IntlCalendar, int given +error: 0, intlcal_set_time_zone() expects argument #1 ($calendar) to be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt index 77623147f5383..397deb48da0e7 100644 --- a/ext/intl/tests/calendar_set_error.phpt +++ b/ext/intl/tests/calendar_set_error.phpt @@ -38,7 +38,7 @@ bool(false) Warning: intlcal_set(): intlcal_set: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_set() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_toDateTime_error.phpt b/ext/intl/tests/calendar_toDateTime_error.phpt index ef799db61048f..e6ed8faf9c102 100644 --- a/ext/intl/tests/calendar_toDateTime_error.phpt +++ b/ext/intl/tests/calendar_toDateTime_error.phpt @@ -21,7 +21,7 @@ var_dump(intlcal_to_date_time(3)); Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: DateTimeZone constructor threw exception in %s on line %d string(77) "exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)" -Fatal error: Uncaught TypeError: intlcal_to_date_time() expects parameter 1 to be IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_to_date_time() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_to_date_time(3) #1 {main} diff --git a/ext/intl/tests/formatter_fail.phpt b/ext/intl/tests/formatter_fail.phpt index 4bce9184cc63c..8103f1f1a350e 100644 --- a/ext/intl/tests/formatter_fail.phpt +++ b/ext/intl/tests/formatter_fail.phpt @@ -100,13 +100,13 @@ IntlException: Constructor failed in %s on line %d 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR' 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR' -TypeError: NumberFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d +TypeError: NumberFormatter::__construct() expects argument #1 ($locale) to be of type string, array given in %s on line %d 'U_ZERO_ERROR' -TypeError: NumberFormatter::create() expects parameter 1 to be string, array given in %s on line %d +TypeError: NumberFormatter::create() expects argument #1 ($locale) to be of type string, array given in %s on line %d 'U_ZERO_ERROR' -TypeError: numfmt_create() expects parameter 1 to be string, array given in %s on line %d +TypeError: numfmt_create() expects argument #1 ($locale) to be of type string, array given in %s on line %d 'U_ZERO_ERROR' IntlException: Constructor failed in %s on line %d diff --git a/ext/intl/tests/gregoriancalendar___construct_error.phpt b/ext/intl/tests/gregoriancalendar___construct_error.phpt index 41bfc49398499..83de556587162 100644 --- a/ext/intl/tests/gregoriancalendar___construct_error.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_error.phpt @@ -38,4 +38,4 @@ Too many arguments Too many arguments No variant with 4 arguments (excluding trailing NULLs) No variant with 4 arguments (excluding trailing NULLs) -IntlGregorianCalendar::__construct() expects parameter 6 to be int, array given +IntlGregorianCalendar::__construct() expects argument #6 to be of type int, array given diff --git a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt index 37a0315c45fbe..2caa05538819c 100644 --- a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt +++ b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt @@ -14,7 +14,7 @@ var_dump(intlgregcal_get_gregorian_change(1)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intlgregcal_get_gregorian_change() expects parameter 1 to be IntlGregorianCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlgregcal_get_gregorian_change() expects argument #1 ($calendar) to be of type IntlGregorianCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlgregcal_get_gregorian_change(1) #1 {main} diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt index 9b7c3e0be8d08..6223256deff7d 100644 --- a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt +++ b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt @@ -14,7 +14,7 @@ var_dump(intlgregcal_is_leap_year(1, 2)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intlgregcal_is_leap_year() expects parameter 1 to be IntlGregorianCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlgregcal_is_leap_year() expects argument #1 ($calendar) to be of type IntlGregorianCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlgregcal_is_leap_year(1, 2) #1 {main} diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt index 060976d19ed2b..c02fcb35c39e5 100644 --- a/ext/intl/tests/msgfmt_fail2.phpt +++ b/ext/intl/tests/msgfmt_fail2.phpt @@ -136,13 +136,13 @@ IntlException: Constructor failed in %s on line %d 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR' 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR' -TypeError: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d +TypeError: MessageFormatter::__construct() expects argument #1 ($locale) to be of type string, array given in %s on line %d 'U_ZERO_ERROR' -TypeError: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d +TypeError: MessageFormatter::create() expects argument #1 ($locale) to be of type string, array given in %s on line %d 'U_ZERO_ERROR' -TypeError: msgfmt_create() expects parameter 1 to be string, array given in %s on line %d +TypeError: msgfmt_create() expects argument #1 ($locale) to be of type string, array given in %s on line %d 'U_ZERO_ERROR' IntlException: Constructor failed in %s on line %d diff --git a/ext/intl/tests/timezone_getDSTSavings_error.phpt b/ext/intl/tests/timezone_getDSTSavings_error.phpt index c20da9021a470..e5802d1ef46ed 100644 --- a/ext/intl/tests/timezone_getDSTSavings_error.phpt +++ b/ext/intl/tests/timezone_getDSTSavings_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intltz_get_dst_savings(null)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_dst_savings() expects parameter 1 to be IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_dst_savings() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_dst_savings(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getDisplayName_error.phpt b/ext/intl/tests/timezone_getDisplayName_error.phpt index 7f8d913a17c13..7861f25fe6c54 100644 --- a/ext/intl/tests/timezone_getDisplayName_error.phpt +++ b/ext/intl/tests/timezone_getDisplayName_error.phpt @@ -16,7 +16,7 @@ var_dump(intltz_get_display_name(null, IntlTimeZone::DISPLAY_SHORT, false, 'pt_P Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: wrong display type in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intltz_get_display_name() expects parameter 1 to be IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_display_name() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT') #1 {main} diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt index 5b4a59f17f5ff..91d0167b8a52a 100644 --- a/ext/intl/tests/timezone_getErrorCode_error.phpt +++ b/ext/intl/tests/timezone_getErrorCode_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intltz_get_error_code(null)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_error_code() expects parameter 1 to be IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_error_code() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_error_code(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getErrorMessage_error.phpt b/ext/intl/tests/timezone_getErrorMessage_error.phpt index ffceff358c2c6..d492a956ea2d6 100644 --- a/ext/intl/tests/timezone_getErrorMessage_error.phpt +++ b/ext/intl/tests/timezone_getErrorMessage_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intltz_get_error_message(null)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_error_message() expects parameter 1 to be IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_error_message() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_error_message(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getID_error.phpt b/ext/intl/tests/timezone_getID_error.phpt index 1ba7d7482fe32..23c4cd172660f 100644 --- a/ext/intl/tests/timezone_getID_error.phpt +++ b/ext/intl/tests/timezone_getID_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); intltz_get_id(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_id() expects parameter 1 to be IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_id() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_id(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getOffset_error.phpt b/ext/intl/tests/timezone_getOffset_error.phpt index 9ca81e4650dab..d9715b4998509 100644 --- a/ext/intl/tests/timezone_getOffset_error.phpt +++ b/ext/intl/tests/timezone_getOffset_error.phpt @@ -23,7 +23,7 @@ intltz_get_offset(null, time()*1000, false, $a, $a); Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intltz_get_offset() expects parameter 1 to be IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_offset() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_offset(NULL, %d, false, NULL, NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getRawOffset_error.phpt b/ext/intl/tests/timezone_getRawOffset_error.phpt index a16b62468b263..5b495322a1a8e 100644 --- a/ext/intl/tests/timezone_getRawOffset_error.phpt +++ b/ext/intl/tests/timezone_getRawOffset_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); intltz_get_raw_offset(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_raw_offset() expects parameter 1 to be IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_raw_offset() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_raw_offset(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_hasSameRules_error.phpt b/ext/intl/tests/timezone_hasSameRules_error.phpt index e1cfb754bac9f..4f99dc6eb5ea6 100644 --- a/ext/intl/tests/timezone_hasSameRules_error.phpt +++ b/ext/intl/tests/timezone_hasSameRules_error.phpt @@ -31,7 +31,7 @@ try { } --EXPECT-- int(0) -string(81) "IntlTimeZone::hasSameRules() expects parameter 1 to be IntlTimeZone, string given" +string(106) "IntlTimeZone::hasSameRules() expects argument #1 ($otherTimeZone) to be of type IntlTimeZone, string given" int(0) -string(74) "intltz_has_same_rules() expects parameter 1 to be IntlTimeZone, null given" +string(88) "intltz_has_same_rules() expects argument #1 ($tz) to be of type IntlTimeZone, null given" diff --git a/ext/intl/tests/timezone_toDateTimeZone_error.phpt b/ext/intl/tests/timezone_toDateTimeZone_error.phpt index 119977b124673..fc07b16ad5033 100644 --- a/ext/intl/tests/timezone_toDateTimeZone_error.phpt +++ b/ext/intl/tests/timezone_toDateTimeZone_error.phpt @@ -21,7 +21,7 @@ var_dump(intltz_to_date_time_zone(1)); Warning: IntlTimeZone::toDateTimeZone(): intltz_to_date_time_zone: DateTimeZone constructor threw exception in %s on line %d string(66) "DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)" -Fatal error: Uncaught TypeError: intltz_to_date_time_zone() expects parameter 1 to be IntlTimeZone, int given in %s:%d +Fatal error: Uncaught TypeError: intltz_to_date_time_zone() expects argument #1 ($tz) to be of type IntlTimeZone, int given in %s:%d Stack trace: #0 %s(%d): intltz_to_date_time_zone(1) #1 {main} diff --git a/ext/intl/tests/timezone_useDaylightTime_error.phpt b/ext/intl/tests/timezone_useDaylightTime_error.phpt index 5b37cd16b1452..283e42ea237e4 100644 --- a/ext/intl/tests/timezone_useDaylightTime_error.phpt +++ b/ext/intl/tests/timezone_useDaylightTime_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); intltz_use_daylight_time(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_use_daylight_time() expects parameter 1 to be IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_use_daylight_time() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_use_daylight_time(NULL) #1 {main} diff --git a/ext/intl/tests/transliterator_create_inverse_error.phpt b/ext/intl/tests/transliterator_create_inverse_error.phpt index c8d6bdc5a64ed..3b069cb230249 100644 --- a/ext/intl/tests/transliterator_create_inverse_error.phpt +++ b/ext/intl/tests/transliterator_create_inverse_error.phpt @@ -10,7 +10,7 @@ ini_set("intl.error_level", E_WARNING); transliterator_create_inverse("jj"); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: transliterator_create_inverse() expects parameter 1 to be Transliterator, string given in %s:%d +Fatal error: Uncaught TypeError: transliterator_create_inverse() expects argument #1 ($orig_trans) to be of type Transliterator, string given in %s:%d Stack trace: #0 %s(%d): transliterator_create_inverse('jj') #1 {main} diff --git a/ext/intl/tests/transliterator_get_error_code_error.phpt b/ext/intl/tests/transliterator_get_error_code_error.phpt index ed766fd968c59..bfd3c1b118a3a 100644 --- a/ext/intl/tests/transliterator_get_error_code_error.phpt +++ b/ext/intl/tests/transliterator_get_error_code_error.phpt @@ -8,7 +8,7 @@ ini_set("intl.error_level", E_WARNING); echo transliterator_get_error_code(array()), "\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: transliterator_get_error_code() expects parameter 1 to be Transliterator, array given in %s:%d +Fatal error: Uncaught TypeError: transliterator_get_error_code() expects argument #1 ($trans) to be of type Transliterator, array given in %s:%d Stack trace: #0 %s(%d): transliterator_get_error_code(Array) #1 {main} diff --git a/ext/intl/tests/transliterator_get_error_message_error.phpt b/ext/intl/tests/transliterator_get_error_message_error.phpt index 04746c7a5ff10..543480d55e331 100644 --- a/ext/intl/tests/transliterator_get_error_message_error.phpt +++ b/ext/intl/tests/transliterator_get_error_message_error.phpt @@ -8,7 +8,7 @@ ini_set("intl.error_level", E_WARNING); echo transliterator_get_error_message(array()), "\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: transliterator_get_error_message() expects parameter 1 to be Transliterator, array given in %s:%d +Fatal error: Uncaught TypeError: transliterator_get_error_message() expects argument #1 ($trans) to be of type Transliterator, array given in %s:%d Stack trace: #0 %s(%d): transliterator_get_error_message(Array) #1 {main} diff --git a/ext/libxml/tests/004.phpt b/ext/libxml/tests/004.phpt index e3daa41d24d6a..ad05ca1b9f5a1 100644 --- a/ext/libxml/tests/004.phpt +++ b/ext/libxml/tests/004.phpt @@ -27,16 +27,16 @@ foreach ($ctxs as $ctx) { echo "Done\n"; ?> ---EXPECTF-- -libxml_set_streams_context() expects parameter 1 to be resource, null given +--EXPECT-- +libxml_set_streams_context() expects argument #1 ($context) to be of type resource, null given bool(true) -libxml_set_streams_context() expects parameter 1 to be resource, string given +libxml_set_streams_context() expects argument #1 ($context) to be of type resource, string given bool(true) -libxml_set_streams_context() expects parameter 1 to be resource, int given +libxml_set_streams_context() expects argument #1 ($context) to be of type resource, int given bool(true) -libxml_set_streams_context() expects parameter 1 to be resource, object given +libxml_set_streams_context() expects argument #1 ($context) to be of type resource, object given bool(true) -libxml_set_streams_context() expects parameter 1 to be resource, array given +libxml_set_streams_context() expects argument #1 ($context) to be of type resource, array given bool(true) NULL bool(true) diff --git a/ext/libxml/tests/bug63389.phpt b/ext/libxml/tests/bug63389.phpt index 92c3e83567243..12b3a032a56f3 100644 --- a/ext/libxml/tests/bug63389.phpt +++ b/ext/libxml/tests/bug63389.phpt @@ -14,5 +14,5 @@ try { echo "okey"; ?> --EXPECT-- -libxml_set_streams_context() expects parameter 1 to be resource, string given +libxml_set_streams_context() expects argument #1 ($context) to be of type resource, string given okey diff --git a/ext/mbstring/tests/mb_ereg1.phpt b/ext/mbstring/tests/mb_ereg1.phpt index 875426a6c71ee..3f6c1132d1fa3 100644 --- a/ext/mbstring/tests/mb_ereg1.phpt +++ b/ext/mbstring/tests/mb_ereg1.phpt @@ -45,7 +45,7 @@ array(3) { array(0) { } } -mb_ereg() expects parameter 1 to be string, array given +mb_ereg() expects argument #1 ($pattern) to be of type string, array given array(3) { [0]=> array(0) { @@ -55,7 +55,7 @@ array(3) { [2]=> &string(0) "" } -mb_ereg() expects parameter 2 to be string, array given +mb_ereg() expects argument #2 ($string) to be of type string, array given array(3) { [0]=> int(1) diff --git a/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt b/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt index 127777fc6a1c3..0cd2696c5aff4 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt @@ -96,7 +96,7 @@ if (!$TEST_EXPERIMENTAL) --EXPECTF-- Warning: Wrong parameter count for mysqli_warning::mysqli_warning() in %s on line %d -Warning: mysqli_warning::mysqli_warning() expects parameter 1 to be object, null given in %s on line %d +Warning: mysqli_warning::mysqli_warning() expects argument #1 to be of type object, null given in %s on line %d Warning: Wrong parameter count for mysqli_warning::mysqli_warning() in %s on line %d diff --git a/ext/mysqli/tests/mysqli_embedded_connect.phpt b/ext/mysqli/tests/mysqli_embedded_connect.phpt index 7c6ca78ad457d..ecd096953fe54 100644 --- a/ext/mysqli/tests/mysqli_embedded_connect.phpt +++ b/ext/mysqli/tests/mysqli_embedded_connect.phpt @@ -28,5 +28,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> --EXPECTF-- -Warning: mysqli_embedded_connect() expects parameter 1 to be mysqli, null given in %s on line %d +Warning: mysqli_embedded_connect() expects argument #1 to be of type mysqli, null given in %s on line %d done! diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index cc6d4c8d1495a..f1bbab7e39c2c 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -145,6 +145,6 @@ Exception: Too few arguments to function mysqli_fetch_object_construct::__constr NULL NULL mysqli_result object is already closed -[0] mysqli_fetch_object() expects parameter 3 to be array, string given in %s on line %d +[0] mysqli_fetch_object() expects argument #3 ($params) to be of type array, string given in %s on line %d Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index 0e90b29e71244..82e181405053a 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -130,9 +130,9 @@ require_once('skipifconnectfailure.inc'); ?> --EXPECTF-- mysqli object is not fully initialized -[0] mysqli_result::fetch_object() expects parameter 1 to be string, object given in %s on line %d +[0] mysqli_result::fetch_object() expects argument #1 ($class_name) to be of type string, object given in %s on line %d [0] mysqli_result::fetch_object() expects at most 2 parameters, 3 given in %s on line %d -[0] mysqli_result::fetch_object() expects parameter 2 to be array, null given in %s on line %d +[0] mysqli_result::fetch_object() expects argument #2 ($params) to be of type array, null given in %s on line %d Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 1 passed and exactly 2 expected NULL NULL diff --git a/ext/oci8/tests/bug51291_1.phpt b/ext/oci8/tests/bug51291_1.phpt index 5d46a370f5340..4875b1dc17b01 100644 --- a/ext/oci8/tests/bug51291_1.phpt +++ b/ext/oci8/tests/bug51291_1.phpt @@ -165,7 +165,7 @@ array(4) { Test 2 - Parse -Warning: oci_error() expects parameter 1 to be resource, bool%sgiven in %sbug51291_1.php on line %d +Warning: oci_error() expects argument #1 to be of type resource, bool%sgiven in %sbug51291_1.php on line %d bool(false) array(4) { ["code"]=> @@ -180,7 +180,7 @@ array(4) { NULL 2nd call -Warning: oci_error() expects parameter 1 to be resource, bool%sgiven in %sbug51291_1.php on line %d +Warning: oci_error() expects argument #1 to be of type resource, bool%sgiven in %sbug51291_1.php on line %d bool(false) array(4) { ["code"]=> diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index 7a7f5269eb0ca..14bdfb73d6128 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -79,37 +79,37 @@ echo "Done\n"; Invalid Connection resource -Warning: oci_set_action() expects parameter 1 to be resource, null given in %s on line %d +Warning: oci_set_action() expects argument #1 to be of type resource, null given in %s on line %d NULL Invalid Connection resource 2 -Warning: oci_set_client_info() expects parameter 1 to be resource, %s given in %s on line %d +Warning: oci_set_client_info() expects argument #1 to be of type resource, %s given in %s on line %d NULL -Invalid Value +Invalid Value -Warning: oci_set_action() expects parameter 2 to be %s, resource given in %s on line %d +Warning: oci_set_action() expects argument #2 to be of type %s, resource given in %s on line %d NULL -Set Values multiple times +Set Values multiple times bool(true) bool(true) bool(true) bool(true) The value of ACTION is ACTION1 -Setting to different values +Setting to different values Values set successfully to 1000 The value of MODULE is 1000 The value of ACTION is 1000 The value of CLIENT_INFO is 1000 The value of CLIENT_IDENTIFIER is 1000 -Values set successfully to -The value of MODULE is -The value of ACTION is -The value of CLIENT_INFO is -The value of CLIENT_IDENTIFIER is +Values set successfully to +The value of MODULE is +The value of ACTION is +The value of CLIENT_INFO is +The value of CLIENT_IDENTIFIER is Warning: oci_set_module_name(): ORA-24960: %s OCI_ATTR_MODULE %s on line %d diff --git a/ext/oci8/tests/lob_002.phpt b/ext/oci8/tests/lob_002.phpt index 156fd668d3ed5..e69de8e0db81f 100644 --- a/ext/oci8/tests/lob_002.phpt +++ b/ext/oci8/tests/lob_002.phpt @@ -60,13 +60,13 @@ object(OCI-Lob)#%d (1) { } int(0) -Warning: OCI-Lob::write() expects parameter 2 to be int%s string given in %slob_002.php on line %d +Warning: OCI-Lob::write() expects argument #2 to be of type int%s string given in %slob_002.php on line %d NULL int(4) int(40000) int(40004) -Warning: OCI-Lob::seek() expects parameter 1 to be int%s string given in %slob_002.php on line %d +Warning: OCI-Lob::seek() expects argument #1 to be of type int%s string given in %slob_002.php on line %d NULL bool(false) int(40004) diff --git a/ext/oci8/tests/lob_021.phpt b/ext/oci8/tests/lob_021.phpt index 609003603b52e..0745c76c3c02f 100644 --- a/ext/oci8/tests/lob_021.phpt +++ b/ext/oci8/tests/lob_021.phpt @@ -61,7 +61,7 @@ bool(false) Warning: oci_free_descriptor(): %s is not a valid oci8 descriptor resource in %s on line %d bool(false) -Warning: oci_free_descriptor() expects parameter 1 to be OCI-Lob, object given in %s on line %d +Warning: oci_free_descriptor() expects argument #1 to be of type OCI-Lob, object given in %s on line %d NULL Warning: oci_free_descriptor(): Unable to find descriptor property in %s on line %d diff --git a/ext/oci8/tests/lob_026.phpt b/ext/oci8/tests/lob_026.phpt index acada8a9d32ca..2a39db46d6aa5 100644 --- a/ext/oci8/tests/lob_026.phpt +++ b/ext/oci8/tests/lob_026.phpt @@ -73,7 +73,7 @@ NULL bool(true) int(3) -Warning: oci_lob_seek() expects parameter 1 to be OCI-Lob, int%sgiven in %s on line %d +Warning: oci_lob_seek() expects argument #1 to be of type OCI-Lob, int%sgiven in %s on line %d NULL bool(true) array(2) { diff --git a/ext/oci8/tests/null_byte_1.phpt b/ext/oci8/tests/null_byte_1.phpt index 5c8075cc815cf..e5857450f8d83 100644 --- a/ext/oci8/tests/null_byte_1.phpt +++ b/ext/oci8/tests/null_byte_1.phpt @@ -35,9 +35,9 @@ var_dump($r); --EXPECTF-- Test 1: Import -Warning: OCI-Lob::savefile() expects parameter 1 to be a valid path, string given in %snull_byte_1.php on line %d +Warning: OCI-Lob::savefile() expects argument #1 ($function) to be a valid path, string given in %snull_byte_1.php on line %d NULL Test 2: Export -Warning: OCI-Lob::export() expects parameter 1 to be a valid path, string given in %snull_byte_1.php on line %d +Warning: OCI-Lob::export() expects argument #1 ($function) to be a valid path, string given in %snull_byte_1.php on line %d NULL diff --git a/ext/oci8/tests/privileged_connect.phpt b/ext/oci8/tests/privileged_connect.phpt index 5d9fbb0a45c4f..ca785aa3618a2 100644 --- a/ext/oci8/tests/privileged_connect.phpt +++ b/ext/oci8/tests/privileged_connect.phpt @@ -21,5 +21,5 @@ Warning: oci_connect(): Privileged connect is disabled. Enable oci8.privileged_c Warning: oci_connect(): Invalid session mode specified (-1) in %s on line %d -Warning: oci_connect() expects parameter 5 to be int%s string given in %s on line %d +Warning: oci_connect() expects argument #5 to be of type int%s string given in %s on line %d Done diff --git a/ext/oci8/tests/privileged_connect1.phpt b/ext/oci8/tests/privileged_connect1.phpt index 181dba5f1d921..aaa819ca921f8 100644 --- a/ext/oci8/tests/privileged_connect1.phpt +++ b/ext/oci8/tests/privileged_connect1.phpt @@ -23,5 +23,5 @@ Warning: oci_connect(): ORA-%d: %s in %s on line %d Warning: oci_connect(): Invalid session mode specified (-1) in %s on line %d -Warning: oci_connect() expects parameter 5 to be int%s string given in %s on line %d +Warning: oci_connect() expects argument #5 to be of type int%s string given in %s on line %d Done diff --git a/ext/odbc/tests/odbc_exec_001.phpt b/ext/odbc/tests/odbc_exec_001.phpt index dd1fa26a67797..195520484fbcb 100644 --- a/ext/odbc/tests/odbc_exec_001.phpt +++ b/ext/odbc/tests/odbc_exec_001.phpt @@ -28,11 +28,11 @@ odbc_exec($conn, NULL); ?> --EXPECTF-- -Warning: odbc_exec() expects parameter 3 to be int, string given in %s on line %d +Warning: odbc_exec() expects argument #3 to be of type int, string given in %s on line %d Warning: odbc_exec(): SQL error: %s in %s on line %d -Warning: odbc_exec() expects parameter 3 to be int, string given in %s on line %d +Warning: odbc_exec() expects argument #3 to be of type int, string given in %s on line %d Warning: odbc_exec(): SQL error: %s in %s on line %d diff --git a/ext/opcache/tests/iterable_type_optimization.phpt b/ext/opcache/tests/iterable_type_optimization.phpt index b5247cd69c0ad..26d9971d37bac 100644 --- a/ext/opcache/tests/iterable_type_optimization.phpt +++ b/ext/opcache/tests/iterable_type_optimization.phpt @@ -10,7 +10,7 @@ test(new stdClass); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Return value of test() must be iterable, object returned in %s:%d +Fatal error: Uncaught TypeError: Return value of test() must be of type iterable, object returned in %s:%d Stack trace: #0 %s(%d): test(Object(stdClass)) #1 {main} diff --git a/ext/opcache/tests/ssa_bug_003.phpt b/ext/opcache/tests/ssa_bug_003.phpt index c8014383ca43c..b53d24d4827ac 100644 --- a/ext/opcache/tests/ssa_bug_003.phpt +++ b/ext/opcache/tests/ssa_bug_003.phpt @@ -36,5 +36,5 @@ try { ?> --EXPECT-- -Error: Return value of test1() must be callable, string returned -Error: Return value of test2() must be an instance of Foo, instance of stdClass returned +Error: Return value of test1() must be of type callable, string returned +Error: Return value of test2() must be of type Foo, stdClass returned diff --git a/ext/openssl/tests/openssl_csr_export_bacis.phpt b/ext/openssl/tests/openssl_csr_export_bacis.phpt index 3a252d8a8f6ab..714b9f7092b30 100644 --- a/ext/openssl/tests/openssl_csr_export_bacis.phpt +++ b/ext/openssl/tests/openssl_csr_export_bacis.phpt @@ -41,6 +41,6 @@ var_dump(openssl_csr_export($csr, $output, false)); ?> --EXPECT-- bool(true) -openssl_csr_export() expects parameter 1 to be resource, string given +openssl_csr_export() expects argument #1 ($csr) to be of type resource, string given openssl_csr_export(): supplied resource is not a valid OpenSSL X.509 CSR resource bool(true) diff --git a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt index 57092293db46d..907b7fd84430b 100644 --- a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt +++ b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt @@ -76,6 +76,6 @@ sfBgVeqg0P4SWez5fHXqBNcjMdMI5f0bikcDZSIfTHS8FX+PMurLBC8UPB0YNIOl JViHkCA9x6m8RJXAFvqmgLlWlUzbDv/cRrDfjWjR -----END CERTIFICATE REQUEST----- " -openssl_csr_export_to_file() expects parameter 1 to be resource, string given +openssl_csr_export_to_file() expects argument #1 ($csr) to be of type resource, string given openssl_csr_export_to_file(): supplied resource is not a valid OpenSSL X.509 CSR resource bool(true) diff --git a/ext/openssl/tests/openssl_pkey_new_error.phpt b/ext/openssl/tests/openssl_pkey_new_error.phpt index 7fada8239a5fc..1a6235db702cc 100644 --- a/ext/openssl/tests/openssl_pkey_new_error.phpt +++ b/ext/openssl/tests/openssl_pkey_new_error.phpt @@ -28,6 +28,6 @@ try { } ?> --EXPECT-- -openssl_pkey_get_details() expects parameter 1 to be resource, bool given -openssl_pkey_get_details() expects parameter 1 to be resource, bool given -openssl_pkey_get_details() expects parameter 1 to be resource, bool given +openssl_pkey_get_details() expects argument #1 ($key) to be of type resource, bool given +openssl_pkey_get_details() expects argument #1 ($key) to be of type resource, bool given +openssl_pkey_get_details() expects argument #1 ($key) to be of type resource, bool given diff --git a/ext/pcre/tests/preg_grep_error1.phpt b/ext/pcre/tests/preg_grep_error1.phpt index 1bf23bb640cab..5b191a72dc59a 100644 --- a/ext/pcre/tests/preg_grep_error1.phpt +++ b/ext/pcre/tests/preg_grep_error1.phpt @@ -57,7 +57,7 @@ Warning: preg_grep(): Unknown modifier 'F' in %spreg_grep_error1.php on line %d bool(false) Arg value is Array -preg_grep() expects parameter 1 to be string, array given +preg_grep() expects argument #1 ($regex) to be of type string, array given Arg value is /[a-zA-Z]/ array(2) { @@ -66,5 +66,5 @@ array(2) { [2]=> string(4) "test" } -preg_grep() expects parameter 1 to be string, object given +preg_grep() expects argument #1 ($regex) to be of type string, object given Done diff --git a/ext/pcre/tests/preg_match_all_error1.phpt b/ext/pcre/tests/preg_match_all_error1.phpt index 6a5a0055a94cd..3a65fca852fd8 100644 --- a/ext/pcre/tests/preg_match_all_error1.phpt +++ b/ext/pcre/tests/preg_match_all_error1.phpt @@ -62,7 +62,7 @@ bool(false) NULL Arg value is Array -preg_match_all() expects parameter 1 to be string, array given +preg_match_all() expects argument #1 ($pattern) to be of type string, array given NULL Arg value is /[a-zA-Z]/ @@ -80,5 +80,5 @@ array(1) { string(1) "t" } } -preg_match_all() expects parameter 1 to be string, object given +preg_match_all() expects argument #1 ($pattern) to be of type string, object given NULL diff --git a/ext/pcre/tests/preg_match_all_error2.phpt b/ext/pcre/tests/preg_match_all_error2.phpt index 29762739c489b..98e70385c0bf9 100644 --- a/ext/pcre/tests/preg_match_all_error2.phpt +++ b/ext/pcre/tests/preg_match_all_error2.phpt @@ -23,11 +23,11 @@ foreach($input as $value) { } echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing preg_match_all() : error conditions *** Arg value is: Array -preg_match_all() expects parameter 2 to be string, array given +preg_match_all() expects argument #2 ($subject) to be of type string, array given NULL Arg value is: test diff --git a/ext/pcre/tests/preg_match_error1.phpt b/ext/pcre/tests/preg_match_error1.phpt index 2f1b39d67ffec..3dbb7c2f038af 100644 --- a/ext/pcre/tests/preg_match_error1.phpt +++ b/ext/pcre/tests/preg_match_error1.phpt @@ -56,8 +56,8 @@ Warning: preg_match(): Unknown modifier 'F' in %spreg_match_error1.php on line % bool(false) Arg value is Array -preg_match() expects parameter 1 to be string, array given +preg_match() expects argument #1 ($pattern) to be of type string, array given Arg value is /[a-zA-Z]/ int(1) -preg_match() expects parameter 1 to be string, object given +preg_match() expects argument #1 ($pattern) to be of type string, object given diff --git a/ext/pcre/tests/preg_match_error2.phpt b/ext/pcre/tests/preg_match_error2.phpt index 18a42c6445a15..bc48facc0a0bf 100644 --- a/ext/pcre/tests/preg_match_error2.phpt +++ b/ext/pcre/tests/preg_match_error2.phpt @@ -28,13 +28,13 @@ try { } echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing preg_match() : error conditions *** Arg value is: this is a string int(1) Arg value is: Array -preg_match() expects parameter 2 to be string, array given -preg_match() expects parameter 2 to be string, object given +preg_match() expects argument #2 ($subject) to be of type string, array given +preg_match() expects argument #2 ($subject) to be of type string, object given Done diff --git a/ext/pcre/tests/preg_split_error1.phpt b/ext/pcre/tests/preg_split_error1.phpt index b69caf1aed630..0ec80d99f1bc2 100644 --- a/ext/pcre/tests/preg_split_error1.phpt +++ b/ext/pcre/tests/preg_split_error1.phpt @@ -56,7 +56,7 @@ Warning: preg_split(): Unknown modifier 'F' in %spreg_split_error1.php on line % bool(false) Arg value is Array -preg_split() expects parameter 1 to be string, array given +preg_split() expects argument #1 ($pattern) to be of type string, array given Arg value is /[a-zA-Z]/ array(3) { @@ -67,4 +67,4 @@ array(3) { [2]=> string(4) " 5 6" } -preg_split() expects parameter 1 to be string, object given +preg_split() expects argument #1 ($pattern) to be of type string, object given diff --git a/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt b/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt index 4f3a19c8bed8b..b2ee84a9458fc 100644 --- a/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt +++ b/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt @@ -47,7 +47,7 @@ SQL if (false !== ($tmp = @$stmt->getColumnMeta(-1))) printf("[004] Expecting false got %s\n", var_export($tmp, true)); - // Warning: PDOStatement::getColumnMeta() expects parameter 1 to be int, array given in + // Warning: PDOStatement::getColumnMeta() expects argument #1 to be of type int, array given in if (false !== ($tmp = @$stmt->getColumnMeta(array()))) printf("[005] Expecting false got %s\n", var_export($tmp, true)); diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt index 3ee49890c91ce..e086e89c2866d 100644 --- a/ext/phar/tests/badparameters.phpt +++ b/ext/phar/tests/badparameters.phpt @@ -228,40 +228,40 @@ try { } ?> --EXPECTF-- -Phar::mungServer() expects parameter 1 to be array, string given -Phar::createDefaultStub() expects parameter 1 to be a valid path, array given -Phar::loadPhar() expects parameter 1 to be a valid path, array given -Phar::canCompress() expects parameter 1 to be int, string given -Phar::__construct() expects parameter 1 to be a valid path, array given -Phar::convertToExecutable() expects parameter 1 to be int, array given -Phar::convertToData() expects parameter 1 to be int, array given -PharData::delete() expects parameter 1 to be a valid path, array given +Phar::mungServer() expects argument #1 ($munglist) to be of type array, string given +Phar::createDefaultStub() expects argument #1 ($index) to be a valid path, array given +Phar::loadPhar() expects argument #1 ($filename) to be a valid path, array given +Phar::canCompress() expects argument #1 ($method) to be of type int, string given +Phar::__construct() expects argument #1 ($filename) to be a valid path, array given +Phar::convertToExecutable() expects argument #1 ($format) to be of type int, array given +Phar::convertToData() expects argument #1 ($format) to be of type int, array given +PharData::delete() expects argument #1 ($entry) to be a valid path, array given Cannot write out phar archive, phar is read-only Entry oops does not exist and cannot be deleted %sfrontcontroller10.phar Cannot write out phar archive, phar is read-only A Phar alias cannot be set in a plain tar archive -Phar::setAlias() expects parameter 1 to be string, array given +Phar::setAlias() expects argument #1 ($alias) to be of type string, array given Cannot change stub, phar is read-only A Phar stub cannot be set in a plain tar archive -Phar::setStub() expects parameter 1 to be string, array given +Phar::setStub() expects argument #1 ($newstub) to be of type string, array given A Phar stub cannot be set in a plain tar archive -Phar::setDefaultStub() expects parameter 1 to be string, array given +Phar::setDefaultStub() expects argument #1 ($index) to be of type string, array given Cannot change stub: phar.readonly=1 Cannot set signature algorithm, phar is read-only -Phar::compress() expects parameter 1 to be int, array given +Phar::compress() expects argument #1 ($compression_type) to be of type int, array given Cannot compress phar archive, phar is read-only -Phar::compressFiles() expects parameter 1 to be int, array given +Phar::compressFiles() expects argument #1 ($compression_type) to be of type int, array given Phar is readonly, cannot change compression Phar::copy() expects exactly 2 parameters, 1 given Cannot copy "a" to "b", phar is read-only -Phar::offsetExists() expects parameter 1 to be a valid path, array given -Phar::offsetGet() expects parameter 1 to be a valid path, array given +Phar::offsetExists() expects argument #1 ($entry) to be a valid path, array given +Phar::offsetGet() expects argument #1 ($entry) to be a valid path, array given Phar::offsetSet() expects exactly 2 parameters, 1 given -PharData::offsetUnset() expects parameter 1 to be a valid path, array given +PharData::offsetUnset() expects argument #1 ($entry) to be a valid path, array given Write operations disabled by the php.ini setting phar.readonly -Phar::addEmptyDir() expects parameter 1 to be a valid path, array given -Phar::addFile() expects parameter 1 to be a valid path, array given +Phar::addEmptyDir() expects argument #1 ($dirname) to be a valid path, array given +Phar::addFile() expects argument #1 ($filename) to be a valid path, array given Phar::addFromString() expects exactly 2 parameters, 1 given Write operations disabled by the php.ini setting phar.readonly Phar::setMetadata() expects exactly 1 parameter, 2 given diff --git a/ext/phar/tests/bug64931/bug64931.phpt b/ext/phar/tests/bug64931/bug64931.phpt index 6bf3bea7c3199..8c25692c3f4bb 100644 --- a/ext/phar/tests/bug64931/bug64931.phpt +++ b/ext/phar/tests/bug64931/bug64931.phpt @@ -47,10 +47,10 @@ try { ---EXPECTF-- +--EXPECT-- Test CAUGHT: Cannot create any files in magic ".phar" directory CAUGHT: Cannot create any files in magic ".phar" directory CAUGHT: Cannot create any files in magic ".phar" directory CAUGHT: Cannot create any files in magic ".phar" directory -CAUGHT: Phar::addFromString() expects parameter 1 to be a valid path, string given +CAUGHT: Phar::addFromString() expects argument #1 ($localname) to be a valid path, string given diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt index ff4fa4530aaa6..458ec8b6f51e2 100644 --- a/ext/phar/tests/create_path_error.phpt +++ b/ext/phar/tests/create_path_error.phpt @@ -78,4 +78,4 @@ string(5) "query" 11:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character 12:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character 13:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character -Exception: Phar::offsetSet() expects parameter 1 to be a valid path, string given +Exception: Phar::offsetSet() expects argument #1 ($entry) to be a valid path, string given diff --git a/ext/phar/tests/fgc_edgecases.phpt b/ext/phar/tests/fgc_edgecases.phpt index aa037ca5f8b4f..861933ba4e7a6 100644 --- a/ext/phar/tests/fgc_edgecases.phpt +++ b/ext/phar/tests/fgc_edgecases.phpt @@ -49,7 +49,7 @@ include $pname . '/foo/hi'; --EXPECTF-- -file_get_contents() expects parameter 1 to be a valid path, array given +file_get_contents() expects argument #1 ($filename) to be a valid path, array given blah --EXPECTF-- -fopen() expects parameter 1 to be a valid path, array given +fopen() expects argument #1 ($filename) to be a valid path, array given blah test diff --git a/ext/phar/tests/opendir_edgecases.phpt b/ext/phar/tests/opendir_edgecases.phpt index 30c137baf2da2..59deca53c8fce 100644 --- a/ext/phar/tests/opendir_edgecases.phpt +++ b/ext/phar/tests/opendir_edgecases.phpt @@ -55,7 +55,7 @@ include $pname . '/foo'; --EXPECTF-- -SplFileInfo::setFileClass() expects parameter 1 to be a class name derived from SplFileObject, 'SplFileInfo' given +SplFileInfo::setFileClass() expects argument #1 ($class_name) to be a class name derived from SplFileObject, 'SplFileInfo' given MyFile::__construct(phar://%s/a.php) a.php MyFile::__construct(phar://%s/b/c.php) diff --git a/ext/phar/tests/phar_unlinkarchive.phpt b/ext/phar/tests/phar_unlinkarchive.phpt index 8789c37e79f0d..70b251257d11e 100644 --- a/ext/phar/tests/phar_unlinkarchive.phpt +++ b/ext/phar/tests/phar_unlinkarchive.phpt @@ -92,7 +92,7 @@ __HALT_COMPILER(); Unknown phar archive "" Unknown phar archive "%sphar_unlinkarchive.phar" Unknown phar archive "%sphar_unlinkarchive.phar.tar": internal corruption of phar "%sphar_unlinkarchive.phar.tar" (truncated entry) -Phar::unlinkArchive() expects parameter 1 to be a valid path, array given +Phar::unlinkArchive() expects argument #1 ($archive) to be a valid path, array given bool(false) string(48) "" phar archive "%sphar_unlinkarchive.phar" has open file handles or objects. fclose() all file handles, and unset() all objects prior to calling unlinkArchive() diff --git a/ext/phar/tests/pharfileinfo_construct.phpt b/ext/phar/tests/pharfileinfo_construct.phpt index 4597660d80d2c..5ac63d82f59d9 100644 --- a/ext/phar/tests/pharfileinfo_construct.phpt +++ b/ext/phar/tests/pharfileinfo_construct.phpt @@ -49,7 +49,7 @@ echo $e->getMessage() . "\n"; --EXPECTF-- Cannot open phar file 'phar://%spharfileinfo_construct.phar/oops': internal corruption of phar "%spharfileinfo_construct.phar" (truncated entry) -PharFileInfo::__construct() expects parameter 1 to be a valid path, array given +PharFileInfo::__construct() expects argument #1 ($filename) to be a valid path, array given Cannot access phar file entry '%s' in archive '%s' Cannot call constructor twice '%s' is not a valid phar archive URL (must have at least phar://filename.phar) diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt index cebb5cd089588..721ad337ccdc8 100644 --- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt @@ -62,5 +62,5 @@ Method does not exist Method 1 does not exist Method 1.5 does not exist Method 1 does not exist -ReflectionClass::getMethod() expects parameter 1 to be string, array given -ReflectionClass::getMethod() expects parameter 1 to be string, object given +ReflectionClass::getMethod() expects argument #1 ($name) to be of type string, array given +ReflectionClass::getMethod() expects argument #1 ($name) to be of type string, object given diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt index 904162b26314f..dd3b5f33a2bb2 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt @@ -60,5 +60,5 @@ Property does not exist Property 1 does not exist Property 1.5 does not exist Property 1 does not exist -ReflectionClass::getProperty() expects parameter 1 to be string, array given -ReflectionClass::getProperty() expects parameter 1 to be string, object given +ReflectionClass::getProperty() expects argument #1 ($name) to be of type string, array given +ReflectionClass::getProperty() expects argument #1 ($name) to be of type string, object given diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt index 672c7f3e1dbb1..2cdbcebefb3a3 100644 --- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt @@ -43,4 +43,4 @@ ReflectionClass::getStaticPropertyValue() expects at most 2 parameters, 3 given ReflectionClass::getStaticPropertyValue() expects at least 1 parameter, 0 given Class C does not have a property named string(3) "def" -ReflectionClass::getStaticPropertyValue() expects parameter 1 to be string, array given +ReflectionClass::getStaticPropertyValue() expects argument #1 ($name) to be of type string, array given diff --git a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt index 3295f061089cc..1805607e192fc 100644 --- a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt +++ b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt @@ -16,7 +16,7 @@ var_dump($a); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: ReflectionClass::newInstanceArgs() expects parameter 1 to be array, string given in %s:%d +Fatal error: Uncaught TypeError: ReflectionClass::newInstanceArgs() expects argument #1 ($args) to be of type array, string given in %s:%d Stack trace: #0 %s(%d): ReflectionClass->newInstanceArgs('x') #1 {main} diff --git a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt index 9e4c69b4892b5..87cb894ea8aca 100644 --- a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt +++ b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt @@ -49,4 +49,4 @@ ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 0 given ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 1 given Class C does not have a property named Class C does not have a property named 1.5 -ReflectionClass::setStaticPropertyValue() expects parameter 1 to be string, array given +ReflectionClass::setStaticPropertyValue() expects argument #1 ($name) to be of type string, array given diff --git a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt index 9f25858402daa..1047c927dc99f 100644 --- a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt +++ b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt @@ -28,4 +28,4 @@ try { --EXPECTF-- Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given -Ok - ReflectionExtension::__construct() expects parameter 1 to be string, array given +Ok - ReflectionExtension::__construct() expects argument #1 ($name) to be of type string, array given diff --git a/ext/reflection/tests/ReflectionFunction_construct.001.phpt b/ext/reflection/tests/ReflectionFunction_construct.001.phpt index 945060b0738de..dbd829252b1d9 100644 --- a/ext/reflection/tests/ReflectionFunction_construct.001.phpt +++ b/ext/reflection/tests/ReflectionFunction_construct.001.phpt @@ -35,8 +35,8 @@ try { ?> --EXPECT-- -Ok - ReflectionFunction::__construct() expects parameter 1 to be string, array given +Ok - ReflectionFunction::__construct() expects argument #1 ($name) to be of type string, array given Function nonExistentFunction() does not exist Ok - ReflectionFunction::__construct() expects exactly 1 parameter, 0 given Ok - ReflectionFunction::__construct() expects exactly 1 parameter, 2 given -Ok - ReflectionFunction::__construct() expects parameter 1 to be string, array given +Ok - ReflectionFunction::__construct() expects argument #1 ($name) to be of type string, array given diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt index 34e73c9a69be4..0d585d2a73bc7 100644 --- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt +++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt @@ -24,4 +24,4 @@ try { ?> --EXPECT-- -string(74) "ReflectionMethod::invokeArgs() expects parameter 2 to be array, bool given" +string(90) "ReflectionMethod::invokeArgs() expects argument #2 ($args) to be of type array, bool given" diff --git a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt index 3ff1052a0a0b9..3dc0ed626e4ce 100644 --- a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt @@ -103,7 +103,7 @@ NULL Static method: ReflectionMethod::invoke() expects at least 1 parameter, 0 given -ReflectionMethod::invoke() expects parameter 1 to be object, bool given +ReflectionMethod::invoke() expects argument #1 ($object) to be of type object, bool given Called staticMethod() Exception: Using $this when not in object context NULL diff --git a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt index 4fa86eb363948..8788370b2fe16 100644 --- a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt +++ b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt @@ -57,9 +57,9 @@ try { } ?> ---EXPECTF-- +--EXPECT-- invoke() on a non-object: -string(71) "ReflectionMethod::invoke() expects parameter 1 to be object, bool given" +string(89) "ReflectionMethod::invoke() expects argument #1 ($object) to be of type object, bool given" invoke() on a non-instance: string(72) "Given object is not an instance of the class this method was declared in" diff --git a/ext/reflection/tests/ReflectionReference_errors.phpt b/ext/reflection/tests/ReflectionReference_errors.phpt index 8e52a1d223530..e70348cba1ba4 100644 --- a/ext/reflection/tests/ReflectionReference_errors.phpt +++ b/ext/reflection/tests/ReflectionReference_errors.phpt @@ -41,7 +41,7 @@ var_dump(unserialize('O:19:"ReflectionReference":0:{}')); ?> --EXPECTF-- Call to private ReflectionReference::__construct() from invalid context -ReflectionReference::fromArrayElement() expects parameter 1 to be array, object given +ReflectionReference::fromArrayElement() expects argument #1 ($array) to be of type array, object given Key must be array or string Array key not found Serialization of 'ReflectionReference' is not allowed diff --git a/ext/reflection/tests/bug42976.phpt b/ext/reflection/tests/bug42976.phpt index d8ab797b92660..014d0d0321508 100644 --- a/ext/reflection/tests/bug42976.phpt +++ b/ext/reflection/tests/bug42976.phpt @@ -26,9 +26,9 @@ echo "Done\n"; --EXPECTF-- string(9) "x.changed" -Warning: Parameter 1 to C::__construct() expected to be a reference, value given in %sbug42976.php on line 15 +Warning: C::__construct() expects argument #1 ($x) to be passed by reference, value given in %s on line %d string(10) "x.original" -Warning: Parameter 1 to C::__construct() expected to be a reference, value given in %sbug42976.php on line 18 +Warning: C::__construct() expects argument #1 ($x) to be passed by reference, value given in %s on line %d string(10) "x.original" Done diff --git a/ext/reflection/tests/request38992.phpt b/ext/reflection/tests/request38992.phpt index e6eab834157e5..0266cee430f37 100644 --- a/ext/reflection/tests/request38992.phpt +++ b/ext/reflection/tests/request38992.phpt @@ -23,5 +23,5 @@ try { } ?> --EXPECT-- -ReflectionMethod::invoke() expects parameter 1 to be object, string given -ReflectionMethod::invokeArgs() expects parameter 1 to be object, string given +ReflectionMethod::invoke() expects argument #1 ($object) to be of type object, string given +ReflectionMethod::invokeArgs() expects argument #1 ($object) to be of type object, string given diff --git a/ext/session/tests/session_set_save_handler_iface_002.phpt b/ext/session/tests/session_set_save_handler_iface_002.phpt index cd8f6af9d9b45..269005565d911 100644 --- a/ext/session/tests/session_set_save_handler_iface_002.phpt +++ b/ext/session/tests/session_set_save_handler_iface_002.phpt @@ -83,8 +83,8 @@ try { } session_start(); ---EXPECTF-- +--EXPECT-- *** Testing session_set_save_handler() function: interface wrong *** bool(true) -session_set_save_handler() expects parameter 1 to be SessionHandlerInterface, object given +session_set_save_handler() expects argument #1 ($open) to be of type SessionHandlerInterface, object given good handler writing diff --git a/ext/simplexml/tests/bug37565.phpt b/ext/simplexml/tests/bug37565.phpt index 53508dc9b6b49..38e475a744316 100644 --- a/ext/simplexml/tests/bug37565.phpt +++ b/ext/simplexml/tests/bug37565.phpt @@ -29,5 +29,5 @@ try { ?> --EXPECT-- -Error: simplexml_load_string() expects parameter 2 to be a class name derived from SimpleXMLElement, 'Setting' given -Error: simplexml_load_file() expects parameter 2 to be a class name derived from SimpleXMLElement, 'Setting' given +Error: simplexml_load_string() expects argument #2 ($class_name) to be a class name derived from SimpleXMLElement, 'Setting' given +Error: simplexml_load_file() expects argument #2 ($class_name) to be a class name derived from SimpleXMLElement, 'Setting' given diff --git a/ext/snmp/tests/snmp-object-error.phpt b/ext/snmp/tests/snmp-object-error.phpt index 606a8cf7b0cc5..c7adf8f25cc0f 100644 --- a/ext/snmp/tests/snmp-object-error.phpt +++ b/ext/snmp/tests/snmp-object-error.phpt @@ -70,8 +70,8 @@ var_dump($session->max_oids); ?> --EXPECTF-- SNMP::__construct() expects at least 3 parameters, 2 given -SNMP::__construct() expects parameter 4 to be int, string given -SNMP::__construct() expects parameter 5 to be int, string given +SNMP::__construct() expects argument #4 to be of type int, string given +SNMP::__construct() expects argument #5 to be of type int, string given Unknown SNMP protocol version Exception handling diff --git a/ext/soap/tests/bug77088.phpt b/ext/soap/tests/bug77088.phpt index 17945e136fd75..ed2bea1465417 100644 --- a/ext/soap/tests/bug77088.phpt +++ b/ext/soap/tests/bug77088.phpt @@ -21,7 +21,7 @@ catch(TypeError $e) --EXPECTF-- object(TypeError)#%d (%d) { ["message":protected]=> - string(%d) "SoapClient::__construct() expects parameter 2 to be array, null given" + string(%d) "SoapClient::__construct() expects argument #2 ($options) to be of type array, null given" ["string":"Error":private]=> string(0) "" ["code":protected]=> diff --git a/ext/sodium/tests/sodium_error_001.phpt b/ext/sodium/tests/sodium_error_001.phpt index a9801e21ce128..b5b19b1d12941 100644 --- a/ext/sodium/tests/sodium_error_001.phpt +++ b/ext/sodium/tests/sodium_error_001.phpt @@ -15,7 +15,7 @@ $key = random_bytes(SODIUM_CRYPTO_SHORTHASH_KEYBYTES); $hash = do_crypto_shorthash($m, $key); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: sodium_crypto_shorthash() expects parameter 1 to be string, int given in %s:%d +Fatal error: Uncaught TypeError: sodium_crypto_shorthash() expects argument #1 ($string) to be of type string, int given in %s:%d Stack trace: #0 %s(%d): sodium_crypto_shorthash() #1 %s(%d): do_crypto_shorthash() diff --git a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt index 62beb88cd5ed5..e1d37ecce59de 100644 --- a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt +++ b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt @@ -43,6 +43,6 @@ try { --EXPECT-- CallbackFilterIterator::__construct() expects exactly 2 parameters, 0 given CallbackFilterIterator::__construct() expects exactly 2 parameters, 1 given -CallbackFilterIterator::__construct() expects parameter 2 to be a valid callback, no array or string given -CallbackFilterIterator::__construct() expects parameter 2 to be a valid callback, array must have exactly two members +CallbackFilterIterator::__construct() expects argument #2 ($callback) to be a valid callback, no array or string given +CallbackFilterIterator::__construct() expects argument #2 ($callback) to be a valid callback, array must have exactly two members some message diff --git a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt index db0186f21817e..b8aea64ea2f26 100644 --- a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt +++ b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -SplFileInfo::setFileClass() expects parameter 1 to be a class name derived from SplFileObject, 'stdClass' given +SplFileInfo::setFileClass() expects argument #1 ($class_name) to be a class name derived from SplFileObject, 'stdClass' given diff --git a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt index 9a2e71defe52f..b0a358a9b3bff 100644 --- a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt +++ b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -SplFileInfo::setInfoClass() expects parameter 1 to be a class name derived from SplFileInfo, 'stdClass' given +SplFileInfo::setInfoClass() expects argument #1 ($class_name) to be a class name derived from SplFileInfo, 'stdClass' given diff --git a/ext/spl/tests/SplFixedArray__construct_param_array.phpt b/ext/spl/tests/SplFixedArray__construct_param_array.phpt index 15e1c0c4385b9..f4fb329989abb 100644 --- a/ext/spl/tests/SplFixedArray__construct_param_array.phpt +++ b/ext/spl/tests/SplFixedArray__construct_param_array.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects parameter 1 to be int, array given +Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, array given diff --git a/ext/spl/tests/SplFixedArray__construct_param_string.phpt b/ext/spl/tests/SplFixedArray__construct_param_string.phpt index 654ac4b95f803..240631cc88b2d 100644 --- a/ext/spl/tests/SplFixedArray__construct_param_string.phpt +++ b/ext/spl/tests/SplFixedArray__construct_param_string.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects parameter 1 to be int, string given +Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given diff --git a/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt index efb1d0e65d767..cfb0ca79a995c 100644 --- a/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt +++ b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt @@ -12,4 +12,4 @@ try { ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects parameter 1 to be int, object given +Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, object given diff --git a/ext/spl/tests/SplTempFileObject_constructor_error.phpt b/ext/spl/tests/SplTempFileObject_constructor_error.phpt index 37b00991ffa17..aaf2738915779 100644 --- a/ext/spl/tests/SplTempFileObject_constructor_error.phpt +++ b/ext/spl/tests/SplTempFileObject_constructor_error.phpt @@ -9,4 +9,4 @@ try { } ?> --EXPECT-- -SplTempFileObject::__construct() expects parameter 1 to be int, string given +SplTempFileObject::__construct() expects argument #1 ($max_memory) to be of type int, string given diff --git a/ext/spl/tests/arrayObject___construct_error1.phpt b/ext/spl/tests/arrayObject___construct_error1.phpt index aaf38ac499c33..b7700e4e315ac 100644 --- a/ext/spl/tests/arrayObject___construct_error1.phpt +++ b/ext/spl/tests/arrayObject___construct_error1.phpt @@ -20,6 +20,6 @@ try { ?> --EXPECT-- Bad iterator type: -ArrayObject::__construct() expects parameter 3 to be a class name derived from Iterator, 'Exception' given(6) +ArrayObject::__construct() expects argument #3 ($iterator_class) to be a class name derived from Iterator, 'Exception' given(6) Non-existent class: -ArrayObject::__construct() expects parameter 3 to be a class name derived from Iterator, 'nonExistentClassName' given(13) +ArrayObject::__construct() expects argument #3 ($iterator_class) to be a class name derived from Iterator, 'nonExistentClassName' given(13) diff --git a/ext/spl/tests/arrayObject_asort_basic1.phpt b/ext/spl/tests/arrayObject_asort_basic1.phpt index 0ec5269692004..db751c6fbacb5 100644 --- a/ext/spl/tests/arrayObject_asort_basic1.phpt +++ b/ext/spl/tests/arrayObject_asort_basic1.phpt @@ -38,7 +38,7 @@ object(ArrayObject)#%d (1) { int(4) } } -asort() expects parameter 2 to be int, string given +asort() expects argument #2 ($sort_flags) to be of type int, string given object(ArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(3) { diff --git a/ext/spl/tests/arrayObject_ksort_basic1.phpt b/ext/spl/tests/arrayObject_ksort_basic1.phpt index 01375b7277291..6e20013177882 100644 --- a/ext/spl/tests/arrayObject_ksort_basic1.phpt +++ b/ext/spl/tests/arrayObject_ksort_basic1.phpt @@ -37,7 +37,7 @@ object(ArrayObject)#%d (1) { int(3) } } -ksort() expects parameter 2 to be int, string given +ksort() expects argument #2 ($sort_flags) to be of type int, string given object(ArrayObject)#2 (1) { ["storage":"ArrayObject":private]=> array(4) { diff --git a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt index 591f84c3d4df4..a80c8cbb0ddd4 100644 --- a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt +++ b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt @@ -42,8 +42,8 @@ try { } ?> ---EXPECTF-- -string(118) "ArrayObject::setIteratorClass() expects parameter 1 to be a class name derived from Iterator, 'nonExistentClass' given" -string(110) "ArrayObject::setIteratorClass() expects parameter 1 to be a class name derived from Iterator, 'stdClass' given" -string(113) "ArrayObject::__construct() expects parameter 3 to be a class name derived from Iterator, 'nonExistentClass' given" -string(105) "ArrayObject::__construct() expects parameter 3 to be a class name derived from Iterator, 'stdClass' given" +--EXPECT-- +string(135) "ArrayObject::setIteratorClass() expects argument #1 ($iteratorClass) to be a class name derived from Iterator, 'nonExistentClass' given" +string(127) "ArrayObject::setIteratorClass() expects argument #1 ($iteratorClass) to be a class name derived from Iterator, 'stdClass' given" +string(131) "ArrayObject::__construct() expects argument #3 ($iterator_class) to be a class name derived from Iterator, 'nonExistentClass' given" +string(123) "ArrayObject::__construct() expects argument #3 ($iterator_class) to be a class name derived from Iterator, 'stdClass' given" diff --git a/ext/spl/tests/bug54291.phpt b/ext/spl/tests/bug54291.phpt index 9f3bd4991216e..e48f80fe00c61 100644 --- a/ext/spl/tests/bug54291.phpt +++ b/ext/spl/tests/bug54291.phpt @@ -5,7 +5,7 @@ Bug #54291 (Crash iterating DirectoryIterator for dir name starting with \0) $dir = new DirectoryIterator("\x00/abc"); $dir->isFile(); --EXPECTF-- -Fatal error: Uncaught TypeError: DirectoryIterator::__construct() expects parameter 1 to be a valid path, string given in %s:%d +Fatal error: Uncaught TypeError: DirectoryIterator::__construct() expects argument #1 ($path) to be a valid path, string given in %s:%d Stack trace: #0 %s(%d): DirectoryIterator->__construct('\x00/abc') #1 {main} diff --git a/ext/spl/tests/bug54292.phpt b/ext/spl/tests/bug54292.phpt index ac0cee10d4581..9355ef440827b 100644 --- a/ext/spl/tests/bug54292.phpt +++ b/ext/spl/tests/bug54292.phpt @@ -11,4 +11,4 @@ try { ?> --EXPECT-- -string(74) "SplFileObject::__construct() expects parameter 2 to be string, array given" +string(95) "SplFileObject::__construct() expects argument #2 ($open_mode) to be of type string, array given" diff --git a/ext/spl/tests/bug77431.phpt b/ext/spl/tests/bug77431.phpt index eb1ca96b75648..20545fb141017 100644 --- a/ext/spl/tests/bug77431.phpt +++ b/ext/spl/tests/bug77431.phpt @@ -5,5 +5,5 @@ Bug #77431 (SplFileInfo::__construct() accepts NUL bytes) new SplFileInfo("bad\0good"); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: SplFileInfo::__construct() expects parameter 1 to be a valid path, string given in %s:%d -Stack trace:%A \ No newline at end of file +Fatal error: Uncaught TypeError: SplFileInfo::__construct() expects argument #1 ($file_name) to be a valid path, string given in %s:%d +Stack trace:%A diff --git a/ext/spl/tests/bug78863.phpt b/ext/spl/tests/bug78863.phpt index c08c88a5d76e7..4db36c202e512 100644 --- a/ext/spl/tests/bug78863.phpt +++ b/ext/spl/tests/bug78863.phpt @@ -16,7 +16,7 @@ foreach ($it as $fileinfo) { } ?> --EXPECTF-- -Fatal error: Uncaught TypeError: DirectoryIterator::__construct() expects parameter 1 to be a valid path, string given in %s:%d +Fatal error: Uncaught TypeError: DirectoryIterator::__construct() expects argument #1 ($path) to be a valid path, string given in %s:%d Stack trace: #0 %s(%d): DirectoryIterator->__construct('%s') #1 {main} diff --git a/ext/spl/tests/fixedarray_005.phpt b/ext/spl/tests/fixedarray_005.phpt index 7295a317ab3e1..80fffd1566610 100644 --- a/ext/spl/tests/fixedarray_005.phpt +++ b/ext/spl/tests/fixedarray_005.phpt @@ -23,6 +23,6 @@ try { ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects parameter 1 to be int, object given -Ok - SplFixedArray::__construct() expects parameter 1 to be int, string given -Ok - SplFixedArray::__construct() expects parameter 1 to be int, string given +Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, object given +Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given +Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given diff --git a/ext/spl/tests/fixedarray_009.phpt b/ext/spl/tests/fixedarray_009.phpt index 71d6a42a6fac0..6dc6e4cbca5bf 100644 --- a/ext/spl/tests/fixedarray_009.phpt +++ b/ext/spl/tests/fixedarray_009.phpt @@ -10,4 +10,4 @@ try { } ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects parameter 1 to be int, string given +Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given diff --git a/ext/spl/tests/fixedarray_015.phpt b/ext/spl/tests/fixedarray_015.phpt index 2a2d5a26f74ac..74814268e7799 100644 --- a/ext/spl/tests/fixedarray_015.phpt +++ b/ext/spl/tests/fixedarray_015.phpt @@ -12,5 +12,5 @@ try { echo "Done\n"; ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects parameter 1 to be int, string given +Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given Done diff --git a/ext/spl/tests/iterator_042.phpt b/ext/spl/tests/iterator_042.phpt index 2c14fc3d40363..f768e4707732f 100644 --- a/ext/spl/tests/iterator_042.phpt +++ b/ext/spl/tests/iterator_042.phpt @@ -39,7 +39,7 @@ foreach($it as $k => $v) ?> --EXPECTF-- -Error AppendIterator::append() expects parameter 1 to be Iterator, array given in %s on line %d +Error AppendIterator::append() expects argument #1 ($iterator) to be of type Iterator, array given in %s on line %d object(ArrayIterator)#%d (1) { %s"storage"%s"ArrayIterator":private]=> array(2) { diff --git a/ext/spl/tests/iterator_044.phpt b/ext/spl/tests/iterator_044.phpt index 89d8bef772408..c62abb5c1a111 100644 --- a/ext/spl/tests/iterator_044.phpt +++ b/ext/spl/tests/iterator_044.phpt @@ -83,8 +83,8 @@ NULL ===1=== object(stdClass)#%d (0) { } -CachingIterator::offsetExists() expects parameter 1 to be string, object given -CachingIterator::offsetGet() expects parameter 1 to be string, object given +CachingIterator::offsetExists() expects argument #1 ($index) to be of type string, object given +CachingIterator::offsetGet() expects argument #1 ($index) to be of type string, object given ===2=== object(MyFoo)#%d (0) { } @@ -124,8 +124,8 @@ int(0) ===1=== object(stdClass)#1 (0) { } -CachingIterator::offsetExists() expects parameter 1 to be string, object given -CachingIterator::offsetGet() expects parameter 1 to be string, object given +CachingIterator::offsetExists() expects argument #1 ($index) to be of type string, object given +CachingIterator::offsetGet() expects argument #1 ($index) to be of type string, object given ===2=== object(MyFoo)#2 (0) { } diff --git a/ext/spl/tests/iterator_count.phpt b/ext/spl/tests/iterator_count.phpt index a115a7329cb60..3071f9b06cb8b 100644 --- a/ext/spl/tests/iterator_count.phpt +++ b/ext/spl/tests/iterator_count.phpt @@ -13,7 +13,7 @@ iterator_count('1'); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: iterator_count() expects parameter 1 to be Traversable, string given in %s:%d +Fatal error: Uncaught TypeError: iterator_count() expects argument #1 ($iterator) to be of type Traversable, string given in %s:%d Stack trace: #0 %s(%d): iterator_count('1') #1 {main} diff --git a/ext/spl/tests/iterator_to_array.phpt b/ext/spl/tests/iterator_to_array.phpt index 9225f03c00f07..09dcf5d02fb18 100644 --- a/ext/spl/tests/iterator_to_array.phpt +++ b/ext/spl/tests/iterator_to_array.phpt @@ -13,7 +13,7 @@ iterator_to_array('test','test'); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: iterator_to_array() expects parameter 1 to be Traversable, string given in %s:%d +Fatal error: Uncaught TypeError: iterator_to_array() expects argument #1 ($iterator) to be of type Traversable, string given in %s:%d Stack trace: #0 %s(%d): iterator_to_array('test', 'test') #1 {main} diff --git a/ext/spl/tests/recursive_tree_iterator_003.phpt b/ext/spl/tests/recursive_tree_iterator_003.phpt index c87f942f0d466..0f4fed97b398c 100644 --- a/ext/spl/tests/recursive_tree_iterator_003.phpt +++ b/ext/spl/tests/recursive_tree_iterator_003.phpt @@ -9,4 +9,4 @@ try { } ?> --EXPECT-- -RecursiveCachingIterator::__construct() expects parameter 1 to be RecursiveIterator, object given +RecursiveCachingIterator::__construct() expects argument #1 ($iterator) to be of type RecursiveIterator, object given diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt index 570b4ae226c25..0b628d3ee1d57 100644 --- a/ext/spl/tests/spl_004.phpt +++ b/ext/spl/tests/spl_004.phpt @@ -84,6 +84,6 @@ int(5) int(6) int(4) ===ERRORS=== -iterator_apply() expects parameter 3 to be array, int given -iterator_apply() expects parameter 2 to be a valid callback, function 'non_existing_function' not found or invalid function name +iterator_apply() expects argument #3 ($args) to be of type array, int given +iterator_apply() expects argument #2 ($function) to be a valid callback, function 'non_existing_function' not found or invalid function name iterator_apply() expects at most 3 parameters, 4 given diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index ab10bc06e90fc..88821296fcd5e 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -353,7 +353,7 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */ option = PHP_STREAM_META_GROUP_NAME; value = Z_STRVAL_P(group); } else { - zend_type_error("Parameter 2 should be string or int, %s given", zend_zval_type_name(group)); + zend_type_error("chgrp() expects argument #2 ($group) to be of type string|int, %s given", zend_zval_type_name(group)); RETURN_THROWS(); } if(wrapper->wops->stream_metadata(wrapper, filename, option, value, NULL)) { @@ -382,7 +382,7 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */ RETURN_FALSE; } } else { - zend_type_error("Parameter 2 should be string or int, %s given", zend_zval_type_name(group)); + zend_type_error("chgrp() expects argument #2 ($group) to be of type string|int, %s given", zend_zval_type_name(group)); RETURN_THROWS(); } diff --git a/ext/standard/string.c b/ext/standard/string.c index 6fb9683c5ad37..bd68a6c08b10a 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1276,7 +1276,7 @@ PHP_FUNCTION(implode) if (pieces == NULL) { if (arg1_array == NULL) { - zend_type_error("Argument must be an array"); + zend_type_error("%s() expects argument #1 ($pieces) to be of type array, string given", get_active_function_name()); RETURN_THROWS(); } @@ -1284,7 +1284,7 @@ PHP_FUNCTION(implode) pieces = arg1_array; } else { if (arg1_str == NULL) { - zend_type_error("The first argument must be a string"); + zend_type_error("%s() expects argument #1 ($glue) to be of type string, array given", get_active_function_name()); RETURN_THROWS(); } } diff --git a/ext/standard/tests/array/array_change_key_case_variation.phpt b/ext/standard/tests/array/array_change_key_case_variation.phpt index f2b185523f32d..e8b8fe174d8c4 100644 --- a/ext/standard/tests/array/array_change_key_case_variation.phpt +++ b/ext/standard/tests/array/array_change_key_case_variation.phpt @@ -23,8 +23,8 @@ var_dump( array_change_key_case( array("ONE" => 1, "one" => 1, "One" => 2), 5 ) echo "end\n"; ?> ---EXPECTF-- -array_change_key_case() expects parameter 2 to be int, string given +--EXPECT-- +array_change_key_case() expects argument #2 ($case) to be of type int, string given array(4) { ["ONE"]=> int(1) diff --git a/ext/standard/tests/array/array_diff_uassoc_error.phpt b/ext/standard/tests/array/array_diff_uassoc_error.phpt index 33fa0e7beaa48..7cd0c1a1fa713 100644 --- a/ext/standard/tests/array/array_diff_uassoc_error.phpt +++ b/ext/standard/tests/array/array_diff_uassoc_error.phpt @@ -51,8 +51,8 @@ try { *** Testing array_diff_uassoc() : error conditions *** -- Testing array_diff_uassoc() function with more than expected no. of arguments -- -array_diff_uassoc() expects parameter 4 to be a valid callback, array must have exactly two members -array_diff_uassoc() expects parameter 6 to be a valid callback, array must have exactly two members +array_diff_uassoc() expects argument #4 to be a valid callback, array must have exactly two members +array_diff_uassoc() expects argument #6 to be a valid callback, array must have exactly two members -- Testing array_diff_uassoc() function with less than expected no. of arguments -- At least 3 parameters are required, 2 given diff --git a/ext/standard/tests/array/array_diff_ukey_variation10.phpt b/ext/standard/tests/array/array_diff_ukey_variation10.phpt index b2304bb4468e2..a3be16c21c772 100644 --- a/ext/standard/tests/array/array_diff_ukey_variation10.phpt +++ b/ext/standard/tests/array/array_diff_ukey_variation10.phpt @@ -30,5 +30,5 @@ try { ?> --EXPECT-- *** Testing array_diff_ukey() : usage variation *** -array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name -array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name +array_diff_ukey() expects argument #3 to be a valid callback, function 'unknown_function' not found or invalid function name +array_diff_ukey() expects argument #3 to be a valid callback, function 'unknown_function' not found or invalid function name diff --git a/ext/standard/tests/array/array_filter_variation9.phpt b/ext/standard/tests/array/array_filter_variation9.phpt index 240f5c10fabe1..cedaf840dfb0c 100644 --- a/ext/standard/tests/array/array_filter_variation9.phpt +++ b/ext/standard/tests/array/array_filter_variation9.phpt @@ -37,7 +37,7 @@ try { echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing array_filter() : usage variations - built-in functions as 'callback' argument *** array(6) { [0]=> @@ -69,6 +69,6 @@ array(7) { [6]=> NULL } -array_filter() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name -array_filter() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name +array_filter() expects argument #2 ($callback) to be a valid callback, function 'echo' not found or invalid function name +array_filter() expects argument #2 ($callback) to be a valid callback, function 'exit' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt index b83c3302b2a1b..f277285cb62e7 100644 --- a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt +++ b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt @@ -30,5 +30,5 @@ try { ?> --EXPECTF-- *** Testing array_intersect_ukey() : usage variation *** -array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name -array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name +array_intersect_ukey() expects argument #3 to be a valid callback, function 'unknown_function' not found or invalid function name +array_intersect_ukey() expects argument #3 to be a valid callback, function 'unknown_function' not found or invalid function name diff --git a/ext/standard/tests/array/array_key_exists.phpt b/ext/standard/tests/array/array_key_exists.phpt index a436e7363ef94..0e6c6a5263a34 100644 --- a/ext/standard/tests/array/array_key_exists.phpt +++ b/ext/standard/tests/array/array_key_exists.phpt @@ -91,7 +91,7 @@ try { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing basic functionalities *** -- Iteration 1 -- bool(true) @@ -224,5 +224,5 @@ bool(true) Illegal offset type *** Testing operation on objects *** -array_key_exists() expects parameter 2 to be array, object given +array_key_exists() expects argument #2 ($array) to be of type array, object given Done diff --git a/ext/standard/tests/array/array_map_object1.phpt b/ext/standard/tests/array/array_map_object1.phpt index c95395e04d046..46fed2769148d 100644 --- a/ext/standard/tests/array/array_map_object1.phpt +++ b/ext/standard/tests/array/array_map_object1.phpt @@ -124,7 +124,7 @@ class InterClass implements myInterface test(array('InterClass', 'square'), array(1, 2)); ?> ---EXPECTF-- +--EXPECT-- *** Testing array_map() : object functionality *** -- simple class with public variable and method -- SimpleClass::square @@ -137,15 +137,15 @@ array(2) { -- simple class with private variable and method -- SimpleClassPri::add -array_map() expects parameter 1 to be a valid callback, cannot access private method SimpleClassPri::add() +array_map() expects argument #1 ($callback) to be a valid callback, cannot access private method SimpleClassPri::add() -- simple class with protected variable and method -- SimpleClassPro::mul -array_map() expects parameter 1 to be a valid callback, cannot access protected method SimpleClassPro::mul() +array_map() expects argument #1 ($callback) to be a valid callback, cannot access protected method SimpleClassPro::mul() -- class without members -- EmptyClass -array_map() expects parameter 1 to be a valid callback, array must have exactly two members +array_map() expects argument #1 ($callback) to be a valid callback, array must have exactly two members -- abstract class -- ChildClass::emptyFunction @@ -178,9 +178,9 @@ array(2) { int(4) } StaticClass::cube -array_map() expects parameter 1 to be a valid callback, cannot access private method StaticClass::cube() +array_map() expects argument #1 ($callback) to be a valid callback, cannot access private method StaticClass::cube() StaticClass::retVal -array_map() expects parameter 1 to be a valid callback, cannot access protected method StaticClass::retVal() +array_map() expects argument #1 ($callback) to be a valid callback, cannot access protected method StaticClass::retVal() -- class implementing an interface -- InterClass::square array(2) { diff --git a/ext/standard/tests/array/array_map_object2.phpt b/ext/standard/tests/array/array_map_object2.phpt index e5218ccbe4a20..de43ff2c934e9 100644 --- a/ext/standard/tests/array/array_map_object2.phpt +++ b/ext/standard/tests/array/array_map_object2.phpt @@ -41,10 +41,10 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_map() : with non-existent class and method *** -- with non-existent class -- -array_map() expects parameter 1 to be a valid callback, class 'non-existent' not found +array_map() expects argument #1 ($callback) to be a valid callback, class 'non-existent' not found -- with existent class and non-existent method -- -array_map() expects parameter 1 to be a valid callback, class 'SimpleClass' does not have a method 'non-existent' +array_map() expects argument #1 ($callback) to be a valid callback, class 'SimpleClass' does not have a method 'non-existent' Done diff --git a/ext/standard/tests/array/array_map_object3.phpt b/ext/standard/tests/array/array_map_object3.phpt index 2f1536df5c2b2..98f14789b92ea 100644 --- a/ext/standard/tests/array/array_map_object3.phpt +++ b/ext/standard/tests/array/array_map_object3.phpt @@ -69,7 +69,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_map() : class methods as callback function *** -- accessing parent method from child class -- array(3) { @@ -81,7 +81,7 @@ array(3) { int(7) } -- accessing child method from parent class -- -array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild' +array_map() expects argument #1 ($callback) to be a valid callback, class 'ParentClass' does not have a method 'staticChild' -- accessing parent method using child class object -- array(3) { [0]=> @@ -92,5 +92,5 @@ array(3) { int(7) } -- accessing child method using parent class object -- -array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticChild' +array_map() expects argument #1 ($callback) to be a valid callback, class 'ParentClass' does not have a method 'staticChild' Done diff --git a/ext/standard/tests/array/array_map_variation12.phpt b/ext/standard/tests/array/array_map_variation12.phpt index 67abde0108a27..4f1dba9c85157 100644 --- a/ext/standard/tests/array/array_map_variation12.phpt +++ b/ext/standard/tests/array/array_map_variation12.phpt @@ -35,7 +35,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_map() : built-in function *** -- with built-in function 'pow' and two parameters -- array(3) { @@ -49,5 +49,5 @@ array(3) { -- with built-in function 'pow' and one parameter -- pow() expects exactly 2 parameters, 1 given -- with language construct -- -array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'echo' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_map_variation14.phpt b/ext/standard/tests/array/array_map_variation14.phpt index 2764cb7374051..f0b931eddb748 100644 --- a/ext/standard/tests/array/array_map_variation14.phpt +++ b/ext/standard/tests/array/array_map_variation14.phpt @@ -51,7 +51,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_map() : null value for 'callback' argument *** -- with null -- array(2) { @@ -123,7 +123,7 @@ array(2) { int(2) } -- with empty string -- -array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function '' not found or invalid function name -- with empty array -- -array_map() expects parameter 1 to be a valid callback, array must have exactly two members +array_map() expects argument #1 ($callback) to be a valid callback, array must have exactly two members Done diff --git a/ext/standard/tests/array/array_map_variation15.phpt b/ext/standard/tests/array/array_map_variation15.phpt index f36d55bd5f4ec..f352fabc71a26 100644 --- a/ext/standard/tests/array/array_map_variation15.phpt +++ b/ext/standard/tests/array/array_map_variation15.phpt @@ -28,5 +28,5 @@ echo "Done"; ?> --EXPECT-- *** Testing array_map() : non existent 'callback' function *** -array_map() expects parameter 1 to be a valid callback, function 'non_existent' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'non_existent' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_map_variation16.phpt b/ext/standard/tests/array/array_map_variation16.phpt index 0c80337c769b9..b9d9b51b14731 100644 --- a/ext/standard/tests/array/array_map_variation16.phpt +++ b/ext/standard/tests/array/array_map_variation16.phpt @@ -40,22 +40,22 @@ for($count = 0; $count < count($callback_names); $count++) echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_map() : non-permmited built-in functions *** -- Iteration 1 -- -array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'echo' not found or invalid function name -- Iteration 2 -- -array_map() expects parameter 1 to be a valid callback, function 'array' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'array' not found or invalid function name -- Iteration 3 -- -array_map() expects parameter 1 to be a valid callback, function 'empty' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'empty' not found or invalid function name -- Iteration 4 -- -array_map() expects parameter 1 to be a valid callback, function 'eval' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'eval' not found or invalid function name -- Iteration 5 -- -array_map() expects parameter 1 to be a valid callback, function 'exit' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'exit' not found or invalid function name -- Iteration 6 -- -array_map() expects parameter 1 to be a valid callback, function 'isset' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'isset' not found or invalid function name -- Iteration 7 -- -array_map() expects parameter 1 to be a valid callback, function 'list' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'list' not found or invalid function name -- Iteration 8 -- -array_map() expects parameter 1 to be a valid callback, function 'print' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function 'print' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_map_variation17.phpt b/ext/standard/tests/array/array_map_variation17.phpt index 4558dc999f074..65268ac9142d4 100644 --- a/ext/standard/tests/array/array_map_variation17.phpt +++ b/ext/standard/tests/array/array_map_variation17.phpt @@ -81,62 +81,62 @@ echo "Done"; *** Testing array_map() : unexpected values for 'callback' argument *** -- Iteration 1 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 2 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 3 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 4 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 5 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 6 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 7 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 8 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 9 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 10 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 11 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 12 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 13 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 14 -- -array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function '' not found or invalid function name -- Iteration 15 -- -array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name +array_map() expects argument #1 ($callback) to be a valid callback, function '' not found or invalid function name -- Iteration 16 -- -array_map() expects parameter 1 to be a valid callback, array must have exactly two members +array_map() expects argument #1 ($callback) to be a valid callback, array must have exactly two members -- Iteration 17 -- -array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object +array_map() expects argument #1 ($callback) to be a valid callback, first array member is not a valid class name or object -- Iteration 18 -- -array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object +array_map() expects argument #1 ($callback) to be a valid callback, first array member is not a valid class name or object -- Iteration 19 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given -- Iteration 20 -- -array_map() expects parameter 1 to be a valid callback, no array or string given +array_map() expects argument #1 ($callback) to be a valid callback, no array or string given Done diff --git a/ext/standard/tests/array/array_search_variation3.phpt b/ext/standard/tests/array/array_search_variation3.phpt index 596c36f805aac..ad356ba01dbd3 100644 --- a/ext/standard/tests/array/array_search_variation3.phpt +++ b/ext/standard/tests/array/array_search_variation3.phpt @@ -49,14 +49,14 @@ var_dump( array_search("one", $array_search_obj->array_var) ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing sub-arrays with array_search() *** int(4) string(5) "three" int(5) *** Testing objects with array_search() *** -array_search() expects parameter 2 to be array, object given -array_search() expects parameter 2 to be array, object given +array_search() expects argument #2 ($haystack) to be of type array, object given +array_search() expects argument #2 ($haystack) to be of type array, object given int(1) Done diff --git a/ext/standard/tests/array/array_slice_variation1.phpt b/ext/standard/tests/array/array_slice_variation1.phpt index 46f33b9503448..270206a747317 100644 --- a/ext/standard/tests/array/array_slice_variation1.phpt +++ b/ext/standard/tests/array/array_slice_variation1.phpt @@ -28,7 +28,7 @@ try { var_dump($a); ?> ---EXPECTF-- +--EXPECT-- array(3) { [0]=> int(1) @@ -61,6 +61,6 @@ array(1) { [2]=> int(3) } -array_slice() expects parameter 3 to be int, string given -array_slice() expects parameter 3 to be int, string given +array_slice() expects argument #3 ($length) to be of type int, string given +array_slice() expects argument #3 ($length) to be of type int, string given string(3) "foo" diff --git a/ext/standard/tests/array/array_walk_objects.phpt b/ext/standard/tests/array/array_walk_objects.phpt index a4a517746d032..7800a9f6f5493 100644 --- a/ext/standard/tests/array/array_walk_objects.phpt +++ b/ext/standard/tests/array/array_walk_objects.phpt @@ -43,5 +43,5 @@ string(10) "%r\0%r*%r\0%rvar_pro" string(14) "test_protected" string(7) "var_pub" string(11) "test_public" -array_walk() expects parameter 1 to be array, string given +array_walk() expects argument #1 ($input) to be of type array, string given Done diff --git a/ext/standard/tests/array/array_walk_rec_objects.phpt b/ext/standard/tests/array/array_walk_rec_objects.phpt index 51aeae11c925f..0d0cdcbdc8495 100644 --- a/ext/standard/tests/array/array_walk_rec_objects.phpt +++ b/ext/standard/tests/array/array_walk_rec_objects.phpt @@ -43,5 +43,5 @@ string(10) "%r\0%r*%r\0%rvar_pro" string(14) "test_protected" string(7) "var_pub" string(11) "test_public" -array_walk_recursive() expects parameter 1 to be array, string given +array_walk_recursive() expects argument #1 ($input) to be of type array, string given Done diff --git a/ext/standard/tests/array/array_walk_recursive_variation8.phpt b/ext/standard/tests/array/array_walk_recursive_variation8.phpt index 51eba1e0e0e10..2d80cf9e240be 100644 --- a/ext/standard/tests/array/array_walk_recursive_variation8.phpt +++ b/ext/standard/tests/array/array_walk_recursive_variation8.phpt @@ -33,12 +33,12 @@ try { echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk_recursive() : built-in function as callback *** -- With 'pow' built-in function -- bool(true) -- With 'min' built-in function -- bool(true) -- With 'echo' language construct -- -array_walk_recursive() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name +array_walk_recursive() expects argument #2 ($funcname) to be a valid callback, function 'echo' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_walk_variation8.phpt b/ext/standard/tests/array/array_walk_variation8.phpt index baa5f3914bbcd..f95bc43e9d60a 100644 --- a/ext/standard/tests/array/array_walk_variation8.phpt +++ b/ext/standard/tests/array/array_walk_variation8.phpt @@ -33,12 +33,12 @@ try { echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk() : built-in function as callback *** -- With 'pow' built-in function -- bool(true) -- With 'min' built-in function -- bool(true) -- With 'echo' language construct -- -array_walk() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name +array_walk() expects argument #2 ($funcname) to be a valid callback, function 'echo' not found or invalid function name Done diff --git a/ext/standard/tests/array/bug40191.phpt b/ext/standard/tests/array/bug40191.phpt index b94e709364060..a87c5098ab602 100644 --- a/ext/standard/tests/array/bug40191.phpt +++ b/ext/standard/tests/array/bug40191.phpt @@ -17,5 +17,5 @@ try { echo "Done\n"; ?> --EXPECT-- -array_unique() expects parameter 1 to be array, object given +array_unique() expects argument #1 ($arg) to be of type array, object given Done diff --git a/ext/standard/tests/array/in_array_variation3.phpt b/ext/standard/tests/array/in_array_variation3.phpt index 0b58990041852..09549d94c3b83 100644 --- a/ext/standard/tests/array/in_array_variation3.phpt +++ b/ext/standard/tests/array/in_array_variation3.phpt @@ -52,14 +52,14 @@ var_dump( in_array("one", $in_array_obj->array_var) ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing sub-arrays with in_array() *** bool(true) bool(true) bool(true) *** Testing objects with in_array() *** -in_array() expects parameter 2 to be array, object given -in_array() expects parameter 2 to be array, object given +in_array() expects argument #2 ($haystack) to be of type array, object given +in_array() expects argument #2 ($haystack) to be of type array, object given bool(true) Done diff --git a/ext/standard/tests/array/range_errors.phpt b/ext/standard/tests/array/range_errors.phpt index 51e9e50a55f93..73a02697e7da5 100644 --- a/ext/standard/tests/array/range_errors.phpt +++ b/ext/standard/tests/array/range_errors.phpt @@ -105,15 +105,15 @@ Step exceeds the specified range -- Testing other conditions -- Step exceeds the specified range -range() expects parameter 3 to be int or float, string given +range() expects argument #3 ($step) to be of type int|float, string given Step exceeds the specified range Notice: A non well formed numeric value encountered in %s on line %d Step exceeds the specified range -- Testing Invalid steps -- -range() expects parameter 3 to be int or float, string given +range() expects argument #3 ($step) to be of type int|float, string given Step exceeds the specified range Step exceeds the specified range -range() expects parameter 3 to be int or float, string given -range() expects parameter 3 to be int or float, string given +range() expects argument #3 ($step) to be of type int|float, string given +range() expects argument #3 ($step) to be of type int|float, string given diff --git a/ext/standard/tests/array/range_variation.phpt b/ext/standard/tests/array/range_variation.phpt index 3de5f6188f06a..a8c3fc1e0d4eb 100644 --- a/ext/standard/tests/array/range_variation.phpt +++ b/ext/standard/tests/array/range_variation.phpt @@ -615,5 +615,5 @@ array(5) { [4]=> int(5) } -range() expects parameter 3 to be int or float, array given +range() expects argument #3 ($step) to be of type int|float, array given Done diff --git a/ext/standard/tests/class_object/get_class_variation_001.phpt b/ext/standard/tests/class_object/get_class_variation_001.phpt index 87a9eac6c3a44..b7ae000c0124f 100644 --- a/ext/standard/tests/class_object/get_class_variation_001.phpt +++ b/ext/standard/tests/class_object/get_class_variation_001.phpt @@ -85,80 +85,80 @@ Warning: Undefined variable: undefined_var in %s on line %d Warning: Undefined variable: unset_var in %s on line %d Arg value: 0 (type: integer) -get_class() expects parameter 1 to be object, int given +get_class() expects argument #1 ($object) to be of type object, int given Arg value: 1 (type: integer) -get_class() expects parameter 1 to be object, int given +get_class() expects argument #1 ($object) to be of type object, int given Arg value: 12345 (type: integer) -get_class() expects parameter 1 to be object, int given +get_class() expects argument #1 ($object) to be of type object, int given Arg value: -2345 (type: integer) -get_class() expects parameter 1 to be object, int given +get_class() expects argument #1 ($object) to be of type object, int given Arg value: 10.5 (type: double) -get_class() expects parameter 1 to be object, float given +get_class() expects argument #1 ($object) to be of type object, float given Arg value: -10.5 (type: double) -get_class() expects parameter 1 to be object, float given +get_class() expects argument #1 ($object) to be of type object, float given Arg value: 101234567000 (type: double) -get_class() expects parameter 1 to be object, float given +get_class() expects argument #1 ($object) to be of type object, float given Arg value: 1.07654321E-9 (type: double) -get_class() expects parameter 1 to be object, float given +get_class() expects argument #1 ($object) to be of type object, float given Arg value: 0.5 (type: double) -get_class() expects parameter 1 to be object, float given +get_class() expects argument #1 ($object) to be of type object, float given Arg value: Array (type: array) -get_class() expects parameter 1 to be object, array given +get_class() expects argument #1 ($object) to be of type object, array given Arg value: Array (type: array) -get_class() expects parameter 1 to be object, array given +get_class() expects argument #1 ($object) to be of type object, array given Arg value: Array (type: array) -get_class() expects parameter 1 to be object, array given +get_class() expects argument #1 ($object) to be of type object, array given Arg value: Array (type: array) -get_class() expects parameter 1 to be object, array given +get_class() expects argument #1 ($object) to be of type object, array given Arg value: Array (type: array) -get_class() expects parameter 1 to be object, array given +get_class() expects argument #1 ($object) to be of type object, array given Arg value: (type: NULL) -get_class() expects parameter 1 to be object, null given +get_class() expects argument #1 ($object) to be of type object, null given Arg value: (type: NULL) -get_class() expects parameter 1 to be object, null given +get_class() expects argument #1 ($object) to be of type object, null given Arg value: 1 (type: boolean) -get_class() expects parameter 1 to be object, bool given +get_class() expects argument #1 ($object) to be of type object, bool given Arg value: (type: boolean) -get_class() expects parameter 1 to be object, bool given +get_class() expects argument #1 ($object) to be of type object, bool given Arg value: 1 (type: boolean) -get_class() expects parameter 1 to be object, bool given +get_class() expects argument #1 ($object) to be of type object, bool given Arg value: (type: boolean) -get_class() expects parameter 1 to be object, bool given +get_class() expects argument #1 ($object) to be of type object, bool given Arg value: (type: string) -get_class() expects parameter 1 to be object, string given +get_class() expects argument #1 ($object) to be of type object, string given Arg value: (type: string) -get_class() expects parameter 1 to be object, string given +get_class() expects argument #1 ($object) to be of type object, string given Arg value: string (type: string) -get_class() expects parameter 1 to be object, string given +get_class() expects argument #1 ($object) to be of type object, string given Arg value: string (type: string) -get_class() expects parameter 1 to be object, string given +get_class() expects argument #1 ($object) to be of type object, string given Arg value: (type: NULL) -get_class() expects parameter 1 to be object, null given +get_class() expects argument #1 ($object) to be of type object, null given Arg value: (type: NULL) -get_class() expects parameter 1 to be object, null given +get_class() expects argument #1 ($object) to be of type object, null given Done diff --git a/ext/standard/tests/file/006_variation2.phpt b/ext/standard/tests/file/006_variation2.phpt index a5c95ab1da553..18d63b8a4409f 100644 --- a/ext/standard/tests/file/006_variation2.phpt +++ b/ext/standard/tests/file/006_variation2.phpt @@ -86,7 +86,7 @@ chmod(__DIR__."/006_variation2", 0777); unlink(__DIR__."/006_variation2.tmp"); rmdir(__DIR__."/006_variation2"); ?> ---EXPECTF-- +--EXPECT-- *** Testing fileperms() & chmod() : usage variations *** *** Testing fileperms(), chmod() with miscellaneous permissions *** @@ -146,15 +146,15 @@ bool(true) bool(true) 43567 -- Iteration 12 -- -chmod() expects parameter 2 to be int, string given -chmod() expects parameter 2 to be int, string given +chmod() expects argument #2 ($mode) to be of type int, string given +chmod() expects argument #2 ($mode) to be of type int, string given -- Iteration 13 -- -chmod() expects parameter 2 to be int, string given -chmod() expects parameter 2 to be int, string given +chmod() expects argument #2 ($mode) to be of type int, string given +chmod() expects argument #2 ($mode) to be of type int, string given -- Iteration 14 -- -chmod() expects parameter 2 to be int, string given -chmod() expects parameter 2 to be int, string given +chmod() expects argument #2 ($mode) to be of type int, string given +chmod() expects argument #2 ($mode) to be of type int, string given -- Iteration 15 -- -chmod() expects parameter 2 to be int, string given -chmod() expects parameter 2 to be int, string given +chmod() expects argument #2 ($mode) to be of type int, string given +chmod() expects argument #2 ($mode) to be of type int, string given *** Done *** diff --git a/ext/standard/tests/file/bug39863.phpt b/ext/standard/tests/file/bug39863.phpt index 174e349b15fd3..a4eb48def331c 100644 --- a/ext/standard/tests/file/bug39863.phpt +++ b/ext/standard/tests/file/bug39863.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -file_exists() expects parameter 1 to be a valid path, string given +file_exists() expects argument #1 ($filename) to be a valid path, string given diff --git a/ext/standard/tests/file/chgrp.phpt b/ext/standard/tests/file/chgrp.phpt index 9003979a7526e..9950c9e3fc79e 100644 --- a/ext/standard/tests/file/chgrp.phpt +++ b/ext/standard/tests/file/chgrp.phpt @@ -13,5 +13,5 @@ try { echo $exception->getMessage() . "\n"; } ?> ---EXPECTF-- -Parameter 2 should be string or int, null given +--EXPECT-- +chgrp() expects argument #2 ($group) to be of type string|int, null given diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt index d47850d8987ba..9e8d0cd180417 100644 --- a/ext/standard/tests/file/disk_free_space_variation.phpt +++ b/ext/standard/tests/file/disk_free_space_variation.phpt @@ -110,19 +110,19 @@ float(%d) float(%d) -- Iteration 9 -- -disk_free_space() expects parameter 1 to be a valid path, string given -diskfreespace() expects parameter 1 to be a valid path, string given +disk_free_space() expects argument #1 ($directory) to be a valid path, string given +diskfreespace() expects argument #1 ($directory) to be a valid path, string given -- Iteration 10 -- -disk_free_space() expects parameter 1 to be a valid path, string given -diskfreespace() expects parameter 1 to be a valid path, string given +disk_free_space() expects argument #1 ($directory) to be a valid path, string given +diskfreespace() expects argument #1 ($directory) to be a valid path, string given -- Iteration 11 -- -disk_free_space() expects parameter 1 to be a valid path, string given -diskfreespace() expects parameter 1 to be a valid path, string given +disk_free_space() expects argument #1 ($directory) to be a valid path, string given +diskfreespace() expects argument #1 ($directory) to be a valid path, string given -- Iteration 12 -- -disk_free_space() expects parameter 1 to be a valid path, string given -diskfreespace() expects parameter 1 to be a valid path, string given +disk_free_space() expects argument #1 ($directory) to be a valid path, string given +diskfreespace() expects argument #1 ($directory) to be a valid path, string given --- Done --- diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt index e35981f278350..b5f5119c03613 100644 --- a/ext/standard/tests/file/disk_total_space_variation.phpt +++ b/ext/standard/tests/file/disk_total_space_variation.phpt @@ -102,16 +102,16 @@ float(%d) float(%d) -- Iteration 9 -- -disk_total_space() expects parameter 1 to be a valid path, string given +disk_total_space() expects argument #1 ($directory) to be a valid path, string given -- Iteration 10 -- -disk_total_space() expects parameter 1 to be a valid path, string given +disk_total_space() expects argument #1 ($directory) to be a valid path, string given -- Iteration 11 -- -disk_total_space() expects parameter 1 to be a valid path, string given +disk_total_space() expects argument #1 ($directory) to be a valid path, string given -- Iteration 12 -- -disk_total_space() expects parameter 1 to be a valid path, string given +disk_total_space() expects argument #1 ($directory) to be a valid path, string given *** Testing with Binary Input *** float(%s) diff --git a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt index 1edd46a9cbd23..878fa1a7c5f16 100644 --- a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt @@ -82,10 +82,10 @@ Warning: file_get_contents( ): Failed to open stream: Permission denied in %s on bool(false) -- Filename: \0 -- -file_get_contents() expects parameter 1 to be a valid path, string given +file_get_contents() expects argument #1 ($filename) to be a valid path, string given -- Filename: array() -- -file_get_contents() expects parameter 1 to be a valid path, array given +file_get_contents() expects argument #1 ($filename) to be a valid path, array given -- Filename: /no/such/file/dir -- diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt index 92771069922f9..c2bb20946180a 100644 --- a/ext/standard/tests/file/file_get_contents_variation8.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8.phpt @@ -75,9 +75,9 @@ bool(false) Warning: file_get_contents( ): Failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 6 -- -file_get_contents() expects parameter 1 to be a valid path, string given +file_get_contents() expects argument #1 ($filename) to be a valid path, string given -- Iteration 7 -- -file_get_contents() expects parameter 1 to be a valid path, array given +file_get_contents() expects argument #1 ($filename) to be a valid path, array given -- Iteration 8 -- Warning: file_get_contents(/no/such/file/dir): Failed to open stream: No such file or directory in %s on line %d diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt index 71e672e8e9859..310d6abb86910 100644 --- a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt @@ -82,10 +82,10 @@ Warning: file_put_contents( ): Failed to open stream: Permission denied in %s on Failed to write data to: " " -- Filename: \0 -- -file_put_contents() expects parameter 1 to be a valid path, string given +file_put_contents() expects argument #1 ($filename) to be a valid path, string given -- Filename: array() -- -file_put_contents() expects parameter 1 to be a valid path, array given +file_put_contents() expects argument #1 ($filename) to be a valid path, array given -- Filename: /no/such/file/dir -- diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt index 7c72ca8516e88..5b8c156a94886 100644 --- a/ext/standard/tests/file/file_put_contents_variation8.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8.phpt @@ -81,13 +81,13 @@ Failed to write data to: -- Iteration 5 -- 9 bytes written to: -- Iteration 6 -- -file_put_contents() expects parameter 1 to be a valid path, string given +file_put_contents() expects argument #1 ($filename) to be a valid path, string given -- Iteration 7 -- -file_put_contents() expects parameter 1 to be a valid path, array given +file_put_contents() expects argument #1 ($filename) to be a valid path, array given -- Iteration 8 -- Warning: file_put_contents(%sdir): Failed to open stream: %s in %s on line %d -Failed to write data to: %sdir +Failed to write data to: %sir -- Iteration 9 -- Warning: file_put_contents(%sphp): Failed to open stream: %s in %s on line %d diff --git a/ext/standard/tests/file/filegroup_variation3.phpt b/ext/standard/tests/file/filegroup_variation3.phpt index 274f12bb70ca2..aff47ef1c94d5 100644 --- a/ext/standard/tests/file/filegroup_variation3.phpt +++ b/ext/standard/tests/file/filegroup_variation3.phpt @@ -78,8 +78,8 @@ bool(false) Warning: filegroup(): stat failed for %s/filegroup_variation3/filegroup*.tmp in %s on line %d bool(false) - Iteration 7 - -filegroup() expects parameter 1 to be a valid path, string given +filegroup() expects argument #1 ($filename) to be a valid path, string given - Iteration 8 - -filegroup() expects parameter 1 to be a valid path, string given +filegroup() expects argument #1 ($filename) to be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/fileinode_variation3.phpt b/ext/standard/tests/file/fileinode_variation3.phpt index 16f67b06762ac..b8ed3962dfb35 100644 --- a/ext/standard/tests/file/fileinode_variation3.phpt +++ b/ext/standard/tests/file/fileinode_variation3.phpt @@ -79,8 +79,8 @@ bool(false) Warning: fileinode(): stat failed for %s/fileinode_variation3/fileinode*.tmp in %s on line %d bool(false) - Iteration 7 - -fileinode() expects parameter 1 to be a valid path, string given +fileinode() expects argument #1 ($filename) to be a valid path, string given - Iteration 8 - -fileinode() expects parameter 1 to be a valid path, string given +fileinode() expects argument #1 ($filename) to be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/fileowner_variation3.phpt b/ext/standard/tests/file/fileowner_variation3.phpt index 01d2da2445cf8..8768f9d69b0df 100644 --- a/ext/standard/tests/file/fileowner_variation3.phpt +++ b/ext/standard/tests/file/fileowner_variation3.phpt @@ -79,8 +79,8 @@ bool(false) Warning: fileowner(): stat failed for %s/fileowner_variation3/fileowner*.tmp in %s on line %d bool(false) - Iteration 7 - -fileowner() expects parameter 1 to be a valid path, string given +fileowner() expects argument #1 ($filename) to be a valid path, string given - Iteration 8 - -fileowner() expects parameter 1 to be a valid path, string given +fileowner() expects argument #1 ($filename) to be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/fileperms_variation3.phpt b/ext/standard/tests/file/fileperms_variation3.phpt index 1588ee67fe77f..e58594e7d143a 100644 --- a/ext/standard/tests/file/fileperms_variation3.phpt +++ b/ext/standard/tests/file/fileperms_variation3.phpt @@ -78,8 +78,8 @@ bool(false) Warning: fileperms(): stat failed for %s/fileperms_variation3/fileperms*.tmp in %s on line %d bool(false) - Iteration 7 - -fileperms() expects parameter 1 to be a valid path, string given +fileperms() expects argument #1 ($filename) to be a valid path, string given - Iteration 8 - -fileperms() expects parameter 1 to be a valid path, string given +fileperms() expects argument #1 ($filename) to be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt index ced25b2e71627..9eb5958dbb6c9 100644 --- a/ext/standard/tests/file/flock_error.phpt +++ b/ext/standard/tests/file/flock_error.phpt @@ -65,13 +65,13 @@ Illegal operation argument --- Iteration 3 --- Illegal operation argument --- Iteration 4 --- -flock() expects parameter 2 to be int, array given +flock() expects argument #2 ($operation) to be of type int, array given --- Iteration 5 --- -flock() expects parameter 2 to be int, array given +flock() expects argument #2 ($operation) to be of type int, array given --- Iteration 6 --- -flock() expects parameter 2 to be int, string given +flock() expects argument #2 ($operation) to be of type int, string given --- Iteration 7 --- -flock() expects parameter 2 to be int, string given +flock() expects argument #2 ($operation) to be of type int, string given --- Iteration 8 --- -flock() expects parameter 2 to be int, string given +flock() expects argument #2 ($operation) to be of type int, string given flock(): supplied resource is not a valid stream resource diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index 4318a844e8cef..32bb6b32a698f 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -191,9 +191,9 @@ bool(false) -- Iteration 22 -- bool(false) -- Iteration 23 -- -fnmatch() expects parameter 1 to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 24 -- -fnmatch() expects parameter 1 to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 25 -- bool(false) -- Iteration 26 -- @@ -267,44 +267,44 @@ bool(true) --- With Strings --- -- Iteration 0 -- bool(true) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(true) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(false) bool(true) -- Iteration 1 -- -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 2 -- bool(true) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(true) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(false) bool(true) -- Iteration 3 -- -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 4 -- bool(false) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(false) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(true) bool(false) -- Iteration 5 -- bool(true) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(true) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(false) bool(true) @@ -405,42 +405,42 @@ bool(true) bool(true) bool(true) bool(true) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(false) bool(false) -- Iteration 1 -- bool(true) bool(true) bool(true) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(false) bool(false) -- Iteration 2 -- bool(true) bool(true) bool(true) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(false) bool(false) -- Iteration 3 -- -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given -fnmatch() expects parameter 1 to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 4 -- bool(false) bool(false) bool(false) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(true) bool(false) -- Iteration 5 -- bool(false) bool(false) bool(false) -fnmatch() expects parameter 2 to be a valid path, string given +fnmatch() expects argument #2 ($filename) to be a valid path, string given bool(false) bool(true) diff --git a/ext/standard/tests/file/fopen_variation10-win32.phpt b/ext/standard/tests/file/fopen_variation10-win32.phpt index 97e2d8a6fbebb..234022dd6b9fa 100644 --- a/ext/standard/tests/file/fopen_variation10-win32.phpt +++ b/ext/standard/tests/file/fopen_variation10-win32.phpt @@ -97,21 +97,21 @@ file in root Warning: fopen(c\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d --\-- Warning: fopen(\\fopen_variation10.tmp): Failed to open stream: Invalid argument in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d --/-- Warning: fopen(/\fopen_variation10.tmp): Failed to open stream: Invalid argument in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d --c:fopen10.tmpdirTwo-- file in fopen10.tmpdirTwo @@ -121,7 +121,7 @@ file in fopen10.tmpdirTwo Warning: fopen(c:adir\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d --c:\/-- file in root @@ -143,4 +143,4 @@ file in fopen10.tmpDir Warning: fopen(/sortout\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d diff --git a/ext/standard/tests/file/fopen_variation11-win32.phpt b/ext/standard/tests/file/fopen_variation11-win32.phpt index a1d4c4c4e75b7..61879edf76b47 100644 --- a/ext/standard/tests/file/fopen_variation11-win32.phpt +++ b/ext/standard/tests/file/fopen_variation11-win32.phpt @@ -95,21 +95,21 @@ file in root Warning: fopen(c\fopen_variation11.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d --\-- Warning: fopen(\\FOPEN_VARIATION11.TMP): Failed to open stream: Invalid argument in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d --/-- Warning: fopen(\\FOPEN_VARIATION11.TMP): Failed to open stream: Invalid argument in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d --c:fopen11.tmpdirTwo-- file in fopen11.tmpdirTwo @@ -119,7 +119,7 @@ file in fopen11.tmpdirTwo Warning: fopen(c:adir\fopen_variation11.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d --c:\/-- file in root @@ -141,4 +141,4 @@ file in fopen11.tmpDir Warning: fopen(/sortout\fopen_variation11.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d +Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d diff --git a/ext/standard/tests/file/glob_variation-win32-mb.phpt b/ext/standard/tests/file/glob_variation-win32-mb.phpt index 2ced6fd355831..814f18a71dad6 100644 --- a/ext/standard/tests/file/glob_variation-win32-mb.phpt +++ b/ext/standard/tests/file/glob_variation-win32-mb.phpt @@ -334,7 +334,7 @@ array(0) { } -- Iteration 8 -- -glob() expects parameter 1 to be a valid path, string given +glob() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 9 -- array(0) { @@ -437,7 +437,7 @@ array(1) { array(0) { } -- Iteration 8 -- -glob() expects parameter 1 to be a valid path, string given +glob() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 9 -- array(0) { } diff --git a/ext/standard/tests/file/glob_variation-win32.phpt b/ext/standard/tests/file/glob_variation-win32.phpt index 32d56e8762f32..966d2b28e003a 100644 --- a/ext/standard/tests/file/glob_variation-win32.phpt +++ b/ext/standard/tests/file/glob_variation-win32.phpt @@ -333,7 +333,7 @@ array(0) { } -- Iteration 8 -- -glob() expects parameter 1 to be a valid path, string given +glob() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 9 -- array(0) { @@ -436,7 +436,7 @@ array(1) { array(0) { } -- Iteration 8 -- -glob() expects parameter 1 to be a valid path, string given +glob() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 9 -- array(0) { } diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt index eb5aff0cf4f8b..655b3efe7810e 100644 --- a/ext/standard/tests/file/glob_variation.phpt +++ b/ext/standard/tests/file/glob_variation.phpt @@ -336,7 +336,7 @@ array(0) { } -- Iteration 8 -- -glob() expects parameter 1 to be a valid path, string given +glob() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 9 -- array(0) { @@ -439,7 +439,7 @@ array(1) { array(0) { } -- Iteration 8 -- -glob() expects parameter 1 to be a valid path, string given +glob() expects argument #1 ($pattern) to be a valid path, string given -- Iteration 9 -- array(0) { } diff --git a/ext/standard/tests/file/is_dir_variation4.phpt b/ext/standard/tests/file/is_dir_variation4.phpt index 8d4838524ea61..f527974d90a2d 100644 --- a/ext/standard/tests/file/is_dir_variation4.phpt +++ b/ext/standard/tests/file/is_dir_variation4.phpt @@ -54,7 +54,7 @@ $file_path = __DIR__; $dir_name = $file_path."/is_dir_variation4"; rmdir($dir_name); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_dir() with different notations of dir names *** -- Iteration 1 -- bool(true) @@ -81,9 +81,9 @@ bool(true) bool(false) -- Iteration 9 -- -is_dir() expects parameter 1 to be a valid path, string given +is_dir() expects argument #1 ($filename) to be a valid path, string given -- Iteration 10 -- -is_dir() expects parameter 1 to be a valid path, string given +is_dir() expects argument #1 ($filename) to be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/is_executable_variation1.phpt b/ext/standard/tests/file/is_executable_variation1.phpt index 5c8193b44dc64..9dadbd6b0a0e2 100644 --- a/ext/standard/tests/file/is_executable_variation1.phpt +++ b/ext/standard/tests/file/is_executable_variation1.phpt @@ -67,7 +67,7 @@ echo "Done\n"; unlink(__DIR__."/is_executable_variation1/bar.tmp"); rmdir(__DIR__."/is_executable_variation1/"); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_executable(): usage variations *** -- Iteration 1 -- bool(false) @@ -80,9 +80,9 @@ bool(false) -- Iteration 5 -- bool(false) -- Iteration 6 -- -is_executable() expects parameter 1 to be a valid path, string given +is_executable() expects argument #1 ($filename) to be a valid path, string given -- Iteration 7 -- -is_executable() expects parameter 1 to be a valid path, string given +is_executable() expects argument #1 ($filename) to be a valid path, string given -- Iteration 8 -- bool(false) -- Iteration 9 -- diff --git a/ext/standard/tests/file/is_file_variation4.phpt b/ext/standard/tests/file/is_file_variation4.phpt index e67180c0865a2..5651c5fc023da 100644 --- a/ext/standard/tests/file/is_file_variation4.phpt +++ b/ext/standard/tests/file/is_file_variation4.phpt @@ -56,7 +56,7 @@ $dir_name = $file_path."/is_file_variation4"; unlink($dir_name."/is_file_variation4.tmp"); rmdir($dir_name); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_file() with different notations of file names *** - Iteration 1 - bool(true) @@ -71,8 +71,8 @@ bool(false) - Iteration 6 - bool(false) - Iteration 7 - -is_file() expects parameter 1 to be a valid path, string given +is_file() expects argument #1 ($filename) to be a valid path, string given - Iteration 8 - -is_file() expects parameter 1 to be a valid path, string given +is_file() expects argument #1 ($filename) to be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/is_readable_variation1.phpt b/ext/standard/tests/file/is_readable_variation1.phpt index ab2e591ad5af3..102f9b177c549 100644 --- a/ext/standard/tests/file/is_readable_variation1.phpt +++ b/ext/standard/tests/file/is_readable_variation1.phpt @@ -81,11 +81,11 @@ bool(false) -- Iteration 6 -- bool(false) -- Iteration 7 -- -is_readable() expects parameter 1 to be a valid path, string given +is_readable() expects argument #1 ($filename) to be a valid path, string given -- Iteration 8 -- -is_readable() expects parameter 1 to be a valid path, string given +is_readable() expects argument #1 ($filename) to be a valid path, string given -- Iteration 9 -- -is_readable() expects parameter 1 to be a valid path, string given +is_readable() expects argument #1 ($filename) to be a valid path, string given -- Iteration 10 -- bool(true) -- Iteration 11 -- diff --git a/ext/standard/tests/file/is_writable_variation1.phpt b/ext/standard/tests/file/is_writable_variation1.phpt index 45ef1524b6aa8..53090a9f8020e 100644 --- a/ext/standard/tests/file/is_writable_variation1.phpt +++ b/ext/standard/tests/file/is_writable_variation1.phpt @@ -92,14 +92,14 @@ bool(false) bool(false) bool(false) -- Iteration 7 -- -is_writable() expects parameter 1 to be a valid path, string given -is_writeable() expects parameter 1 to be a valid path, string given +is_writable() expects argument #1 ($filename) to be a valid path, string given +is_writeable() expects argument #1 ($filename) to be a valid path, string given -- Iteration 8 -- -is_writable() expects parameter 1 to be a valid path, string given -is_writeable() expects parameter 1 to be a valid path, string given +is_writable() expects argument #1 ($filename) to be a valid path, string given +is_writeable() expects argument #1 ($filename) to be a valid path, string given -- Iteration 9 -- -is_writable() expects parameter 1 to be a valid path, string given -is_writeable() expects parameter 1 to be a valid path, string given +is_writable() expects argument #1 ($filename) to be a valid path, string given +is_writeable() expects argument #1 ($filename) to be a valid path, string given -- Iteration 10 -- bool(true) bool(true) diff --git a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt index bd6a7c56a904f..bcf83fb2bcb69 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt @@ -63,8 +63,8 @@ Warning: rmdir(%s/mkdir_variation2/): %s on line %d bool(false) *** Testing mkdir() and rmdir() for binary safe functionality *** -mkdir() expects parameter 1 to be a valid path, string given -rmdir() expects parameter 1 to be a valid path, string given +mkdir() expects argument #1 ($pathname) to be a valid path, string given +rmdir() expects argument #1 ($dirname) to be a valid path, string given *** Testing mkdir() with miscellaneous input *** bool(true) diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt index c6c3f87a36abe..02fa1266fdaae 100644 --- a/ext/standard/tests/file/readfile_variation10-win32.phpt +++ b/ext/standard/tests/file/readfile_variation10-win32.phpt @@ -75,10 +75,10 @@ Warning: readfile(): Filename cannot be empty in %s on line %d Warning: readfile( ): Failed to open stream: Permission denied in %s on line %d -- Filename: \0 -- -readfile() expects parameter 1 to be a valid path, string given +readfile() expects argument #1 ($filename) to be a valid path, string given -- Filename: array() -- -readfile() expects parameter 1 to be a valid path, array given +readfile() expects argument #1 ($filename) to be a valid path, array given -- Filename: /no/such/file/dir -- diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt index fd501eaef59fb1634a9d5578a27f44af4fdb6afd..f735ba5b58a743044a49cf139cc17666747a168f 100644 GIT binary patch delta 35 rcmdnbdzyE{EmrZwqV&?-)VvY}WkUrGm9)&9)V##pRL#jxS#JRV?HvtI delta 23 fcmX@jyPtQ%EmrP=#G=I9)RNR91;fc7S#JRVa&ZZ? diff --git a/ext/standard/tests/file/stream_rfc2397_006.phpt b/ext/standard/tests/file/stream_rfc2397_006.phpt index 2c8b8fd7209ad..fd362a6ea07c1 100644 --- a/ext/standard/tests/file/stream_rfc2397_006.phpt +++ b/ext/standard/tests/file/stream_rfc2397_006.phpt @@ -23,8 +23,8 @@ foreach($streams as $stream) ?> --EXPECTF-- -file_get_contents() expects parameter 1 to be a valid path, string given -file_get_contents() expects parameter 1 to be a valid path, string given +file_get_contents() expects argument #1 ($filename) to be a valid path, string given +file_get_contents() expects argument #1 ($filename) to be a valid path, string given Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhcg==): Failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d bool(false) diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt index 3311b0bc7cb10..1639cebe997b8 100644 --- a/ext/standard/tests/file/tempnam_variation3-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt @@ -110,9 +110,9 @@ Notice: tempnam(): file created in the system's temporary directory in %stempnam Failed, not created in the correct directory %s vs %s 0 -- Iteration 6 -- -tempnam() expects parameter 2 to be a valid path, string given +tempnam() expects argument #2 ($prefix) to be a valid path, string given -- Iteration 7 -- -tempnam() expects parameter 2 to be a valid path, array given +tempnam() expects argument #2 ($prefix) to be a valid path, array given -- Iteration 8 -- OK -- Iteration 9 -- diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt index 78ef3bbaca554..b255b32f41655 100644 --- a/ext/standard/tests/file/tempnam_variation3.phpt +++ b/ext/standard/tests/file/tempnam_variation3.phpt @@ -106,9 +106,9 @@ File name is => %s/%s File permissions are => 100600 File created in => directory specified -- Iteration 6 -- -tempnam() expects parameter 2 to be a valid path, string given +tempnam() expects argument #2 ($prefix) to be a valid path, string given -- Iteration 7 -- -tempnam() expects parameter 2 to be a valid path, array given +tempnam() expects argument #2 ($prefix) to be a valid path, array given -- Iteration 8 -- File name is => %s/dir%s File permissions are => 100600 diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt index 26ccaef84d2fa..069b2f369d2b5 100644 --- a/ext/standard/tests/file/tempnam_variation7-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt @@ -100,9 +100,9 @@ File name is => %s%et%s File permissions are => 100666 File created in => temp dir -- Iteration 6 -- -tempnam() expects parameter 1 to be a valid path, string given +tempnam() expects argument #1 ($dir) to be a valid path, string given -- Iteration 7 -- -tempnam() expects parameter 1 to be a valid path, array given +tempnam() expects argument #1 ($dir) to be a valid path, array given -- Iteration 8 -- Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt index a385fe43b623c..5ee1d80c7d59a 100644 --- a/ext/standard/tests/file/tempnam_variation7.phpt +++ b/ext/standard/tests/file/tempnam_variation7.phpt @@ -105,9 +105,9 @@ File name is => %s%etempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 6 -- -tempnam() expects parameter 1 to be a valid path, string given +tempnam() expects argument #1 ($dir) to be a valid path, string given -- Iteration 7 -- -tempnam() expects parameter 1 to be a valid path, array given +tempnam() expects argument #1 ($dir) to be a valid path, array given -- Iteration 8 -- Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d diff --git a/ext/standard/tests/file/windows_links/bug78862.phpt b/ext/standard/tests/file/windows_links/bug78862.phpt index 3bd787e7054a9..70a26c1d5fffe 100644 --- a/ext/standard/tests/file/windows_links/bug78862.phpt +++ b/ext/standard/tests/file/windows_links/bug78862.phpt @@ -7,7 +7,7 @@ var_dump(link(__DIR__ . "/bug78862.target\0more", __DIR__ . "/bug78862.link\0mor var_dump(file_exists(__DIR__ . '/bug78862.link')); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: link() expects parameter 1 to be a valid path, string given in %s:%d +Fatal error: Uncaught TypeError: link() expects argument #1 ($target) to be a valid path, string given in %s:%d Stack trace: #0 %s(%d): link('%s', '%s') #1 {main} diff --git a/ext/standard/tests/general_functions/bug41970.phpt b/ext/standard/tests/general_functions/bug41970.phpt index f43bf64380a64..211ad3b2d318b 100644 --- a/ext/standard/tests/general_functions/bug41970.phpt +++ b/ext/standard/tests/general_functions/bug41970.phpt @@ -21,11 +21,11 @@ try { echo "Done\n"; ?> --EXPECTF-- -Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line %d +Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d bool(true) -strlen() expects parameter 1 to be string, array given +strlen() expects argument #1 ($str) to be of type string, array given -Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line %d +Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d bool(true) -strlen() expects parameter 1 to be string, array given +strlen() expects argument #1 ($str) to be of type string, array given Done diff --git a/ext/standard/tests/general_functions/call_user_func_array_variation_001.phpt b/ext/standard/tests/general_functions/call_user_func_array_variation_001.phpt index a5b61d9971048..1f2abbae29b70 100644 --- a/ext/standard/tests/general_functions/call_user_func_array_variation_001.phpt +++ b/ext/standard/tests/general_functions/call_user_func_array_variation_001.phpt @@ -42,7 +42,7 @@ array(1) { } ------ Calling by_ref() with unreferenced argument ------ -Warning: Parameter 1 to by_ref() expected to be a reference, value given in %s on line %d +Warning: by_ref() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d array(1) { [0]=> string(8) "original" diff --git a/ext/standard/tests/general_functions/callbacks_001.phpt b/ext/standard/tests/general_functions/callbacks_001.phpt index 827f5c0182a44..b667da66c9924 100644 --- a/ext/standard/tests/general_functions/callbacks_001.phpt +++ b/ext/standard/tests/general_functions/callbacks_001.phpt @@ -106,4 +106,4 @@ O $this|O::who O $this|B::who -call_user_func() expects parameter 1 to be a valid callback, class 'P' is not a subclass of 'B' +call_user_func() expects argument #1 ($function) to be a valid callback, class 'P' is not a subclass of 'B' diff --git a/ext/standard/tests/general_functions/callbacks_002.phpt b/ext/standard/tests/general_functions/callbacks_002.phpt index 0d44035e0e558..4f327e3b86fa6 100644 --- a/ext/standard/tests/general_functions/callbacks_002.phpt +++ b/ext/standard/tests/general_functions/callbacks_002.phpt @@ -21,6 +21,6 @@ try { ?> --EXPECTF-- -call_user_func() expects parameter 1 to be a valid callback, class 'Foo' not found -call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object -call_user_func() expects parameter 1 to be a valid callback, second array member is not a valid method +call_user_func() expects argument #1 ($function) to be a valid callback, class 'Foo' not found +call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object +call_user_func() expects argument #1 ($function) to be a valid callback, second array member is not a valid method diff --git a/ext/standard/tests/math/abs_variation.phpt b/ext/standard/tests/math/abs_variation.phpt index 854cb71181e74..e635fa2fca191 100644 --- a/ext/standard/tests/math/abs_variation.phpt +++ b/ext/standard/tests/math/abs_variation.phpt @@ -105,25 +105,25 @@ int(1) int(0) -- Iteration 7 -- -abs() expects parameter 1 to be int or float, string given +abs() expects argument #1 ($number) to be of type int|float, string given -- Iteration 8 -- -abs() expects parameter 1 to be int or float, string given +abs() expects argument #1 ($number) to be of type int|float, string given -- Iteration 9 -- -abs() expects parameter 1 to be int or float, array given +abs() expects argument #1 ($number) to be of type int|float, array given -- Iteration 10 -- -abs() expects parameter 1 to be int or float, string given +abs() expects argument #1 ($number) to be of type int|float, string given -- Iteration 11 -- -abs() expects parameter 1 to be int or float, string given +abs() expects argument #1 ($number) to be of type int|float, string given -- Iteration 12 -- -abs() expects parameter 1 to be int or float, string given +abs() expects argument #1 ($number) to be of type int|float, string given -- Iteration 13 -- -abs() expects parameter 1 to be int or float, object given +abs() expects argument #1 ($number) to be of type int|float, object given -- Iteration 14 -- int(0) @@ -132,4 +132,4 @@ int(0) int(0) -- Iteration 16 -- -abs() expects parameter 1 to be int or float, resource given +abs() expects argument #1 ($number) to be of type int|float, resource given diff --git a/ext/standard/tests/math/bindec_variation1.phpt b/ext/standard/tests/math/bindec_variation1.phpt index 2b166a3edd61e..9a29aa3480fd1 100644 --- a/ext/standard/tests/math/bindec_variation1.phpt +++ b/ext/standard/tests/math/bindec_variation1.phpt @@ -151,7 +151,7 @@ int(0) int(0) -- Iteration 18 -- -bindec() expects parameter 1 to be string, array given +bindec() expects argument #1 ($binary_string) to be of type string, array given -- Iteration 19 -- @@ -175,4 +175,4 @@ int(0) int(0) -- Iteration 24 -- -bindec() expects parameter 1 to be string, resource given +bindec() expects argument #1 ($binary_string) to be of type string, resource given diff --git a/ext/standard/tests/math/bindec_variation1_64bit.phpt b/ext/standard/tests/math/bindec_variation1_64bit.phpt index 6784c136012e5..16f205f29f9d3 100644 --- a/ext/standard/tests/math/bindec_variation1_64bit.phpt +++ b/ext/standard/tests/math/bindec_variation1_64bit.phpt @@ -151,7 +151,7 @@ int(0) int(0) -- Iteration 18 -- -bindec() expects parameter 1 to be string, array given +bindec() expects argument #1 ($binary_string) to be of type string, array given -- Iteration 19 -- @@ -175,4 +175,4 @@ int(0) int(0) -- Iteration 24 -- -bindec() expects parameter 1 to be string, resource given +bindec() expects argument #1 ($binary_string) to be of type string, resource given diff --git a/ext/standard/tests/math/ceil_variation1.phpt b/ext/standard/tests/math/ceil_variation1.phpt index 815093ea49dfb..1946c77879b30 100644 --- a/ext/standard/tests/math/ceil_variation1.phpt +++ b/ext/standard/tests/math/ceil_variation1.phpt @@ -98,25 +98,25 @@ float(1) float(0) -- Iteration 7 -- -ceil() expects parameter 1 to be int or float, string given +ceil() expects argument #1 ($number) to be of type int|float, string given -- Iteration 8 -- -ceil() expects parameter 1 to be int or float, string given +ceil() expects argument #1 ($number) to be of type int|float, string given -- Iteration 9 -- -ceil() expects parameter 1 to be int or float, array given +ceil() expects argument #1 ($number) to be of type int|float, array given -- Iteration 10 -- -ceil() expects parameter 1 to be int or float, string given +ceil() expects argument #1 ($number) to be of type int|float, string given -- Iteration 11 -- -ceil() expects parameter 1 to be int or float, string given +ceil() expects argument #1 ($number) to be of type int|float, string given -- Iteration 12 -- -ceil() expects parameter 1 to be int or float, string given +ceil() expects argument #1 ($number) to be of type int|float, string given -- Iteration 13 -- -ceil() expects parameter 1 to be int or float, object given +ceil() expects argument #1 ($number) to be of type int|float, object given -- Iteration 14 -- float(0) @@ -125,4 +125,4 @@ float(0) float(0) -- Iteration 16 -- -ceil() expects parameter 1 to be int or float, resource given +ceil() expects argument #1 ($number) to be of type int|float, resource given diff --git a/ext/standard/tests/math/floor_variation1.phpt b/ext/standard/tests/math/floor_variation1.phpt index dd0e70b863780..2aa72337bbc22 100644 --- a/ext/standard/tests/math/floor_variation1.phpt +++ b/ext/standard/tests/math/floor_variation1.phpt @@ -98,25 +98,25 @@ float(1) float(0) -- Iteration 7 -- -floor() expects parameter 1 to be int or float, string given +floor() expects argument #1 ($number) to be of type int|float, string given -- Iteration 8 -- -floor() expects parameter 1 to be int or float, string given +floor() expects argument #1 ($number) to be of type int|float, string given -- Iteration 9 -- -floor() expects parameter 1 to be int or float, array given +floor() expects argument #1 ($number) to be of type int|float, array given -- Iteration 10 -- -floor() expects parameter 1 to be int or float, string given +floor() expects argument #1 ($number) to be of type int|float, string given -- Iteration 11 -- -floor() expects parameter 1 to be int or float, string given +floor() expects argument #1 ($number) to be of type int|float, string given -- Iteration 12 -- -floor() expects parameter 1 to be int or float, string given +floor() expects argument #1 ($number) to be of type int|float, string given -- Iteration 13 -- -floor() expects parameter 1 to be int or float, object given +floor() expects argument #1 ($number) to be of type int|float, object given -- Iteration 14 -- float(0) @@ -125,4 +125,4 @@ float(0) float(0) -- Iteration 16 -- -floor() expects parameter 1 to be int or float, resource given +floor() expects argument #1 ($number) to be of type int|float, resource given diff --git a/ext/standard/tests/math/hexdec_variation1.phpt b/ext/standard/tests/math/hexdec_variation1.phpt index c50c550f61a17..5df2c7ff06625 100644 --- a/ext/standard/tests/math/hexdec_variation1.phpt +++ b/ext/standard/tests/math/hexdec_variation1.phpt @@ -157,7 +157,7 @@ int(0) int(0) -- Iteration 20 -- -hexdec() expects parameter 1 to be string, array given +hexdec() expects argument #1 ($hex_string) to be of type string, array given -- Iteration 21 -- @@ -181,4 +181,4 @@ int(0) int(0) -- Iteration 26 -- -hexdec() expects parameter 1 to be string, resource given +hexdec() expects argument #1 ($hex_string) to be of type string, resource given diff --git a/ext/standard/tests/math/hexdec_variation1_64bit.phpt b/ext/standard/tests/math/hexdec_variation1_64bit.phpt index d3b22d8040986..6d984502af358 100644 --- a/ext/standard/tests/math/hexdec_variation1_64bit.phpt +++ b/ext/standard/tests/math/hexdec_variation1_64bit.phpt @@ -157,7 +157,7 @@ int(0) int(0) -- Iteration 20 -- -hexdec() expects parameter 1 to be string, array given +hexdec() expects argument #1 ($hex_string) to be of type string, array given -- Iteration 21 -- @@ -181,4 +181,4 @@ int(0) int(0) -- Iteration 26 -- -hexdec() expects parameter 1 to be string, resource given +hexdec() expects argument #1 ($hex_string) to be of type string, resource given diff --git a/ext/standard/tests/math/octdec_variation1.phpt b/ext/standard/tests/math/octdec_variation1.phpt index 48e4faf46616d..18dfc698ce847 100644 --- a/ext/standard/tests/math/octdec_variation1.phpt +++ b/ext/standard/tests/math/octdec_variation1.phpt @@ -160,7 +160,7 @@ int(0) int(0) -- Iteration 20 -- -octdec() expects parameter 1 to be string, array given +octdec() expects argument #1 ($octal_string) to be of type string, array given -- Iteration 21 -- @@ -184,5 +184,5 @@ int(0) int(0) -- Iteration 26 -- -octdec() expects parameter 1 to be string, resource given +octdec() expects argument #1 ($octal_string) to be of type string, resource given ---Done--- diff --git a/ext/standard/tests/math/round_variation1.phpt b/ext/standard/tests/math/round_variation1.phpt index b8566e6df7d24..add8cf76373d7 100644 --- a/ext/standard/tests/math/round_variation1.phpt +++ b/ext/standard/tests/math/round_variation1.phpt @@ -143,25 +143,25 @@ float(1) float(0) -- Iteration 17 -- -round() expects parameter 1 to be int or float, string given +round() expects argument #1 ($number) to be of type int|float, string given -- Iteration 18 -- -round() expects parameter 1 to be int or float, string given +round() expects argument #1 ($number) to be of type int|float, string given -- Iteration 19 -- -round() expects parameter 1 to be int or float, array given +round() expects argument #1 ($number) to be of type int|float, array given -- Iteration 20 -- -round() expects parameter 1 to be int or float, string given +round() expects argument #1 ($number) to be of type int|float, string given -- Iteration 21 -- -round() expects parameter 1 to be int or float, string given +round() expects argument #1 ($number) to be of type int|float, string given -- Iteration 22 -- -round() expects parameter 1 to be int or float, string given +round() expects argument #1 ($number) to be of type int|float, string given -- Iteration 23 -- -round() expects parameter 1 to be int or float, object given +round() expects argument #1 ($number) to be of type int|float, object given -- Iteration 24 -- float(0) @@ -170,4 +170,4 @@ float(0) float(0) -- Iteration 26 -- -round() expects parameter 1 to be int or float, resource given +round() expects argument #1 ($number) to be of type int|float, resource given diff --git a/ext/standard/tests/password/password_hash_error.phpt b/ext/standard/tests/password/password_hash_error.phpt index a0d8c6461e71f..dc8def5eefb95 100644 --- a/ext/standard/tests/password/password_hash_error.phpt +++ b/ext/standard/tests/password/password_hash_error.phpt @@ -40,6 +40,6 @@ password_hash() expects at least 2 parameters, 1 given Warning: Array to string conversion in %s on line %d Unknown password hashing algorithm: Array -password_hash() expects parameter 3 to be array, object given -password_hash() expects parameter 3 to be array, string given -password_hash() expects parameter 1 to be string, array given +password_hash() expects argument #3 ($options) to be of type array, object given +password_hash() expects argument #3 ($options) to be of type array, string given +password_hash() expects argument #1 ($password) to be of type string, array given diff --git a/ext/standard/tests/password/password_needs_rehash_error.phpt b/ext/standard/tests/password/password_needs_rehash_error.phpt index f64723ee856d7..688bbb4eb7852 100644 --- a/ext/standard/tests/password/password_needs_rehash_error.phpt +++ b/ext/standard/tests/password/password_needs_rehash_error.phpt @@ -26,9 +26,9 @@ try { echo "OK!"; ?> ---EXPECTF-- +--EXPECT-- password_needs_rehash() expects at least 2 parameters, 1 given bool(false) -password_needs_rehash() expects parameter 1 to be string, array given -password_needs_rehash() expects parameter 3 to be array, string given +password_needs_rehash() expects argument #1 ($hash) to be of type string, array given +password_needs_rehash() expects argument #3 ($options) to be of type array, string given OK! diff --git a/ext/standard/tests/strings/addcslashes_001.phpt b/ext/standard/tests/strings/addcslashes_001.phpt index 5b60f6168dd2ba6f56fd26bfd6f851302de5cf2d..6b15319c0e0ba870145cf1b39355246afa574eaf 100644 GIT binary patch delta 53 zcmcc3^Nwf3Ii|_ynVzd87NwWwrskC>C>tqgs3d137Ug6XmuM=K?4}6bAqR delta 35 rcmaFIbDL+wIVMK8$>*4!3lt<4CFZ7 --EXPECT-- -get_html_translation_table() expects parameter 1 to be int, float given +get_html_translation_table() expects argument #1 ($table) to be of type int, float given diff --git a/ext/standard/tests/strings/chunk_split_variation5.phpt b/ext/standard/tests/strings/chunk_split_variation5.phpt index bfcaa54e265a2459e06dfa35ea0c0d2374515e36..85690a234ed998d8eed8289fc0a1147698924549 100644 GIT binary patch delta 48 zcmbOyxJht>1BXgtQF>`^YF>$gvXO#@N^(YNUUp7uo~A-czCu!}LVlV;NoB$001iI@ Dh}jS6 delta 28 jcmdlaI8Shc1BXCCVo_plYDsF5f{{W=zCzOE6b?TCjO7Vn diff --git a/ext/standard/tests/strings/chunk_split_variation8.phpt b/ext/standard/tests/strings/chunk_split_variation8.phpt index 74b41ede03a22..fe19f325be136 100644 --- a/ext/standard/tests/strings/chunk_split_variation8.phpt +++ b/ext/standard/tests/strings/chunk_split_variation8.phpt @@ -83,6 +83,6 @@ string(129) "This's heredoc string with and It has _speci@l ch@r$ 2222 !!!Now \k as escape char to test chunk_split():::" -- Iteration 7 -- -chunk_split() expects parameter 2 to be int, float given +chunk_split() expects argument #2 ($chunklen) to be of type int, float given -- Iteration 8 -- Chunk length should be greater than zero diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt index ae460d6037f9082f554ed1ee5e290069c13c28a4..4fdb97b6cd8aa20dc93ebbcdb9c5739a3d1295ab 100644 GIT binary patch delta 450 zcmdm~ztV8ST|xKE+=86^lvE8(h180I)Z~(4g~X!t(%jU%5(Q;L1r3$-oYGWHg_3-Q zq*R6cG=-ANf>ed#lA_GKbRD3|qQpvt^vtreu-W(ws#Yn!3YQ%+<5CLHX3<#`_e ---EXPECTF-- +--EXPECT-- *** Testing join() : usage variations *** --- Testing join() by supplying different values for 'glue' argument --- @@ -125,15 +125,15 @@ string(29) "element11.07654321E-9element2" -- Iteration 9 -- string(19) "element10.5element2" -- Iteration 10 -- -The first argument must be a string +join() expects argument #1 ($glue) to be of type string, array given -- Iteration 11 -- -The first argument must be a string +join() expects argument #1 ($glue) to be of type string, array given -- Iteration 12 -- -The first argument must be a string +join() expects argument #1 ($glue) to be of type string, array given -- Iteration 13 -- -The first argument must be a string +join() expects argument #1 ($glue) to be of type string, array given -- Iteration 14 -- -The first argument must be a string +join() expects argument #1 ($glue) to be of type string, array given -- Iteration 15 -- string(17) "element11element2" -- Iteration 16 -- @@ -153,7 +153,7 @@ string(16) "element1element2" -- Iteration 23 -- string(16) "element1element2" -- Iteration 24 -- -join() expects parameter 1 to be string or array, resource given +join() expects argument #1 ($glue) to be of type string|array, resource given -- Iteration 25 -- string(16) "element1element2" -- Iteration 26 -- diff --git a/ext/standard/tests/strings/join_variation2.phpt b/ext/standard/tests/strings/join_variation2.phpt index d44ff90921c7a..fe52aebeb7e13 100644 --- a/ext/standard/tests/strings/join_variation2.phpt +++ b/ext/standard/tests/strings/join_variation2.phpt @@ -108,49 +108,49 @@ echo "Done\n"; --- Testing join() by supplying different values for 'pieces' argument --- -- Iteration 1 -- -join() expects parameter 2 to be array, int given +join() expects argument #2 ($pieces) to be of type array, int given -- Iteration 2 -- -join() expects parameter 2 to be array, int given +join() expects argument #2 ($pieces) to be of type array, int given -- Iteration 3 -- -join() expects parameter 2 to be array, int given +join() expects argument #2 ($pieces) to be of type array, int given -- Iteration 4 -- -join() expects parameter 2 to be array, int given +join() expects argument #2 ($pieces) to be of type array, int given -- Iteration 5 -- -join() expects parameter 2 to be array, float given +join() expects argument #2 ($pieces) to be of type array, float given -- Iteration 6 -- -join() expects parameter 2 to be array, float given +join() expects argument #2 ($pieces) to be of type array, float given -- Iteration 7 -- -join() expects parameter 2 to be array, float given +join() expects argument #2 ($pieces) to be of type array, float given -- Iteration 8 -- -join() expects parameter 2 to be array, float given +join() expects argument #2 ($pieces) to be of type array, float given -- Iteration 9 -- -join() expects parameter 2 to be array, float given +join() expects argument #2 ($pieces) to be of type array, float given -- Iteration 10 -- -join() expects parameter 2 to be array, bool given +join() expects argument #2 ($pieces) to be of type array, bool given -- Iteration 11 -- -join() expects parameter 2 to be array, bool given +join() expects argument #2 ($pieces) to be of type array, bool given -- Iteration 12 -- -join() expects parameter 2 to be array, bool given +join() expects argument #2 ($pieces) to be of type array, bool given -- Iteration 13 -- -join() expects parameter 2 to be array, bool given +join() expects argument #2 ($pieces) to be of type array, bool given -- Iteration 14 -- -join() expects parameter 2 to be array, string given +join() expects argument #2 ($pieces) to be of type array, string given -- Iteration 15 -- -join() expects parameter 2 to be array, string given +join() expects argument #2 ($pieces) to be of type array, string given -- Iteration 16 -- -join() expects parameter 2 to be array, object given +join() expects argument #2 ($pieces) to be of type array, object given -- Iteration 17 -- -join() expects parameter 2 to be array, string given +join() expects argument #2 ($pieces) to be of type array, string given -- Iteration 18 -- -join() expects parameter 2 to be array, string given +join() expects argument #2 ($pieces) to be of type array, string given -- Iteration 19 -- -join() expects parameter 2 to be array, null given +join() expects argument #2 ($pieces) to be of type array, null given -- Iteration 20 -- -join() expects parameter 2 to be array, null given +join() expects argument #2 ($pieces) to be of type array, null given -- Iteration 21 -- -join() expects parameter 2 to be array, resource given +join() expects argument #2 ($pieces) to be of type array, resource given -- Iteration 22 -- -join() expects parameter 2 to be array, null given +join() expects argument #2 ($pieces) to be of type array, null given -- Iteration 23 -- -join() expects parameter 2 to be array, null given +join() expects argument #2 ($pieces) to be of type array, null given Done diff --git a/ext/standard/tests/strings/join_variation4.phpt b/ext/standard/tests/strings/join_variation4.phpt index e1739facc538eb72d9a00340ce4cd5733bcc74a3..25ea7664217dfa055545818b09c9fe19b19c017c 100644 GIT binary patch delta 94 zcmca4_(^aBD+{x(F4yEZM$OGeEar?ZS^1fH8k!2J6$PouCB+JfMd_uvsd*&|%7zLW wD(N|;shSEU`3gy?3i)XYC6xuK3dJQwnR)3tK$S&_l?v&ZWvO|adsy9=0dn6Sh5!Hn delta 62 zcmew)cu8;rD+`O8t}fT)I7ZFQhAifc${`u43Tc@|#U%=fMd_uvsd*&|xurl}QmR6t QLUBn^W?uT{HLPyT0AU0aO#lD@ diff --git a/ext/standard/tests/strings/join_variation5.phpt b/ext/standard/tests/strings/join_variation5.phpt index 4e8ad88d14704..63e884e438ffc 100644 --- a/ext/standard/tests/strings/join_variation5.phpt +++ b/ext/standard/tests/strings/join_variation5.phpt @@ -41,7 +41,7 @@ Warning: Array to string conversion in %s on line %d Warning: Array to string conversion in %s on line %d string(27) "ArrayTESTArrayTESTPHPTEST50" -The first argument must be a string +join() expects argument #1 ($glue) to be of type string, array given Warning: Array to string conversion in %s on line %d diff --git a/ext/standard/tests/strings/printf_variation1.phpt b/ext/standard/tests/strings/printf_variation1.phpt index d6fad7e97a81e..61dd6b3aa4d11 100644 --- a/ext/standard/tests/strings/printf_variation1.phpt +++ b/ext/standard/tests/strings/printf_variation1.phpt @@ -122,7 +122,7 @@ foreach($values as $value) { fclose($file_handle); ?> ---EXPECTF-- +--EXPECT-- *** Testing printf() : with unexpected values for format argument *** -- Iteration 1 -- @@ -198,29 +198,29 @@ int(3) int(3) -- Iteration 10 -- -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given -- Iteration 11 -- -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given -- Iteration 12 -- -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given -- Iteration 13 -- -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given -- Iteration 14 -- -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given -printf() expects parameter 1 to be string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given +printf() expects argument #1 ($format) to be of type string, array given -- Iteration 15 -- @@ -311,6 +311,6 @@ int(0) int(0) -- Iteration 26 -- -printf() expects parameter 1 to be string, resource given -printf() expects parameter 1 to be string, resource given -printf() expects parameter 1 to be string, resource given +printf() expects argument #1 ($format) to be of type string, resource given +printf() expects argument #1 ($format) to be of type string, resource given +printf() expects argument #1 ($format) to be of type string, resource given diff --git a/ext/standard/tests/strings/sprintf_variation1.phpt b/ext/standard/tests/strings/sprintf_variation1.phpt index f30cf5182ec3e..b1f2395003145 100644 --- a/ext/standard/tests/strings/sprintf_variation1.phpt +++ b/ext/standard/tests/strings/sprintf_variation1.phpt @@ -117,7 +117,7 @@ fclose($file_handle); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing sprintf() : with unexpected values for format argument *** -- Iteration 1 -- @@ -166,29 +166,29 @@ string(3) "0.5" string(3) "0.5" -- Iteration 10 -- -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 11 -- -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 12 -- -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 13 -- -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 14 -- -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given -sprintf() expects parameter 1 to be string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given +sprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 15 -- string(0) "" @@ -246,7 +246,7 @@ string(0) "" string(0) "" -- Iteration 26 -- -sprintf() expects parameter 1 to be string, resource given -sprintf() expects parameter 1 to be string, resource given -sprintf() expects parameter 1 to be string, resource given +sprintf() expects argument #1 ($format) to be of type string, resource given +sprintf() expects argument #1 ($format) to be of type string, resource given +sprintf() expects argument #1 ($format) to be of type string, resource given Done diff --git a/ext/standard/tests/strings/str_pad_variation1.phpt b/ext/standard/tests/strings/str_pad_variation1.phpt index 6123bc60c9ae5..b093fb691e2bb 100644 --- a/ext/standard/tests/strings/str_pad_variation1.phpt +++ b/ext/standard/tests/strings/str_pad_variation1.phpt @@ -36,7 +36,6 @@ var_dump( str_pad($input, $php_int_max_pad_length) ); ?> --EXPECTF-- *** Testing str_pad() function: with large value for for 'pad_length' argument *** -str_pad() expects parameter 2 to be int, float given +str_pad() expects argument #2 ($pad_length) to be of type int, float given Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d - diff --git a/ext/standard/tests/strings/str_replace_basic.phpt b/ext/standard/tests/strings/str_replace_basic.phpt index fa39b24e3a8f0..1a0b7d5531546 100644 --- a/ext/standard/tests/strings/str_replace_basic.phpt +++ b/ext/standard/tests/strings/str_replace_basic.phpt @@ -47,5 +47,5 @@ string(1) "q" int(1) string(0) "" int(0) -str_replace() expects parameter 3 to be string or array, resource given +str_replace() expects argument #3 ($subject) to be of type string|array, resource given resource(%d) of type (stream) diff --git a/ext/standard/tests/strings/str_replace_variation3.phpt b/ext/standard/tests/strings/str_replace_variation3.phpt index f1bbf89b9fdc7..d5d56b820846b 100644 --- a/ext/standard/tests/strings/str_replace_variation3.phpt +++ b/ext/standard/tests/strings/str_replace_variation3.phpt @@ -200,8 +200,8 @@ array(2) { int(1) -- Testing Resources -- -str_replace() expects parameter 3 to be string or array, resource given -str_replace() expects parameter 3 to be string or array, resource given +str_replace() expects argument #3 ($subject) to be of type string|array, resource given +str_replace() expects argument #3 ($subject) to be of type string|array, resource given -- Testing a longer and heredoc string -- string(623) "FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789 diff --git a/ext/standard/tests/strings/stripos_variation10.phpt b/ext/standard/tests/strings/stripos_variation10.phpt index 879da88aa7d4c..f36c23dfbd3f6 100644 --- a/ext/standard/tests/strings/stripos_variation10.phpt +++ b/ext/standard/tests/strings/stripos_variation10.phpt @@ -126,19 +126,19 @@ bool(false) int(17) -- Iteration 10 -- -stripos() expects parameter 2 to be string, array given +stripos() expects argument #2 ($needle) to be of type string, array given -- Iteration 11 -- -stripos() expects parameter 2 to be string, array given +stripos() expects argument #2 ($needle) to be of type string, array given -- Iteration 12 -- -stripos() expects parameter 2 to be string, array given +stripos() expects argument #2 ($needle) to be of type string, array given -- Iteration 13 -- -stripos() expects parameter 2 to be string, array given +stripos() expects argument #2 ($needle) to be of type string, array given -- Iteration 14 -- -stripos() expects parameter 2 to be string, array given +stripos() expects argument #2 ($needle) to be of type string, array given -- Iteration 15 -- int(9) @@ -168,7 +168,7 @@ int(0) int(0) -- Iteration 24 -- -stripos() expects parameter 2 to be string, resource given +stripos() expects argument #2 ($needle) to be of type string, resource given -- Iteration 25 -- int(0) diff --git a/ext/standard/tests/strings/stripos_variation11.phpt b/ext/standard/tests/strings/stripos_variation11.phpt index 7a9c9ff9a06cf..9746cdb59a2c1 100644 --- a/ext/standard/tests/strings/stripos_variation11.phpt +++ b/ext/standard/tests/strings/stripos_variation11.phpt @@ -96,7 +96,7 @@ for($index = 0; $index < count($values); $index ++) { echo "*** Done ***"; ?> ---EXPECTF-- +--EXPECT-- *** Testing stripos() function with unexpected values for haystack and needle *** -- Iteration 1 -- int(0) @@ -126,20 +126,20 @@ bool(false) int(0) bool(false) -- Iteration 10 -- -TypeError: stripos() expects parameter 1 to be string, array given -TypeError: stripos() expects parameter 1 to be string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 11 -- -TypeError: stripos() expects parameter 1 to be string, array given -TypeError: stripos() expects parameter 1 to be string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 12 -- -TypeError: stripos() expects parameter 1 to be string, array given -TypeError: stripos() expects parameter 1 to be string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 13 -- -TypeError: stripos() expects parameter 1 to be string, array given -TypeError: stripos() expects parameter 1 to be string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 14 -- -TypeError: stripos() expects parameter 1 to be string, array given -TypeError: stripos() expects parameter 1 to be string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 15 -- int(0) bool(false) @@ -168,8 +168,8 @@ ValueError: Offset not contained in string int(0) ValueError: Offset not contained in string -- Iteration 24 -- -TypeError: stripos() expects parameter 1 to be string, resource given -TypeError: stripos() expects parameter 1 to be string, resource given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, resource given +TypeError: stripos() expects argument #1 ($haystack) to be of type string, resource given -- Iteration 25 -- int(0) ValueError: Offset not contained in string diff --git a/ext/standard/tests/strings/stristr_variation2.phpt b/ext/standard/tests/strings/stristr_variation2.phpt index 8448292802c95..7c25c4032d57d 100644 --- a/ext/standard/tests/strings/stristr_variation2.phpt +++ b/ext/standard/tests/strings/stristr_variation2.phpt @@ -100,11 +100,11 @@ bool(false) -- Iteration 7 -- bool(false) -- Iteration 8 -- -stristr() expects parameter 2 to be string, array given +stristr() expects argument #2 ($needle) to be of type string, array given -- Iteration 9 -- -stristr() expects parameter 2 to be string, array given +stristr() expects argument #2 ($needle) to be of type string, array given -- Iteration 10 -- -stristr() expects parameter 2 to be string, array given +stristr() expects argument #2 ($needle) to be of type string, array given -- Iteration 11 -- bool(false) -- Iteration 12 -- @@ -120,7 +120,7 @@ string(11) "Hello World" -- Iteration 17 -- bool(false) -- Iteration 18 -- -stristr() expects parameter 2 to be string, resource given +stristr() expects argument #2 ($needle) to be of type string, resource given -- Iteration 19 -- string(11) "Hello World" -- Iteration 20 -- diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt index 27b87cb99a877164e5992f2ef9ab8f66b05ce7fc..1929b83f74d80444f72e64b98e0bf3b150488d9e 100644 GIT binary patch delta 138 zcmdmE_sMRmmHf1{;?xpNg_3-Qq*R6cG=-ANg2}(7O($nc aTTC{P5+Y8y`Q}ckBt|0CZvHLp$P553M=!zv delta 84 zcmexlx5sY7W=Vm9#G=I9)RNR91!IMhe1)XRhBBs;d!;QVJ4p#)lQiGFRw{`RLuRv~ Hj3YAu|GFGw diff --git a/ext/standard/tests/strings/strrchr_variation10.phpt b/ext/standard/tests/strings/strrchr_variation10.phpt index 1004a3d91578b..04e96f971446d 100644 --- a/ext/standard/tests/strings/strrchr_variation10.phpt +++ b/ext/standard/tests/strings/strrchr_variation10.phpt @@ -154,15 +154,15 @@ string(2) "10" -- Iteration 9 -- bool(false) -- Iteration 10 -- -strrchr() expects parameter 2 to be string, array given +strrchr() expects argument #2 ($needle) to be of type string, array given -- Iteration 11 -- -strrchr() expects parameter 2 to be string, array given +strrchr() expects argument #2 ($needle) to be of type string, array given -- Iteration 12 -- -strrchr() expects parameter 2 to be string, array given +strrchr() expects argument #2 ($needle) to be of type string, array given -- Iteration 13 -- -strrchr() expects parameter 2 to be string, array given +strrchr() expects argument #2 ($needle) to be of type string, array given -- Iteration 14 -- -strrchr() expects parameter 2 to be string, array given +strrchr() expects argument #2 ($needle) to be of type string, array given -- Iteration 15 -- bool(false) -- Iteration 16 -- @@ -182,7 +182,7 @@ bool(false) -- Iteration 23 -- bool(false) -- Iteration 24 -- -strrchr() expects parameter 2 to be string, resource given +strrchr() expects argument #2 ($needle) to be of type string, resource given -- Iteration 25 -- bool(false) -- Iteration 26 -- diff --git a/ext/standard/tests/strings/strrchr_variation11.phpt b/ext/standard/tests/strings/strrchr_variation11.phpt index 79ffe4c2ecac9..33a34e21aba16 100644 --- a/ext/standard/tests/strings/strrchr_variation11.phpt +++ b/ext/standard/tests/strings/strrchr_variation11.phpt @@ -113,15 +113,15 @@ string(4) "1E-9" -- Iteration 9 -- string(3) "0.5" -- Iteration 10 -- -strrchr() expects parameter 1 to be string, array given +strrchr() expects argument #1 ($haystack) to be of type string, array given -- Iteration 11 -- -strrchr() expects parameter 1 to be string, array given +strrchr() expects argument #1 ($haystack) to be of type string, array given -- Iteration 12 -- -strrchr() expects parameter 1 to be string, array given +strrchr() expects argument #1 ($haystack) to be of type string, array given -- Iteration 13 -- -strrchr() expects parameter 1 to be string, array given +strrchr() expects argument #1 ($haystack) to be of type string, array given -- Iteration 14 -- -strrchr() expects parameter 1 to be string, array given +strrchr() expects argument #1 ($haystack) to be of type string, array given -- Iteration 15 -- string(1) "1" -- Iteration 16 -- @@ -141,7 +141,7 @@ bool(false) -- Iteration 23 -- bool(false) -- Iteration 24 -- -strrchr() expects parameter 1 to be string, resource given +strrchr() expects argument #1 ($haystack) to be of type string, resource given -- Iteration 25 -- bool(false) -- Iteration 26 -- diff --git a/ext/standard/tests/strings/strripos_offset.phpt b/ext/standard/tests/strings/strripos_offset.phpt index 4f4ab2bea4cbf..f2673ded5b641 100644 --- a/ext/standard/tests/strings/strripos_offset.phpt +++ b/ext/standard/tests/strings/strripos_offset.phpt @@ -36,7 +36,7 @@ try { echo "Done\n"; ?> --EXPECT-- -strripos() expects parameter 3 to be int, float given +strripos() expects argument #3 ($offset) to be of type int, float given Offset not contained in string Offset not contained in string Offset not contained in string diff --git a/ext/standard/tests/strings/strrpos_offset.phpt b/ext/standard/tests/strings/strrpos_offset.phpt index 213cd24c6fdb7..21f0ea7745b7b 100644 --- a/ext/standard/tests/strings/strrpos_offset.phpt +++ b/ext/standard/tests/strings/strrpos_offset.phpt @@ -36,7 +36,7 @@ try { echo "Done\n"; ?> --EXPECT-- -strrpos() expects parameter 3 to be int, float given +strrpos() expects argument #3 ($offset) to be of type int, float given Offset not contained in string Offset not contained in string Offset not contained in string diff --git a/ext/standard/tests/strings/strrpos_variation10.phpt b/ext/standard/tests/strings/strrpos_variation10.phpt index 2a6b84337cc77..c14c4643c1d5a 100644 --- a/ext/standard/tests/strings/strrpos_variation10.phpt +++ b/ext/standard/tests/strings/strrpos_variation10.phpt @@ -116,15 +116,15 @@ bool(false) -- Iteration 9 -- int(28) -- Iteration 10 -- -strrpos() expects parameter 2 to be string, array given +strrpos() expects argument #2 ($needle) to be of type string, array given -- Iteration 11 -- -strrpos() expects parameter 2 to be string, array given +strrpos() expects argument #2 ($needle) to be of type string, array given -- Iteration 12 -- -strrpos() expects parameter 2 to be string, array given +strrpos() expects argument #2 ($needle) to be of type string, array given -- Iteration 13 -- -strrpos() expects parameter 2 to be string, array given +strrpos() expects argument #2 ($needle) to be of type string, array given -- Iteration 14 -- -strrpos() expects parameter 2 to be string, array given +strrpos() expects argument #2 ($needle) to be of type string, array given -- Iteration 15 -- int(41) -- Iteration 16 -- @@ -144,7 +144,7 @@ int(87) -- Iteration 23 -- int(87) -- Iteration 24 -- -strrpos() expects parameter 2 to be string, resource given +strrpos() expects argument #2 ($needle) to be of type string, resource given -- Iteration 25 -- int(87) -- Iteration 26 -- diff --git a/ext/standard/tests/strings/strrpos_variation11.phpt b/ext/standard/tests/strings/strrpos_variation11.phpt index 2f8627d5ad240..24d9828581179 100644 --- a/ext/standard/tests/strings/strrpos_variation11.phpt +++ b/ext/standard/tests/strings/strrpos_variation11.phpt @@ -97,7 +97,7 @@ for($index = 0; $index < count($values); $index ++) { echo "*** Done ***"; ?> ---EXPECTF-- +--EXPECT-- *** Testing strrpos() function with unexpected values for haystack and needle *** -- Iteration 1 -- int(0) @@ -127,20 +127,20 @@ bool(false) int(0) bool(false) -- Iteration 10 -- -TypeError: strrpos() expects parameter 1 to be string, array given -TypeError: strrpos() expects parameter 1 to be string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 11 -- -TypeError: strrpos() expects parameter 1 to be string, array given -TypeError: strrpos() expects parameter 1 to be string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 12 -- -TypeError: strrpos() expects parameter 1 to be string, array given -TypeError: strrpos() expects parameter 1 to be string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 13 -- -TypeError: strrpos() expects parameter 1 to be string, array given -TypeError: strrpos() expects parameter 1 to be string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 14 -- -TypeError: strrpos() expects parameter 1 to be string, array given -TypeError: strrpos() expects parameter 1 to be string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -- Iteration 15 -- int(0) bool(false) @@ -169,8 +169,8 @@ ValueError: Offset not contained in string int(0) ValueError: Offset not contained in string -- Iteration 24 -- -TypeError: strrpos() expects parameter 1 to be string, resource given -TypeError: strrpos() expects parameter 1 to be string, resource given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, resource given +TypeError: strrpos() expects argument #1 ($haystack) to be of type string, resource given -- Iteration 25 -- int(0) ValueError: Offset not contained in string diff --git a/ext/standard/tests/strings/strtr_variation6.phpt b/ext/standard/tests/strings/strtr_variation6.phpt index 9956acaca86fb..0a44abbb80b06 100644 --- a/ext/standard/tests/strings/strtr_variation6.phpt +++ b/ext/standard/tests/strings/strtr_variation6.phpt @@ -90,7 +90,7 @@ for($index = 0; $index < count($from_arr); $index++) { fclose($file_handle); //closing the file handle ?> ---EXPECTF-- +--EXPECT-- *** Testing strtr() function: with unexpected inputs for 'from' *** -- Iteration 1 -- string(6) "a12atm" @@ -125,7 +125,7 @@ string(6) "012atm" -- Iteration 16 -- string(6) "012ttm" -- Iteration 17 -- -strtr() expects parameter 2 to be string or array, resource given +strtr() expects argument #2 ($from) to be of type string|array, resource given -- Iteration 18 -- string(6) "012atm" -- Iteration 19 -- diff --git a/ext/standard/tests/strings/strtr_variation8.phpt b/ext/standard/tests/strings/strtr_variation8.phpt index 97d3163e21f5d..5dc910e9be929 100644 --- a/ext/standard/tests/strings/strtr_variation8.phpt +++ b/ext/standard/tests/strings/strtr_variation8.phpt @@ -90,7 +90,7 @@ fclose($file_handle); //closing the file handle echo "*** Done ***"; ?> ---EXPECTF-- +--EXPECT-- *** Testing strtr() function: with unexpected inputs for 'replace_pairs' *** -- Iteration 1 -- @@ -142,7 +142,7 @@ If two arguments are passed, the second argument must be an array If two arguments are passed, the second argument must be an array -- Iteration 17 -- -strtr() expects parameter 2 to be string or array, resource given +strtr() expects argument #2 ($from) to be of type string|array, resource given -- Iteration 18 -- If two arguments are passed, the second argument must be an array diff --git a/ext/standard/tests/strings/vfprintf_error3.phpt b/ext/standard/tests/strings/vfprintf_error3.phpt index 0496d9b19cb14..72866ef1a84ca 100644 --- a/ext/standard/tests/strings/vfprintf_error3.phpt +++ b/ext/standard/tests/strings/vfprintf_error3.phpt @@ -43,6 +43,6 @@ unlink( $file ); ?> --EXPECT-- -- Testing vfprintf() function with wrong variable types as argument -- -vfprintf() expects parameter 2 to be string, array given +vfprintf() expects argument #2 ($format) to be of type string, array given int(9) string(9) "Foo fake" diff --git a/ext/standard/tests/strings/vfprintf_error4.phpt b/ext/standard/tests/strings/vfprintf_error4.phpt index 53eba8f415384..1279ac3904aab 100644 --- a/ext/standard/tests/strings/vfprintf_error4.phpt +++ b/ext/standard/tests/strings/vfprintf_error4.phpt @@ -38,7 +38,7 @@ $file = 'vfprintf_error4.txt'; unlink( $file ); ?> ---EXPECTF-- +--EXPECT-- -- Testing vfprintf() function with other strangeties -- -vfprintf() expects parameter 1 to be resource, string given +vfprintf() expects argument #1 ($handle) to be of type resource, string given Error found: Argument number must be greater than zero. diff --git a/ext/standard/tests/strings/vfprintf_variation20.phpt b/ext/standard/tests/strings/vfprintf_variation20.phpt index 95477f6c25c5f..d181e50eac2c8 100644 --- a/ext/standard/tests/strings/vfprintf_variation20.phpt +++ b/ext/standard/tests/strings/vfprintf_variation20.phpt @@ -109,7 +109,7 @@ echo "\n"; unlink($data_file); ?> ---EXPECTF-- +--EXPECT-- *** Testing vfprintf() : with unexpected values for format argument *** *** Testing vprintf() with with unexpected values for format argument *** @@ -133,19 +133,19 @@ unlink($data_file); -- Iteration 9 -- 0.5 -- Iteration 10 -- -vfprintf() expects parameter 2 to be string, array given +vfprintf() expects argument #2 ($format) to be of type string, array given -- Iteration 11 -- -vfprintf() expects parameter 2 to be string, array given +vfprintf() expects argument #2 ($format) to be of type string, array given -- Iteration 12 -- -vfprintf() expects parameter 2 to be string, array given +vfprintf() expects argument #2 ($format) to be of type string, array given -- Iteration 13 -- -vfprintf() expects parameter 2 to be string, array given +vfprintf() expects argument #2 ($format) to be of type string, array given -- Iteration 14 -- -vfprintf() expects parameter 2 to be string, array given +vfprintf() expects argument #2 ($format) to be of type string, array given -- Iteration 15 -- @@ -170,4 +170,4 @@ object -- Iteration 25 -- -- Iteration 26 -- -vfprintf() expects parameter 2 to be string, resource given +vfprintf() expects argument #2 ($format) to be of type string, resource given diff --git a/ext/standard/tests/strings/vprintf_variation1.phpt b/ext/standard/tests/strings/vprintf_variation1.phpt index fd479274ef75b..51c3c8985e1e9 100644 --- a/ext/standard/tests/strings/vprintf_variation1.phpt +++ b/ext/standard/tests/strings/vprintf_variation1.phpt @@ -103,7 +103,7 @@ foreach($values as $value) { fclose($file_handle); ?> ---EXPECTF-- +--EXPECT-- *** Testing vprintf() : with unexpected values for format argument *** -- Iteration 1 -- @@ -143,19 +143,19 @@ int(13) int(3) -- Iteration 10 -- -vprintf() expects parameter 1 to be string, array given +vprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 11 -- -vprintf() expects parameter 1 to be string, array given +vprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 12 -- -vprintf() expects parameter 1 to be string, array given +vprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 13 -- -vprintf() expects parameter 1 to be string, array given +vprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 14 -- -vprintf() expects parameter 1 to be string, array given +vprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 15 -- @@ -202,4 +202,4 @@ int(0) int(0) -- Iteration 26 -- -vprintf() expects parameter 1 to be string, resource given +vprintf() expects argument #1 ($format) to be of type string, resource given diff --git a/ext/standard/tests/strings/vsprintf_variation1.phpt b/ext/standard/tests/strings/vsprintf_variation1.phpt index 4b2da4b55105f..15155a0626d9f 100644 --- a/ext/standard/tests/strings/vsprintf_variation1.phpt +++ b/ext/standard/tests/strings/vsprintf_variation1.phpt @@ -101,7 +101,7 @@ fclose($file_handle); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing vsprintf() : with unexpected values for format argument *** -- Iteration 1 -- @@ -132,19 +132,19 @@ string(13) "1.07654321E-9" string(3) "0.5" -- Iteration 10 -- -vsprintf() expects parameter 1 to be string, array given +vsprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 11 -- -vsprintf() expects parameter 1 to be string, array given +vsprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 12 -- -vsprintf() expects parameter 1 to be string, array given +vsprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 13 -- -vsprintf() expects parameter 1 to be string, array given +vsprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 14 -- -vsprintf() expects parameter 1 to be string, array given +vsprintf() expects argument #1 ($format) to be of type string, array given -- Iteration 15 -- string(0) "" @@ -180,5 +180,5 @@ string(0) "" string(0) "" -- Iteration 26 -- -vsprintf() expects parameter 1 to be string, resource given +vsprintf() expects argument #1 ($format) to be of type string, resource given Done diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt index 0a61d477b6e28..ad9610138629e 100644 --- a/tests/classes/abstract_user_call.phpt +++ b/tests/classes/abstract_user_call.phpt @@ -29,4 +29,4 @@ try { ?> --EXPECT-- test::func() -call_user_func() expects parameter 1 to be a valid callback, cannot call abstract method test_base::func() +call_user_func() expects argument #1 ($function) to be a valid callback, cannot call abstract method test_base::func() diff --git a/tests/classes/autoload_009.phpt b/tests/classes/autoload_009.phpt index 63f1ea9801a25..7932fd4240fca 100644 --- a/tests/classes/autoload_009.phpt +++ b/tests/classes/autoload_009.phpt @@ -13,7 +13,7 @@ function f(UndefClass $x) f(new stdClass); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: f() expects argument #1 ($x) to be of type UndefClass, stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): f(Object(stdClass)) #1 {main} diff --git a/tests/classes/autoload_012.phpt b/tests/classes/autoload_012.phpt index c5b32debae17c..7ed944dc4838c 100644 --- a/tests/classes/autoload_012.phpt +++ b/tests/classes/autoload_012.phpt @@ -14,4 +14,4 @@ try { ?> --EXPECT-- In autoload: string(6) "UndefC" -call_user_func() expects parameter 1 to be a valid callback, class 'UndefC' not found +call_user_func() expects argument #1 ($function) to be a valid callback, class 'UndefC' not found diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt index 4e227a1075c10..a56efde2d96cc 100644 --- a/tests/classes/bug27504.phpt +++ b/tests/classes/bug27504.phpt @@ -27,5 +27,5 @@ try { ?> --EXPECT-- Called function foo:bar(1) -call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method foo::bar() +call_user_func_array() expects argument #1 ($function) to be a valid callback, cannot access private method foo::bar() Call to private method foo::bar() from context '' diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt index 8cde860d56cf2..02968a9b3bbde 100644 --- a/tests/classes/tostring_004.phpt +++ b/tests/classes/tostring_004.phpt @@ -53,7 +53,7 @@ try { --EXPECT-- Object with no __toString(): Try 1: -printf() expects parameter 1 to be string, object given +printf() expects argument #1 ($format) to be of type string, object given Try 2: diff --git a/tests/classes/type_hinting_001.phpt b/tests/classes/type_hinting_001.phpt index fdc74a31948c1..ca476187f3d6b 100644 --- a/tests/classes/type_hinting_001.phpt +++ b/tests/classes/type_hinting_001.phpt @@ -32,7 +32,7 @@ $a->b($b); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s:12 +Fatal error: Uncaught TypeError: FooBar::a() expects argument #1 ($foo) to be of type Foo, Blort given, called in %s on line 27 and defined in %s:12 Stack trace: #0 %s(%d): FooBar->a(Object(Blort)) #1 {main} diff --git a/tests/classes/type_hinting_002.phpt b/tests/classes/type_hinting_002.phpt index 23d201a51ac29..a491a26a628b1 100644 --- a/tests/classes/type_hinting_002.phpt +++ b/tests/classes/type_hinting_002.phpt @@ -11,7 +11,7 @@ $o = new Foo; $o->a($o); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Foo::a() expects argument #1 ($foo) to be of type NonExisting, Foo given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): Foo->a(Object(Foo)) #1 {main} diff --git a/tests/classes/type_hinting_003.phpt b/tests/classes/type_hinting_003.phpt index 9dfbd7c3b85bf..c43f13dbef8c6 100644 --- a/tests/classes/type_hinting_003.phpt +++ b/tests/classes/type_hinting_003.phpt @@ -57,7 +57,7 @@ array(1) { int(25) } -Fatal error: Uncaught TypeError: Argument 1 passed to Test::f1() must be of the type array, int given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Test::f1() expects argument #1 ($ar) to be of type array, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): Test::f1(1) #1 {main} diff --git a/tests/classes/type_hinting_004.phpt b/tests/classes/type_hinting_004.phpt index 27f15a3e16b5d..299ec1dd46e6d 100644 --- a/tests/classes/type_hinting_004.phpt +++ b/tests/classes/type_hinting_004.phpt @@ -144,10 +144,10 @@ Ensure type hints are enforced for functions invoked as callbacks. ?> --EXPECTF-- ---> Type hints with callback function: -0: Argument 1 passed to f1() must be an instance of A, int given%s(%d) +0: f1() expects argument #1 ($a) to be of type A, int given%s(%d) in f1; -0: Argument 1 passed to f2() must be an instance of A or null, int given%s(%d) +0: f2() expects argument #1 ($a) to be of type ?A, int given%s(%d) in f2; in f2; @@ -155,10 +155,10 @@ in f2; ---> Type hints with callback static method: -0: Argument 1 passed to C::f1() must be an instance of A, int given%s(%d) +0: C::f1() expects argument #1 ($a) to be of type A, int given%s(%d) in C::f1 (static); -0: Argument 1 passed to C::f2() must be an instance of A or null, int given%s(%d) +0: C::f2() expects argument #1 ($a) to be of type ?A, int given%s(%d) in C::f2 (static); in C::f2 (static); @@ -166,10 +166,10 @@ in C::f2 (static); ---> Type hints with callback instance method: -0: Argument 1 passed to D::f1() must be an instance of A, int given%s(%d) +0: D::f1() expects argument #1 ($a) to be of type A, int given%s(%d) in C::f1 (instance); -0: Argument 1 passed to D::f2() must be an instance of A or null, int given%s(%d) +0: D::f2() expects argument #1 ($a) to be of type ?A, int given%s(%d) in C::f2 (instance); in C::f2 (instance); diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt index 4baa195242f2a..5f35b3a229fb2 100644 --- a/tests/lang/bug24658.phpt +++ b/tests/lang/bug24658.phpt @@ -53,7 +53,7 @@ int(2) object(foo)#%d (0) { } -Fatal error: Uncaught TypeError: Argument 1 passed to typehint() must be an instance of foo, int given in %s:%d +Fatal error: Uncaught TypeError: typehint() expects argument #1 ($a) to be of type foo, int given in %s:%d Stack trace: #0 [internal function]: typehint(1, 1) #1 %s(%d): array_walk(Array, 'typehint') diff --git a/tests/lang/catchable_error_001.phpt b/tests/lang/catchable_error_001.phpt index 499ac144301ac..4d785592d84df 100644 --- a/tests/lang/catchable_error_001.phpt +++ b/tests/lang/catchable_error_001.phpt @@ -19,7 +19,7 @@ Catchable fatal error [1] echo "ALIVE!\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5 +Fatal error: Uncaught TypeError: blah() expects argument #1 ($a) to be of type Foo, stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5 Stack trace: #0 %s(%d): blah(Object(stdClass)) #1 {main} diff --git a/tests/lang/catchable_error_002.phpt b/tests/lang/catchable_error_002.phpt index 7cdc02c8993b2..70e054c698064 100644 --- a/tests/lang/catchable_error_002.phpt +++ b/tests/lang/catchable_error_002.phpt @@ -25,5 +25,5 @@ Catchable fatal error [2] echo "ALIVE!\n"; ?> --EXPECTF-- -Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_002.php on line %d +blah() expects argument #1 ($a) to be of type Foo, stdClass given, called in %scatchable_error_002.php on line %d ALIVE! diff --git a/tests/lang/type_hints_001.phpt b/tests/lang/type_hints_001.phpt index f82a53fe753bc..eb17ff5b8d399 100644 --- a/tests/lang/type_hints_001.phpt +++ b/tests/lang/type_hints_001.phpt @@ -20,7 +20,7 @@ type_hint_foo($bar); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9 +Fatal error: Uncaught TypeError: type_hint_foo() expects argument #1 ($a) to be of type Foo, Bar given, called in %s on line 16 and defined in %s:9 Stack trace: #0 %s(%d): type_hint_foo(Object(Bar)) #1 {main} diff --git a/tests/output/sapi_windows_vt100_support_winko_err.phpt b/tests/output/sapi_windows_vt100_support_winko_err.phpt index 07c6355dabb23..9041461150f9c 100644 --- a/tests/output/sapi_windows_vt100_support_winko_err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_err.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(false) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winko_in-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt index ef2f5735849d4..8e4509370e881 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(false) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt index 600c92e70423f..4ee1fd0cd68ba 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(false) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt index 727d053579646..f330e124c2f87 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-out.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(true) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winko_out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt index 6448651f71726..82694ad5860ab 100644 --- a/tests/output/sapi_windows_vt100_support_winko_out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(false) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winko_out.phpt b/tests/output/sapi_windows_vt100_support_winko_out.phpt index ce111741c031d..a46f1767f3728 100644 --- a/tests/output/sapi_windows_vt100_support_winko_out.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_out.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(true) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winok_err.phpt b/tests/output/sapi_windows_vt100_support_winok_err.phpt index 9354df4f942f5..eca06f2819156 100644 --- a/tests/output/sapi_windows_vt100_support_winok_err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_err.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(false) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winok_in-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt index 0be05527a9190..366de4b0fe7ab 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(false) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt index e497c5f55a361..9166cc47d029a 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(false) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt index 363e3ae0fa7c8..526c0dd098f40 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-out.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(true) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winok_out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt index 8bd6ee6bdd4ec..826aedb11498a 100644 --- a/tests/output/sapi_windows_vt100_support_winok_out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(false) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: diff --git a/tests/output/sapi_windows_vt100_support_winok_out.phpt b/tests/output/sapi_windows_vt100_support_winok_out.phpt index c649764c4c5b5..b7b4ff34beb6d 100644 --- a/tests/output/sapi_windows_vt100_support_winok_out.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_out.phpt @@ -77,67 +77,67 @@ STDERR (php://fd/2): - disabling VT100: bool(true) - current value : bool(false) Not a stream: -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- enabling VT100 : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- enabling VT100 : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- disabling VT100: -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- disabling VT100: +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) -- current value : -Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d +- current value : +Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://input): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) Invalid stream (php://memory): -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- enabling VT100 : +- enabling VT100 : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- disabling VT100: +- disabling VT100: Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) -- current value : +- current value : Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d bool(false) File stream: From e1de11d4671ef980889940e95c06912cc188a9fb Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 12 Feb 2020 14:34:48 +0100 Subject: [PATCH 034/201] Create a new console for each test worker on Windows The primary motivation to have each test worker running its own console is to allow the windows_mb_path tests to run in parallel. A nice side effect is that this also prevents changing the code page of the tester's console window (which can even cause its font to be changed). To be able to do so, we introduce the `create_new_console` option for `proc_open()`, which might occasionally be useful for other purposes than testing. --- ext/standard/proc_open.c | 12 +++++++++++- ext/standard/tests/file/windows_mb_path/CONFLICTS | 3 --- run-tests.php | 3 ++- 3 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 ext/standard/tests/file/windows_mb_path/CONFLICTS diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index d99d008771695..25a5f7fe3b880 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -504,6 +504,7 @@ PHP_FUNCTION(proc_open) int bypass_shell = 0; int blocking_pipes = 0; int create_process_group = 0; + int create_new_console = 0; #else char **argv = NULL; #endif @@ -598,6 +599,13 @@ PHP_FUNCTION(proc_open) create_process_group = 1; } } + + item = zend_hash_str_find(Z_ARRVAL_P(other_options), "create_new_console", sizeof("create_new_console") - 1); + if (item != NULL) { + if (Z_TYPE_P(item) == IS_TRUE || ((Z_TYPE_P(item) == IS_LONG) && Z_LVAL_P(item))) { + create_new_console = 1; + } + } } #endif @@ -921,7 +929,9 @@ PHP_FUNCTION(proc_open) if (create_process_group) { dwCreateFlags |= CREATE_NEW_PROCESS_GROUP; } - + if (create_new_console) { + dwCreateFlags |= CREATE_NEW_CONSOLE; + } envpw = php_win32_cp_env_any_to_w(env.envp); if (envpw) { dwCreateFlags |= CREATE_UNICODE_ENVIRONMENT; diff --git a/ext/standard/tests/file/windows_mb_path/CONFLICTS b/ext/standard/tests/file/windows_mb_path/CONFLICTS deleted file mode 100644 index 692a324587e10..0000000000000 --- a/ext/standard/tests/file/windows_mb_path/CONFLICTS +++ /dev/null @@ -1,3 +0,0 @@ -# These tests depend on the console codepage, which is shared across all parallel workers. -# Force these tests to run sequentially to make sure the codepage isn't change by another process. -all diff --git a/run-tests.php b/run-tests.php index 1b1735411147a..e632f69a828f5 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1424,7 +1424,8 @@ function run_all_tests_parallel($test_files, $env, $redir_tested) { "TEST_PHP_URI" => $sockUri, ], [ - "suppress_errors" => TRUE + "suppress_errors" => TRUE, + 'create_new_console' => TRUE, ] ); if ($proc === FALSE) { From 5009b9811d1ac323fcd45c14abd9693803040b13 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 17 Feb 2020 19:21:51 +0100 Subject: [PATCH 035/201] Update NEWS [ci skip] --- NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 63349d3e813c9..e427232fff775 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,14 @@ PHP NEWS . Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita, cmb) +- Phar: + . Fixed bug #79082 (Files added to tar with Phar::buildFromIterator have + all-access permissions). (CVE-2020-7063) (stas) + +- Session: + . Fixed bug #79221 (Null Pointer Dereference in PHP Session Upload Progress). + (CVE-2020-7062) (stas) + 23 Jan 2020, PHP 7.2.27 - Mbstring: From 16c7c716937f7cd5bfae19063772898dd8644de3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 17 Feb 2020 19:35:42 +0100 Subject: [PATCH 036/201] Fix NEWS [ci skip] --- NEWS | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 81c5f4eccd4d5..29d0f3d9affdb 100644 --- a/NEWS +++ b/NEWS @@ -18,16 +18,6 @@ PHP NEWS . Fixed bug #79188 (Memory corruption in preg_replace/preg_replace_callback and unicode). (Nikita) -- Phar: - . Fixed bug #79082 (Files added to tar with Phar::buildFromIterator have - all-access permissions). (CVE-2020-7063) (stas) - . Fixed bug #79171 (heap-buffer-overflow in phar_extract_file). - (CVE- 2020-7061) (cmb) - -- Session: - . Fixed bug #79221 (Null Pointer Dereference in PHP Session Upload Progress). - (CVE-2020-7062) (stas) - - Standard: . Fixed bug #79254 (getenv() w/o arguments not showing changes). (cmb) @@ -63,12 +53,20 @@ PHP NEWS . Fixed bug #79145 (openssl memory leak). (cmb, Nikita) - Phar: + . Fixed bug #79082 (Files added to tar with Phar::buildFromIterator have + all-access permissions). (CVE-2020-7063) (stas) + . Fixed bug #79171 (heap-buffer-overflow in phar_extract_file). + (CVE- 2020-7061) (cmb) . Fixed bug #76584 (PharFileInfo::decompress not working). (cmb) - Reflection: . Fixed bug #79115 (ReflectionClass::isCloneable call reflected class __destruct). (Nikita) +- Session: + . Fixed bug #79221 (Null Pointer Dereference in PHP Session Upload Progress). + (CVE-2020-7062) (stas) + - SPL: . Fixed bug #79151 (heap use after free caused by spl_dllist_it_helper_move_forward). (Nikita) From 4804dc2b20c2e9387500808cceafa6fc556a9bd2 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 17 Feb 2020 22:49:59 +0100 Subject: [PATCH 037/201] Rename php_dom_create_interator() to php_dom_create_iterator() Thus fixing an obvious typo. --- ext/dom/document.c | 4 ++-- ext/dom/documenttype.c | 4 ++-- ext/dom/element.c | 4 ++-- ext/dom/node.c | 4 ++-- ext/dom/php_dom.c | 2 +- ext/dom/php_dom.h | 2 +- ext/dom/xpath.c | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index 5b227f9393f9b..2b66fccf8077a 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -828,7 +828,7 @@ PHP_METHOD(domdocument, getElementsByTagName) DOM_GET_OBJ(docp, id, xmlDocPtr, intern); - php_dom_create_interator(return_value, DOM_NODELIST); + php_dom_create_iterator(return_value, DOM_NODELIST); namednode = Z_DOMOBJ_P(return_value); local = xmlCharStrndup(name, name_len); dom_namednode_iter(intern, 0, namednode, NULL, local, NULL); @@ -1043,7 +1043,7 @@ PHP_METHOD(domdocument, getElementsByTagNameNS) DOM_GET_OBJ(docp, id, xmlDocPtr, intern); - php_dom_create_interator(return_value, DOM_NODELIST); + php_dom_create_iterator(return_value, DOM_NODELIST); namednode = Z_DOMOBJ_P(return_value); local = xmlCharStrndup(name, name_len); nsuri = xmlCharStrndup(uri, uri_len); diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c index ea9e7eba05bb6..32a3f4b587102 100644 --- a/ext/dom/documenttype.c +++ b/ext/dom/documenttype.c @@ -71,7 +71,7 @@ int dom_documenttype_entities_read(dom_object *obj, zval *retval) return FAILURE; } - php_dom_create_interator(retval, DOM_NAMEDNODEMAP); + php_dom_create_iterator(retval, DOM_NAMEDNODEMAP); entityht = (xmlHashTable *) doctypep->entities; @@ -99,7 +99,7 @@ int dom_documenttype_notations_read(dom_object *obj, zval *retval) return FAILURE; } - php_dom_create_interator(retval, DOM_NAMEDNODEMAP); + php_dom_create_iterator(retval, DOM_NAMEDNODEMAP); notationht = (xmlHashTable *) doctypep->notations; diff --git a/ext/dom/element.c b/ext/dom/element.c index a84ae0bd932f3..f4bbc3bfeaac9 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -552,7 +552,7 @@ PHP_METHOD(domelement, getElementsByTagName) DOM_GET_OBJ(elemp, id, xmlNodePtr, intern); - php_dom_create_interator(return_value, DOM_NODELIST); + php_dom_create_iterator(return_value, DOM_NODELIST); namednode = Z_DOMOBJ_P(return_value); local = xmlCharStrndup(name, name_len); dom_namednode_iter(intern, 0, namednode, NULL, local, NULL); @@ -977,7 +977,7 @@ PHP_METHOD(domelement, getElementsByTagNameNS) DOM_GET_OBJ(elemp, id, xmlNodePtr, intern); - php_dom_create_interator(return_value, DOM_NODELIST); + php_dom_create_iterator(return_value, DOM_NODELIST); namednode = Z_DOMOBJ_P(return_value); local = xmlCharStrndup(name, name_len); nsuri = xmlCharStrndup(uri, uri_len); diff --git a/ext/dom/node.c b/ext/dom/node.c index 47e12a85d4e4e..457e0ae476df4 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -327,7 +327,7 @@ int dom_node_child_nodes_read(dom_object *obj, zval *retval) return FAILURE; } - php_dom_create_interator(retval, DOM_NODELIST); + php_dom_create_iterator(retval, DOM_NODELIST); intern = Z_DOMOBJ_P(retval); dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL); @@ -470,7 +470,7 @@ int dom_node_attributes_read(dom_object *obj, zval *retval) } if (nodep->type == XML_ELEMENT_NODE) { - php_dom_create_interator(retval, DOM_NAMEDNODEMAP); + php_dom_create_iterator(retval, DOM_NAMEDNODEMAP); intern = Z_DOMOBJ_P(retval); dom_namednode_iter(obj, XML_ATTRIBUTE_NODE, intern, NULL, NULL, NULL); } else { diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 4098a554deed0..98c4e703c5bd1 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1081,7 +1081,7 @@ zend_object *dom_nnodemap_objects_new(zend_class_entry *class_type) /* {{{ */ } /* }}} */ -void php_dom_create_interator(zval *return_value, int ce_type) /* {{{ */ +void php_dom_create_iterator(zval *return_value, int ce_type) /* {{{ */ { zend_class_entry *ce; diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index da4d2ad01bf18..6d9eaef46d598 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -117,7 +117,7 @@ int dom_hierarchy(xmlNodePtr parent, xmlNodePtr child); int dom_has_feature(char *feature, char *version); int dom_node_is_read_only(xmlNodePtr node); int dom_node_children_valid(xmlNodePtr node); -void php_dom_create_interator(zval *return_value, int ce_type); +void php_dom_create_iterator(zval *return_value, int ce_type); void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xmlHashTablePtr ht, xmlChar *local, xmlChar *ns); xmlNodePtr create_notation(const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); xmlNode *php_dom_libxml_hash_iter(xmlHashTable *ht, int index); diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 63b0326596d25..d3960c5790d99 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -459,7 +459,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ } else { ZVAL_EMPTY_ARRAY(&retval); } - php_dom_create_interator(return_value, DOM_NODELIST); + php_dom_create_iterator(return_value, DOM_NODELIST); nodeobj = Z_DOMOBJ_P(return_value); dom_xpath_iter(&retval, nodeobj); break; From 08073b06581c6dc9234cfb2e9b187a598154c8ab Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 27 Dec 2019 13:20:11 +0100 Subject: [PATCH 038/201] Fix #79038: PDOStatement::nextRowset() leaks column values Firstly, we must not rely on `stmt->column_count` when freeing the driver specific column values, but rather store the column count in the driver data. Since the column count is a `short`, 16 bit are sufficient, so we can store it in reserved bits of `pdo_odbc_stmt`. Furthermore, we must not allocate new column value storage when the statement is not executed, but rather when the column value storage has not been allocated. Finally, we have to introduce a driver specific `cursor_closer` to avoid that `::closeCursor()` calls `odbc_stmt_next_rowset()` which then frees the column value storage, because it may be still needed for bound columns. --- NEWS | 3 +++ ext/pdo_odbc/odbc_stmt.c | 24 +++++++++++++++++++----- ext/pdo_odbc/php_pdo_odbc_int.h | 3 ++- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 29d0f3d9affdb..a6c9cbf2b572d 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,9 @@ PHP NEWS . Fixed bug #79188 (Memory corruption in preg_replace/preg_replace_callback and unicode). (Nikita) +- PDO_ODBC: + . Fixed bug #79038 (PDOStatement::nextRowset() leaks column values). (cmb) + - Standard: . Fixed bug #79254 (getenv() w/o arguments not showing changes). (cmb) diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c index efcc9121df67b..08a08b2a54bc4 100644 --- a/ext/pdo_odbc/odbc_stmt.c +++ b/ext/pdo_odbc/odbc_stmt.c @@ -126,13 +126,14 @@ static void free_cols(pdo_stmt_t *stmt, pdo_odbc_stmt *S) if (S->cols) { int i; - for (i = 0; i < stmt->column_count; i++) { + for (i = 0; i < S->col_count; i++) { if (S->cols[i].data) { efree(S->cols[i].data); } } efree(S->cols); S->cols = NULL; + S->col_count = 0; } } @@ -262,14 +263,14 @@ static int odbc_stmt_execute(pdo_stmt_t *stmt) SQLRowCount(S->stmt, &row_count); stmt->row_count = row_count; - if (!stmt->executed) { + if (S->cols == NULL) { /* do first-time-only definition of bind/mapping stuff */ SQLSMALLINT colcount; /* how many columns do we have ? */ SQLNumResultCols(S->stmt, &colcount); - stmt->column_count = (int)colcount; + stmt->column_count = S->col_count = (int)colcount; S->cols = ecalloc(colcount, sizeof(pdo_odbc_column)); S->going_long = 0; } @@ -847,13 +848,25 @@ static int odbc_stmt_next_rowset(pdo_stmt_t *stmt) free_cols(stmt, S); /* how many columns do we have ? */ SQLNumResultCols(S->stmt, &colcount); - stmt->column_count = (int)colcount; + stmt->column_count = S->col_count = (int)colcount; S->cols = ecalloc(colcount, sizeof(pdo_odbc_column)); S->going_long = 0; return 1; } +static int odbc_stmt_close_cursor(pdo_stmt_t *stmt) +{ + SQLRETURN rc; + pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; + + rc = SQLCloseCursor(S->stmt); + if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { + return 0; + } + return 1; +} + const struct pdo_stmt_methods odbc_stmt_methods = { odbc_stmt_dtor, odbc_stmt_execute, @@ -864,7 +877,8 @@ const struct pdo_stmt_methods odbc_stmt_methods = { odbc_stmt_set_param, odbc_stmt_get_attr, /* get attr */ NULL, /* get column meta */ - odbc_stmt_next_rowset + odbc_stmt_next_rowset, + odbc_stmt_close_cursor }; /* diff --git a/ext/pdo_odbc/php_pdo_odbc_int.h b/ext/pdo_odbc/php_pdo_odbc_int.h index a7812764b316d..28717f2772923 100644 --- a/ext/pdo_odbc/php_pdo_odbc_int.h +++ b/ext/pdo_odbc/php_pdo_odbc_int.h @@ -151,7 +151,8 @@ typedef struct { zend_ulong convbufsize; unsigned going_long:1; unsigned assume_utf8:1; - unsigned _spare:30; + signed col_count:16; + unsigned _spare:14; } pdo_odbc_stmt; typedef struct { From 9ca449e0a803cb9d1d40fd6b83f2da1e6a7b46d9 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 21 Jan 2020 10:05:33 +0100 Subject: [PATCH 039/201] Make quoting of cmd execution functions consistent While the `$command` passed to `proc_open()` had to be wrapped in double-quotes manually, that was implicitly done for all other program execution functions. This could easily introduce bugs and even security issues when switching from one to another program execution function. Furthermore we ensure that the additional quotes are always unwrapped regardless of what is passed as `$command` by passing the `/s` flag to cmd.exe. As it was, `shell_exec('path with spaces/program.exe')` did execute program.exe, but adding an argument (`shell_exec('path with spaces/program.exe -h)`) failed to execute program.exe, because cmd.exe stripped the additional quotes. While these changes obviously can cause BC breaks, we feel that in the long run the benefits of having consistent behavior for all program execution functions outweighs the drawbacks of potentially breaking some code now. --- NEWS | 1 + TSRM/tsrm_win32.c | 4 ++-- UPGRADING | 5 +++++ ext/standard/proc_open.c | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 7d7d86b1029d9..f9a3a46761042 100644 --- a/NEWS +++ b/NEWS @@ -108,6 +108,7 @@ PHP NEWS filter). (kkopachev) . Fixed bug #78385 (parse_url() does not include 'query' when question mark is the last char). (Islam Israfilov) + . Made quoting of cmd execution functions consistent. (cmb) - tidy: . Removed the unused $use_include_path parameter from tidy_repair_string(). diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 5287bd23d67af..45cfbba7e56d7 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -478,12 +478,12 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, return NULL; } - cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")+2); + cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /s /c ")+2); if (!cmd) { return NULL; } - sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command); + sprintf(cmd, "%s /s /c \"%s\"", TWG(comspec), command); cmdw = php_win32_cp_any_to_w(cmd); if (!cmdw) { free(cmd); diff --git a/UPGRADING b/UPGRADING index 5174a2e52f6f1..785e89b69fae1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -472,6 +472,11 @@ PHP 8.0 UPGRADE NOTES 12. Windows Support ======================================== +- Standard: + . Program execution functions (proc_open(), exec(), popen() etc.) using the + shell now consistently execute `%comspec% /s /c "$commandline"`, which has + the same effect as executing `$commandline` (without additional quotes). + - php-test-pack: . The test runner has been renamed from run-test.php to run-tests.php, to match its name in php-src. diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index e8ebfad6d748f..6f3ddbea78555 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -953,13 +953,13 @@ PHP_FUNCTION(proc_open) wchar_t *cmdw2; - len = (sizeof(COMSPEC_NT) + sizeof(" /c ") + tmp_len + 1); + len = (sizeof(COMSPEC_NT) + sizeof(" /s /c ") + tmp_len + 3); cmdw2 = (wchar_t *)malloc(len * sizeof(wchar_t)); if (!cmdw2) { php_error_docref(NULL, E_WARNING, "Command conversion failed"); goto exit_fail; } - ret = _snwprintf(cmdw2, len, L"%hs /c %s", COMSPEC_NT, cmdw); + ret = _snwprintf(cmdw2, len, L"%hs /s /c \"%s\"", COMSPEC_NT, cmdw); if (-1 == ret) { free(cmdw2); From b5d8fc0153664d70bbdf67537872026e9e68ab86 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 18 Feb 2020 09:47:35 +0100 Subject: [PATCH 040/201] [ci skip] I still help to maintain these extensions or at least planning to. --- EXTENSIONS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EXTENSIONS b/EXTENSIONS index 82ef4d5d54f1a..f83e0c5152801 100644 --- a/EXTENSIONS +++ b/EXTENSIONS @@ -166,7 +166,7 @@ COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less hav ------------------------------------------------------------------------------- EXTENSION: sqlite3 PRIMARY MAINTAINER: Scott MacVicar (2008 - 2011) - Christoph M. Becker (2016 - 2019) + Christoph M. Becker (2016 - 2020) MAINTENANCE: Maintained STATUS: Working SINCE: 5.3 @@ -255,7 +255,7 @@ STATUS: Working ------------------------------------------------------------------------------- EXTENSION: com_dotnet PRIMARY MAINTAINER: Wez Furlong (2003 - 2005) - Christoph M. Becker (2018 - 2019) + Christoph M. Becker (2018 - 2020) MAINTENANCE: Maintained STATUS: Windows SINCE: 5.0 @@ -318,7 +318,7 @@ STATUS: Working ------------------------------------------------------------------------------- EXTENSION: gd PRIMARY MAINTAINER: Pierre-Alain Joye (2002 - 2016) - Christoph M. Becker (2015 - 2019) + Christoph M. Becker (2015 - 2020) MAINTENANCE: Maintained STATUS: Working ------------------------------------------------------------------------------- From 540f052242221a6add14ed531965bf913ea93f96 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 18 Feb 2020 10:01:17 +0100 Subject: [PATCH 041/201] Fix zpp in mysqli_warning::next() This only exists as a method, so using zend_parse_method_parameters doesn't make sense. Also make sure that zpp is always called, not only conditionally. --- ext/mysqli/mysqli_warning.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 380d2e3fd9232..a76c1b1a3fc85 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -175,16 +175,14 @@ MYSQLI_WARNING * php_get_warnings(MYSQLND_CONN_DATA * mysql) PHP_METHOD(mysqli_warning, next) { MYSQLI_WARNING *w; - zval *mysqli_warning; - mysqli_object *obj = Z_MYSQLI_P(getThis()); + mysqli_object *obj = Z_MYSQLI_P(ZEND_THIS); - if (obj->ptr) { - if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", - &mysqli_warning, mysqli_warning_class_entry) == FAILURE) { - RETURN_THROWS(); - } + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } - MYSQLI_FETCH_RESOURCE(w, MYSQLI_WARNING *, mysqli_warning, "mysqli_warning", MYSQLI_STATUS_VALID); + if (obj->ptr) { + MYSQLI_FETCH_RESOURCE(w, MYSQLI_WARNING *, ZEND_THIS, "mysqli_warning", MYSQLI_STATUS_VALID); if (w && w->next) { w = w->next; From 541f8b764028cedc5d003931af5545c90ddac81e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 18 Feb 2020 10:08:03 +0100 Subject: [PATCH 042/201] Remove mysqli reflection tests --- ...mysqli_class_mysqli_driver_reflection.phpt | 90 -- .../tests/mysqli_class_mysqli_reflection.phpt | 1351 ----------------- ...mysqli_class_mysqli_result_reflection.phpt | 371 ----- ...ysqli_class_mysqli_warning_reflection.phpt | 111 -- ext/mysqli/tests/reflection_tools.inc | 121 -- 5 files changed, 2044 deletions(-) delete mode 100644 ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt delete mode 100644 ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt delete mode 100644 ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt delete mode 100644 ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt delete mode 100644 ext/mysqli/tests/reflection_tools.inc diff --git a/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt deleted file mode 100644 index 5d125dda845fa..0000000000000 --- a/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt +++ /dev/null @@ -1,90 +0,0 @@ ---TEST-- -Interface of the class mysqli_driver - Reflection ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Inspecting class 'mysqli_driver' -isInternal: yes -isUserDefined: no -isInstantiable: yes -isInterface: no -isAbstract: no -isFinal: yes -isIteratable: no -Modifiers: '%d' -Parent Class: '' -Extension: 'mysqli' - -Inspecting property 'client_info' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'client_version' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'driver_version' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'embedded' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'reconnect' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'report_mode' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 -Default property 'client_info' -Default property 'client_version' -Default property 'driver_version' -Default property 'embedded' -Default property 'reconnect' -Default property 'report_mode' -done! diff --git a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt deleted file mode 100644 index 9b181d3838e1d..0000000000000 --- a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt +++ /dev/null @@ -1,1351 +0,0 @@ ---TEST-- -Interface of the class mysqli - Reflection ---SKIPIF-- - ---FILE-- - ---EXPECT-- -Inspecting class 'mysqli' -isInternal: yes -isUserDefined: no -isInstantiable: yes -isInterface: no -isAbstract: no -isFinal: no -isIteratable: no -Modifiers: '0' -Parent Class: '' -Extension: 'mysqli' - -Inspecting method '__construct' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: yes -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 6 -Number of Required Parameters: 0 - -Inspecting parameter 'host' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'user' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'password' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'database' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'port' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'socket' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method '__construct' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: yes -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 6 -Number of Required Parameters: 0 - -Inspecting parameter 'host' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'user' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'password' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'database' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'port' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'socket' of method '__construct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'autocommit' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'mode' of method 'autocommit' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'begin_transaction' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 2 -Number of Required Parameters: 0 - -Inspecting parameter 'flags' of method 'begin_transaction' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'name' of method 'begin_transaction' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'change_user' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 3 -Number of Required Parameters: 3 - -Inspecting parameter 'user' of method 'change_user' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'password' of method 'change_user' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'database' of method 'change_user' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'character_set_name' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'close' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'commit' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 2 -Number of Required Parameters: 0 - -Inspecting parameter 'flags' of method 'commit' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'name' of method 'commit' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'connect' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 6 -Number of Required Parameters: 0 - -Inspecting parameter 'host' of method 'connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'user' of method 'connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'password' of method 'connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'database' of method 'connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'port' of method 'connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'socket' of method 'connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'debug' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'debug_options' of method 'debug' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'dump_debug_info' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'escape_string' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'string_to_escape' of method 'escape_string' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'get_charset' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'get_client_info' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'get_connection_stats' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'get_server_info' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'get_warnings' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'init' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'kill' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'connection_id' of method 'kill' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'more_results' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'multi_query' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'query' of method 'multi_query' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'next_result' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'options' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 2 -Number of Required Parameters: 2 - -Inspecting parameter 'option' of method 'options' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'value' of method 'options' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'ping' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'poll' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: yes -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 17 -Number of Parameters: 5 -Number of Required Parameters: 4 - -Inspecting parameter 'read' of method 'poll' -isArray: yes -allowsNull: yes -isPassedByReference: yes -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'write' of method 'poll' -isArray: yes -allowsNull: yes -isPassedByReference: yes -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'error' of method 'poll' -isArray: yes -allowsNull: yes -isPassedByReference: yes -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'sec' of method 'poll' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'usec' of method 'poll' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'prepare' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'query' of method 'prepare' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'query' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 2 -Number of Required Parameters: 1 - -Inspecting parameter 'query' of method 'query' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'resultmode' of method 'query' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'real_connect' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 7 -Number of Required Parameters: 0 - -Inspecting parameter 'host' of method 'real_connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'user' of method 'real_connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'password' of method 'real_connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'database' of method 'real_connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'port' of method 'real_connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'socket' of method 'real_connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'flags' of method 'real_connect' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'real_escape_string' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'string_to_escape' of method 'real_escape_string' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'real_query' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'query' of method 'real_query' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'reap_async_query' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'refresh' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'options' of method 'refresh' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'release_savepoint' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'name' of method 'release_savepoint' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'rollback' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 2 -Number of Required Parameters: 0 - -Inspecting parameter 'flags' of method 'rollback' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'name' of method 'rollback' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'savepoint' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'name' of method 'savepoint' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'select_db' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'database' of method 'select_db' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'set_charset' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'charset' of method 'set_charset' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'set_opt' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 2 -Number of Required Parameters: 2 - -Inspecting parameter 'option' of method 'set_opt' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'value' of method 'set_opt' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'ssl_set' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 5 -Number of Required Parameters: 5 - -Inspecting parameter 'key' of method 'ssl_set' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'cert' of method 'ssl_set' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'certificate_authority' of method 'ssl_set' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'certificate_authority_path' of method 'ssl_set' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting parameter 'cipher' of method 'ssl_set' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'stat' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'stmt_init' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'store_result' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 0 - -Inspecting parameter 'flags' of method 'store_result' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'thread_safe' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'use_result' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting property 'affected_rows' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'client_info' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'client_version' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'connect_errno' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'connect_error' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'errno' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'error' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'error_list' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'field_count' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'host_info' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'info' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'insert_id' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'protocol_version' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'server_info' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'server_version' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'sqlstate' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'thread_id' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'warning_count' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 -Default property 'affected_rows' -Default property 'client_info' -Default property 'client_version' -Default property 'connect_errno' -Default property 'connect_error' -Default property 'errno' -Default property 'error' -Default property 'error_list' -Default property 'field_count' -Default property 'host_info' -Default property 'info' -Default property 'insert_id' -Default property 'protocol_version' -Default property 'server_info' -Default property 'server_version' -Default property 'sqlstate' -Default property 'thread_id' -Default property 'warning_count' -done! diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt deleted file mode 100644 index 83b4fbbd95858..0000000000000 --- a/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt +++ /dev/null @@ -1,371 +0,0 @@ ---TEST-- -Interface of the class mysqli_result - Reflection ---SKIPIF-- - ---FILE-- - ---EXPECT-- -Inspecting class 'mysqli_result' -isInternal: yes -isUserDefined: no -isInstantiable: yes -isInterface: no -isAbstract: no -isFinal: no -isIteratable: yes -Modifiers: '0' -Parent Class: '' -Extension: 'mysqli' - -Inspecting method '__construct' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: yes -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method '__construct' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: yes -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'close' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'data_seek' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'offset' of method 'data_seek' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'fetch_all' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 0 - -Inspecting parameter 'result_type' of method 'fetch_all' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'fetch_array' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 0 - -Inspecting parameter 'result_type' of method 'fetch_array' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'fetch_assoc' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'fetch_field' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'fetch_field_direct' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'field_nr' of method 'fetch_field_direct' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'fetch_fields' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'fetch_object' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 2 -Number of Required Parameters: 0 - -Inspecting parameter 'class_name' of method 'fetch_object' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting parameter 'params' of method 'fetch_object' -isArray: yes -allowsNull: no -isPassedByReference: no -isOptional: yes -isDefaultValueAvailable: no - -Inspecting method 'fetch_row' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'field_seek' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 1 -Number of Required Parameters: 1 - -Inspecting parameter 'field_nr' of method 'field_seek' -isArray: no -allowsNull: yes -isPassedByReference: no -isOptional: no -isDefaultValueAvailable: no - -Inspecting method 'free' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'free_result' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 1 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting property 'current_field' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'field_count' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'lengths' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'num_rows' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'type' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 -Default property 'current_field' -Default property 'field_count' -Default property 'lengths' -Default property 'num_rows' -Default property 'type' -done! diff --git a/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt deleted file mode 100644 index e8aef44b10f0e..0000000000000 --- a/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt +++ /dev/null @@ -1,111 +0,0 @@ ---TEST-- -Interface of the class mysqli_stmt - Reflection ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Inspecting class 'mysqli_warning' -isInternal: yes -isUserDefined: no -isInstantiable: no -isInterface: no -isAbstract: no -isFinal: yes -isIteratable: no -Modifiers: '%d' -Parent Class: '' -Extension: 'mysqli' - -Inspecting method '__construct' -isFinal: no -isAbstract: no -isPublic: no -isPrivate: no -isProtected: yes -isStatic: no -isConstructor: yes -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: %d -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method '__construct' -isFinal: no -isAbstract: no -isPublic: no -isPrivate: no -isProtected: yes -isStatic: no -isConstructor: yes -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: %d -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'next' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: %d -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting property 'errno' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'message' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - -Inspecting property 'sqlstate' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 -Default property 'errno' -Default property 'message' -Default property 'sqlstate' -done! diff --git a/ext/mysqli/tests/reflection_tools.inc b/ext/mysqli/tests/reflection_tools.inc deleted file mode 100644 index 0e46c2afa93c7..0000000000000 --- a/ext/mysqli/tests/reflection_tools.inc +++ /dev/null @@ -1,121 +0,0 @@ -getName()); - printf("isInternal: %s\n", ($class->isInternal()) ? 'yes' : 'no'); - printf("isUserDefined: %s\n", ($class->isUserDefined()) ? 'yes' : 'no'); - printf("isInstantiable: %s\n", ($class->isInstantiable()) ? 'yes' : 'no'); - printf("isInterface: %s\n", ($class->isInterface()) ? 'yes' : 'no'); - printf("isAbstract: %s\n", ($class->isAbstract()) ? 'yes' : 'no'); - printf("isFinal: %s\n", ($class->isFinal()) ? 'yes' : 'no'); - printf("isIteratable: %s\n", ($class->isIterateable()) ? 'yes' : 'no'); - printf("Modifiers: '%d'\n", $class->getModifiers()); - printf("Parent Class: '%s'\n", $class->getParentClass()); - printf("Extension: '%s'\n", $class->getExtensionName()); - - if ($method = $class->getConstructor()) - inspectMethod($method); - - if ($methods = $class->getMethods()) { - $tmp = array(); - foreach ($methods as $method) - $tmp[$method->getName()] = $method; - - ksort($tmp, SORT_STRING); - foreach ($tmp as $method) - inspectMethod($method); - } - - if ($properties = $class->getProperties()) { - $tmp = array(); - foreach ($properties as $prop) - $tmp[$prop->getName()] = $prop; - ksort($tmp, SORT_STRING); - foreach ($tmp as $prop) - inspectProperty($prop); - } - - - if ($properties = $class->getDefaultProperties()) { - ksort($properties, SORT_STRING); - foreach ($properties as $name => $v) - printf("Default property '%s'\n", $name); - } - - if ($properties = $class->getStaticProperties()) { - ksort($properties, SORT_STRING); - foreach ($properties as $name => $v) - printf("Static property '%s'\n", $name); - } - - if ($constants = $class->getConstants()) { - ksort($constants, SORT_STRING); - foreach ($constant as $name => $value) - printf("Constant '%s' = '%s'\n", $name, $value); - } - - } - - function inspectProperty(&$prop) { - - printf("\nInspecting property '%s'\n", $prop->getName()); - printf("isPublic: %s\n", ($prop->isPublic()) ? 'yes' : 'no'); - printf("isPrivate: %s\n", ($prop->isPrivate()) ? 'yes' : 'no'); - printf("isProtected: %s\n", ($prop->isProtected()) ? 'yes' : 'no'); - printf("isStatic: %s\n", ($prop->isStatic()) ? 'yes' : 'no'); - printf("isDefault: %s\n", ($prop->isDefault()) ? 'yes' : 'no'); - printf("Modifiers: %d\n", $prop->getModifiers()); - // printf("Value\n"); var_export($prop->getValue()); - - } - - function inspectMethod(&$method) { - - printf("\nInspecting method '%s'\n", $method->getName()); - printf("isFinal: %s\n", ($method->isFinal()) ? 'yes' : 'no'); - printf("isAbstract: %s\n", ($method->isAbstract()) ? 'yes' : 'no'); - printf("isPublic: %s\n", ($method->isPublic()) ? 'yes' : 'no'); - printf("isPrivate: %s\n", ($method->isPrivate()) ? 'yes' : 'no'); - printf("isProtected: %s\n", ($method->isProtected()) ? 'yes' : 'no'); - printf("isStatic: %s\n", ($method->isStatic()) ? 'yes' : 'no'); - printf("isConstructor: %s\n", ($method->isConstructor()) ? 'yes' : 'no'); - printf("isDestructor: %s\n", ($method->isDestructor()) ? 'yes' : 'no'); - printf("isInternal: %s\n", ($method->isInternal()) ? 'yes' : 'no'); - printf("isUserDefined: %s\n", ($method->isUserDefined()) ? 'yes' : 'no'); - printf("returnsReference: %s\n", ($method->returnsReference()) ? 'yes' : 'no'); - printf("Modifiers: %d\n", $method->getModifiers()); - printf("Number of Parameters: %d\n", $method->getNumberOfParameters()); - printf("Number of Required Parameters: %d\n", $method->getNumberOfRequiredParameters()); - - if ($params = $method->getParameters()) { - $tmp = array(); - foreach ($params as $k => $param) - $tmp[$param->getName()] = $param; - -// ksort($tmp, SORT_STRING); - foreach ($tmp as $param) - inspectParameter($method, $param); - } - - if ($static = $method->getStaticVariables()) { - sort($static, SORT_STRING); - printf("Static variables: %s\n", implode('/', $static)); - } - - } - - function inspectParameter(&$method, &$param) { - - printf("\nInspecting parameter '%s' of method '%s'\n", - $param->getName(), $method->getName()); - printf("isArray: %s\n", ($param->isArray()) ? 'yes': 'no'); - printf("allowsNull: %s\n", ($param->allowsNull()) ? 'yes' : 'no'); - printf("isPassedByReference: %s\n", ($param->isPassedByReference()) ? 'yes' : 'no'); - printf("isOptional: %s\n", ($param->isOptional()) ? 'yes' : 'no'); - printf("isDefaultValueAvailable: %s\n", ($param->isDefaultValueAvailable()) ? 'yes' : 'no'); - // printf("getDefaultValue: %s\n", ($param->getDefaultValue()) ? 'yes' : 'no'); - - } -?> From 328903ca367cb270ce1a8838e7d3f103f0899985 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 18 Feb 2020 10:20:21 +0100 Subject: [PATCH 043/201] Add proper return types to final phar methods As these are final, we can add return types to them. --- ext/phar/phar_object.stub.php | 98 +++++++++++++--------------------- ext/phar/phar_object_arginfo.h | 44 ++++++++------- 2 files changed, 62 insertions(+), 80 deletions(-) diff --git a/ext/phar/phar_object.stub.php b/ext/phar/phar_object.stub.php index 2af9d5bc5e6f9..44ec4732da784 100644 --- a/ext/phar/phar_object.stub.php +++ b/ext/phar/phar_object.stub.php @@ -142,50 +142,39 @@ public function startBuffering() {} /** @return void */ public function stopBuffering() {} - /** @return string */ - final public static function apiVersion() {} + final public static function apiVersion(): string {} - /** @return bool */ - final public static function canCompress(int $method = 0) {} + final public static function canCompress(int $method = 0): bool {} - /** @return bool */ - final public static function canWrite() {} + final public static function canWrite(): bool {} - /** @return string */ - final public static function createDefaultStub(string $index = UNKNOWN, string $webindex = UNKNOWN) {} + final public static function createDefaultStub( + string $index = UNKNOWN, string $webindex = UNKNOWN): string {} - /** @return array */ - final public static function getSupportedCompression() {} + final public static function getSupportedCompression(): array {} - /** @return array */ - final public static function getSupportedSignatures() {} + final public static function getSupportedSignatures(): array {} - /** @return void */ - final public static function interceptFileFuncs() {} + final public static function interceptFileFuncs(): void {} - /** @return bool */ - final public static function isValidPharFilename(string $filename, bool $executable = true) {} + final public static function isValidPharFilename( + string $filename, bool $executable = true): bool {} - /** @return bool */ - final public static function loadPhar(string $filename, ?string $alias = null) {} + final public static function loadPhar(string $filename, ?string $alias = null): bool {} - /** @return bool */ - final public static function mapPhar(?string $alias = null, int $offset = 0) {} + final public static function mapPhar(?string $alias = null, int $offset = 0): bool {} - /** @return string */ - final public static function running(bool $retphar = true) {} + final public static function running(bool $retphar = true): string {} - /** @return void */ - final public static function mount(string $inphar, string $externalfile) {} + final public static function mount(string $inphar, string $externalfile): void {} - /** @return void */ - final public static function mungServer(array $munglist) {} + final public static function mungServer(array $munglist): void {} - /** @return bool */ - final public static function unlinkArchive(string $archive) {} + final public static function unlinkArchive(string $archive): bool {} - /** @return void */ - final public static function webPhar(?string $alias = null, ?string $index = null, string $f404 = UNKNOWN, array $mimetypes = [], $rewrites = UNKNOWN) {} + final public static function webPhar( + ?string $alias = null, ?string $index = null, string $f404 = UNKNOWN, + array $mimetypes = [], $rewrites = UNKNOWN): void {} } class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAccess @@ -330,50 +319,39 @@ public function startBuffering() {} /** @return void */ public function stopBuffering() {} - /** @return string */ - final public static function apiVersion() {} + final public static function apiVersion(): string {} - /** @return bool */ - final public static function canCompress(int $method = 0) {} + final public static function canCompress(int $method = 0): bool {} - /** @return bool */ - final public static function canWrite() {} + final public static function canWrite(): bool {} - /** @return string */ - final public static function createDefaultStub(string $index = UNKNOWN, string $webindex = UNKNOWN) {} + final public static function createDefaultStub( + string $index = UNKNOWN, string $webindex = UNKNOWN): string {} - /** @return array */ - final public static function getSupportedCompression() {} + final public static function getSupportedCompression(): array {} - /** @return array */ - final public static function getSupportedSignatures() {} + final public static function getSupportedSignatures(): array {} - /** @return void */ - final public static function interceptFileFuncs() {} + final public static function interceptFileFuncs(): void {} - /** @return bool */ - final public static function isValidPharFilename(string $filename, bool $executable = true) {} + final public static function isValidPharFilename( + string $filename, bool $executable = true): bool {} - /** @return bool */ - final public static function loadPhar(string $filename, ?string $alias = null) {} + final public static function loadPhar(string $filename, ?string $alias = null): bool {} - /** @return bool */ - final public static function mapPhar(?string $alias = null, int $offset = 0) {} + final public static function mapPhar(?string $alias = null, int $offset = 0): bool {} - /** @return string */ - final public static function running(bool $retphar = true) {} + final public static function running(bool $retphar = true): string {} - /** @return void */ - final public static function mount(string $inphar, string $externalfile) {} + final public static function mount(string $inphar, string $externalfile): void {} - /** @return void */ - final public static function mungServer(array $munglist) {} + final public static function mungServer(array $munglist): void {} - /** @return bool */ - final public static function unlinkArchive(string $archive) {} + final public static function unlinkArchive(string $archive): bool {} - /** @return void */ - final public static function webPhar(?string $alias = null, ?string $index = null, string $f404 = UNKNOWN, array $mimetypes = [], $rewrites = UNKNOWN) {} + final public static function webPhar( + ?string $alias = null, ?string $index = null, string $f404 = UNKNOWN, + array $mimetypes = [], $rewrites = UNKNOWN): void {} } class PharFileInfo extends SplFileInfo diff --git a/ext/phar/phar_object_arginfo.h b/ext/phar/phar_object_arginfo.h index ef19b6e018b48..8cae13ebe8cc3 100644 --- a/ext/phar/phar_object_arginfo.h +++ b/ext/phar/phar_object_arginfo.h @@ -143,58 +143,62 @@ ZEND_END_ARG_INFO() #define arginfo_class_Phar_stopBuffering arginfo_class_Phar___destruct -#define arginfo_class_Phar_apiVersion arginfo_class_Phar___destruct +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_apiVersion, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_canCompress, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_canCompress, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_class_Phar_canWrite arginfo_class_Phar___destruct +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_canWrite, 0, 0, _IS_BOOL, 0) +ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_createDefaultStub, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_createDefaultStub, 0, 0, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, index, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, webindex, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_class_Phar_getSupportedCompression arginfo_class_Phar___destruct +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_getSupportedCompression, 0, 0, IS_ARRAY, 0) +ZEND_END_ARG_INFO() -#define arginfo_class_Phar_getSupportedSignatures arginfo_class_Phar___destruct +#define arginfo_class_Phar_getSupportedSignatures arginfo_class_Phar_getSupportedCompression -#define arginfo_class_Phar_interceptFileFuncs arginfo_class_Phar___destruct +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_interceptFileFuncs, 0, 0, IS_VOID, 0) +ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_isValidPharFilename, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_isValidPharFilename, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, executable, _IS_BOOL, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_loadPhar, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_loadPhar, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 1) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_mapPhar, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_mapPhar, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_running, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_running, 0, 0, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, retphar, _IS_BOOL, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_mount, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_mount, 0, 2, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, inphar, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, externalfile, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_mungServer, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_mungServer, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, munglist, IS_ARRAY, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_unlinkArchive, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_unlinkArchive, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, archive, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_webPhar, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_webPhar, 0, 0, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, index, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, f404, IS_STRING, 0) @@ -289,19 +293,19 @@ ZEND_END_ARG_INFO() #define arginfo_class_PharData_stopBuffering arginfo_class_Phar___destruct -#define arginfo_class_PharData_apiVersion arginfo_class_Phar___destruct +#define arginfo_class_PharData_apiVersion arginfo_class_Phar_apiVersion #define arginfo_class_PharData_canCompress arginfo_class_Phar_canCompress -#define arginfo_class_PharData_canWrite arginfo_class_Phar___destruct +#define arginfo_class_PharData_canWrite arginfo_class_Phar_canWrite #define arginfo_class_PharData_createDefaultStub arginfo_class_Phar_createDefaultStub -#define arginfo_class_PharData_getSupportedCompression arginfo_class_Phar___destruct +#define arginfo_class_PharData_getSupportedCompression arginfo_class_Phar_getSupportedCompression -#define arginfo_class_PharData_getSupportedSignatures arginfo_class_Phar___destruct +#define arginfo_class_PharData_getSupportedSignatures arginfo_class_Phar_getSupportedCompression -#define arginfo_class_PharData_interceptFileFuncs arginfo_class_Phar___destruct +#define arginfo_class_PharData_interceptFileFuncs arginfo_class_Phar_interceptFileFuncs #define arginfo_class_PharData_isValidPharFilename arginfo_class_Phar_isValidPharFilename From abfdfc9ff8d066738041abd9cfedf878d5e6389f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 18 Feb 2020 10:28:43 +0100 Subject: [PATCH 044/201] Add return types to FFI methods The FFI class is final, so we can use proper return types. --- ext/ffi/ffi.stub.php | 88 +++++++++++++------------------------------ ext/ffi/ffi_arginfo.h | 38 +++++++++++-------- 2 files changed, 49 insertions(+), 77 deletions(-) diff --git a/ext/ffi/ffi.stub.php b/ext/ffi/ffi.stub.php index ff73d2e12464f..5819443f06b56 100644 --- a/ext/ffi/ffi.stub.php +++ b/ext/ffi/ffi.stub.php @@ -1,96 +1,62 @@ Date: Tue, 18 Feb 2020 11:00:28 +0100 Subject: [PATCH 045/201] bump version to 7.2.29 --- NEWS | 5 ++++- configure.ac | 2 +- main/php_version.h | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index e427232fff775..60a48f30f7651 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? 2020, PHP 7.2.28 +?? ??? 2020, PHP 7.2.29 + + +20 Feb 2020, PHP 7.2.28 - DOM: . Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita, diff --git a/configure.ac b/configure.ac index 478a4cbf3b0f4..e1a6b53fabbb2 100644 --- a/configure.ac +++ b/configure.ac @@ -107,7 +107,7 @@ int zend_sprintf(char *buffer, const char *format, ...); PHP_MAJOR_VERSION=7 PHP_MINOR_VERSION=2 -PHP_RELEASE_VERSION=28 +PHP_RELEASE_VERSION=29 PHP_EXTRA_VERSION="-dev" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/main/php_version.h b/main/php_version.h index e10723c26059e..4e8242f24720c 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 7 #define PHP_MINOR_VERSION 2 -#define PHP_RELEASE_VERSION 28 +#define PHP_RELEASE_VERSION 29 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "7.2.28-dev" -#define PHP_VERSION_ID 70228 +#define PHP_VERSION "7.2.29-dev" +#define PHP_VERSION_ID 70229 From 31dd45564c84ef3171e4d3a30e125c06c8a39596 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 18 Feb 2020 11:09:37 +0100 Subject: [PATCH 046/201] Remove extra tab in NEWS [ci skip] --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a6c9cbf2b572d..a593f1eb46690 100644 --- a/NEWS +++ b/NEWS @@ -59,7 +59,7 @@ PHP NEWS . Fixed bug #79082 (Files added to tar with Phar::buildFromIterator have all-access permissions). (CVE-2020-7063) (stas) . Fixed bug #79171 (heap-buffer-overflow in phar_extract_file). - (CVE- 2020-7061) (cmb) + (CVE-2020-7061) (cmb) . Fixed bug #76584 (PharFileInfo::decompress not working). (cmb) - Reflection: From 3b08f53c97b2aa1bdd132d0f715e9db20fefad5d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Jan 2020 12:21:02 +0100 Subject: [PATCH 047/201] Deprecate required param after optional As an exception, we allow "Type $foo = null" to occur before a required parameter, because this pattern was used as a replacement for nullable types in PHP versions older than 7.1. Closes GH-5067. --- UPGRADING | 7 ++++++ Zend/tests/call_user_func_005.phpt | 1 + Zend/tests/required_param_after_optional.phpt | 14 +++++++++++ Zend/tests/traits/bug60717.phpt | 4 ++-- Zend/zend_compile.c | 15 ++++++++++++ .../tests/ReflectionClass_isArray.phpt | 8 ++----- ext/reflection/tests/ReflectionType_001.phpt | 24 +++++++++---------- ext/reflection/tests/bug62715.phpt | 3 ++- 8 files changed, 55 insertions(+), 21 deletions(-) create mode 100644 Zend/tests/required_param_after_optional.phpt diff --git a/UPGRADING b/UPGRADING index 785e89b69fae1..417119e074c2a 100644 --- a/UPGRADING +++ b/UPGRADING @@ -142,6 +142,13 @@ PHP 8.0 UPGRADE NOTES The name shown above is still followed by a null byte and and a unique suffix. + . Declaring a required parameter after an optional one is deprecated. As an + exception, declaring a parameter of the form "Type $param = null" before + a required one continues to be allowed, because this pattern was sometimes + used to achieve nullable types in older PHP versions. + + function test($a = [], $b) {} // Deprecated + function test(Foo $a = null, $b) {} // Allowed - COM: . Removed the ability to import case-insensitive constants from type diff --git a/Zend/tests/call_user_func_005.phpt b/Zend/tests/call_user_func_005.phpt index fd130eb773a49..2f5220db6291b 100644 --- a/Zend/tests/call_user_func_005.phpt +++ b/Zend/tests/call_user_func_005.phpt @@ -18,6 +18,7 @@ var_dump(call_user_func(array('foo', 'teste'))); ?> --EXPECTF-- +Deprecated: Required parameter $b follows optional parameter $a in %s on line %d string(1) "x" array(1) { [0]=> diff --git a/Zend/tests/required_param_after_optional.phpt b/Zend/tests/required_param_after_optional.phpt new file mode 100644 index 0000000000000..cd715e77d4819 --- /dev/null +++ b/Zend/tests/required_param_after_optional.phpt @@ -0,0 +1,14 @@ +--TEST-- +Required parameter after optional is deprecated +--FILE-- + +--EXPECTF-- +Deprecated: Required parameter $testC follows optional parameter $testA in %s on line %d + +Deprecated: Required parameter $test2C follows optional parameter $test2B in %s on line %d diff --git a/Zend/tests/traits/bug60717.phpt b/Zend/tests/traits/bug60717.phpt index 0f5cadb0661c2..1ea146c5a0a37 100644 --- a/Zend/tests/traits/bug60717.phpt +++ b/Zend/tests/traits/bug60717.phpt @@ -9,7 +9,7 @@ namespace HTML { function text($text); function attributes(array $attributes = null); - function textArea(array $attributes = null, $value); + function textArea(?array $attributes, $value); } trait TextUTF8 @@ -19,7 +19,7 @@ namespace HTML trait TextArea { - function textArea(array $attributes = null, $value) {} + function textArea(?array $attributes, $value) {} abstract function attributes(array $attributes = null); abstract function text($text); } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index bc0a7dfdaeacf..7ec740ae4e161 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5720,6 +5720,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */ uint32_t i; zend_op_array *op_array = CG(active_op_array); zend_arg_info *arg_infos; + zend_string *optional_param = NULL; if (return_type_ast) { /* Use op_array->arg_info[-1] for return type */ @@ -5788,10 +5789,24 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */ default_node.op_type = IS_CONST; zend_const_expr_to_zval(&default_node.u.constant, default_ast); CG(compiler_options) = cops; + + if (!optional_param) { + /* Ignore parameters of the form "Type $param = null". + * This is the PHP 5 style way of writing "?Type $param", so allow it for now. */ + zend_bool is_implicit_nullable = + type_ast && Z_TYPE(default_node.u.constant) == IS_NULL; + if (!is_implicit_nullable) { + optional_param = name; + } + } } else { opcode = ZEND_RECV; default_node.op_type = IS_UNUSED; op_array->required_num_args = i + 1; + if (optional_param) { + zend_error(E_DEPRECATED, "Required parameter $%s follows optional parameter $%s", + ZSTR_VAL(name), ZSTR_VAL(optional_param)); + } } arg_info = &arg_infos[i]; diff --git a/ext/reflection/tests/ReflectionClass_isArray.phpt b/ext/reflection/tests/ReflectionClass_isArray.phpt index 3eec0dac54f5b..7c6093a55c9fe 100644 --- a/ext/reflection/tests/ReflectionClass_isArray.phpt +++ b/ext/reflection/tests/ReflectionClass_isArray.phpt @@ -4,7 +4,8 @@ public bool ReflectionParameter::isArray ( void ); marcosptf - - @phpsp - sao paulo - br --FILE-- getParameters() as $parameter) { } ?> --EXPECT-- -bool(false) -bool(false) bool(true) -bool(false) bool(true) bool(false) bool(false) -bool(true) -bool(false) diff --git a/ext/reflection/tests/ReflectionType_001.phpt b/ext/reflection/tests/ReflectionType_001.phpt index e31dc11348415..d0f327d0466ff 100644 --- a/ext/reflection/tests/ReflectionType_001.phpt +++ b/ext/reflection/tests/ReflectionType_001.phpt @@ -2,7 +2,7 @@ ReflectionParameter::get/hasType and ReflectionType tests --FILE-- getParameters() as $p) { } } ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Required parameter $c follows optional parameter $b in %s on line %d bool(true) bool(true) bool(false) From 7a062cf9cdb5f037413836537c4b38bb7d30ee68 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 17 Dec 2019 12:21:05 +0100 Subject: [PATCH 048/201] Handle EXIF offsets in a principled manner exif_process_IFD_TAG() currently accepts a dir_entry, offset_base and IFDlength. However, it's very hard to follow how these values are related to each other and the addressable memory region. As we add additional bounds check, this gets further confused. One of the basic cases is where dir_entry is in [offset_base, offset_base+IFDlength), in which case the memory [dir_entry, offset_base+IFDlength) is valid, but the memory [offset_base, dir_entry) is not necessarily valid. I wasn't able to understand what exactly is valid if dir_entry is outside [offset_base, offset_base+IFDlength) This patch changes everything to use a struct that separately stores offset_base and the valid memory region and adds helpers to fetch offsets and check that pointers are in-bounds. Closes GH-5068. --- ext/exif/exif.c | 156 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 105 insertions(+), 51 deletions(-) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index a8aa9e46f02b1..dfa7cb2d6e93c 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -50,6 +50,10 @@ /* needed for ssize_t definition */ #include +#ifdef __SANITIZE_ADDRESS__ +# include +#endif + typedef unsigned char uchar; #ifndef TRUE @@ -2018,6 +2022,63 @@ typedef struct { } jpeg_sof_info; /* }}} */ +/* Base address for offset references, together with valid memory range. + * The valid range does not necessarily include the offset base. */ +typedef struct { + char *offset_base; + char *valid_start; /* inclusive */ + char *valid_end; /* exclusive */ +} exif_offset_info; + +static zend_always_inline zend_bool ptr_offset_overflows(char *ptr, size_t offset) { + return UINTPTR_MAX - (uintptr_t) ptr < offset; +} + +static inline void exif_offset_info_init( + exif_offset_info *info, char *offset_base, char *valid_start, size_t valid_length) { + ZEND_ASSERT(!ptr_offset_overflows(valid_start, valid_length)); +#ifdef __SANITIZE_ADDRESS__ + ZEND_ASSERT(!__asan_region_is_poisoned(valid_start, valid_length)); +#endif + info->offset_base = offset_base; + info->valid_start = valid_start; + info->valid_end = valid_start + valid_length; +} + +/* Try to get a pointer at offset_base+offset with length dereferenceable bytes. */ +static inline char *exif_offset_info_try_get( + const exif_offset_info *info, size_t offset, size_t length) { + char *start, *end; + if (ptr_offset_overflows(info->offset_base, offset)) { + return NULL; + } + + start = info->offset_base + offset; + if (ptr_offset_overflows(start, length)) { + return NULL; + } + + end = start + length; + if (start < info->valid_start || end > info->valid_end) { + return NULL; + } + + return start; +} + +static inline zend_bool exif_offset_info_contains( + const exif_offset_info *info, char *start, size_t length) { + char *end; + if (ptr_offset_overflows(start, length)) { + return 0; + } + + /* start and valid_start are both inclusive, end and valid_end are both exclusive, + * so we use >= and <= to do the checks, respectively. */ + end = start + length; + return start >= info->valid_start && end <= info->valid_end; +} + /* {{{ exif_file_sections_add Add a file_section to image_info returns the used block or -1. if size>0 and data == NULL buffer of size is allocated @@ -2624,8 +2685,8 @@ static void exif_process_SOFn (uchar *Data, int marker, jpeg_sof_info *result) /* }}} */ /* forward declarations */ -static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, char *offset_base, size_t IFDlength, size_t displacement, int section_index, int tag); -static int exif_process_IFD_TAG( image_info_type *ImageInfo, char *dir_entry, char *offset_base, size_t IFDlength, size_t displacement, int section_index, int ReadNextIFD, tag_table_type tag_table); +static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, const exif_offset_info *info, size_t displacement, int section_index, int tag); +static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, const exif_offset_info *info, size_t displacement, int section_index, int ReadNextIFD, tag_table_type tag_table); /* {{{ exif_get_markername Get name of marker */ @@ -2871,7 +2932,7 @@ static void exif_thumbnail_build(image_info_type *ImageInfo) { /* {{{ exif_thumbnail_extract * Grab the thumbnail, corrected */ -static void exif_thumbnail_extract(image_info_type *ImageInfo, char *offset, size_t length) { +static void exif_thumbnail_extract(image_info_type *ImageInfo, const exif_offset_info *info) { if (ImageInfo->Thumbnail.data) { exif_error_docref("exif_read_data#error_mult_thumb" EXIFERR_CC, ImageInfo, E_WARNING, "Multiple possible thumbnails"); return; /* Should not happen */ @@ -2888,14 +2949,13 @@ static void exif_thumbnail_extract(image_info_type *ImageInfo, char *offset, siz return; } /* Check to make sure we are not going to go past the ExifLength */ - if (ImageInfo->Thumbnail.size > length - || (ImageInfo->Thumbnail.offset + ImageInfo->Thumbnail.size) > length - || ImageInfo->Thumbnail.offset > length - ImageInfo->Thumbnail.size - ) { + char *thumbnail = exif_offset_info_try_get( + info, ImageInfo->Thumbnail.offset, ImageInfo->Thumbnail.size); + if (!thumbnail) { EXIF_ERRLOG_THUMBEOF(ImageInfo) return; } - ImageInfo->Thumbnail.data = estrndup(offset + ImageInfo->Thumbnail.offset, ImageInfo->Thumbnail.size); + ImageInfo->Thumbnail.data = estrndup(thumbnail, ImageInfo->Thumbnail.size); exif_thumbnail_build(ImageInfo); } /* }}} */ @@ -3063,14 +3123,14 @@ static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type *xp_fi /* {{{ exif_process_IFD_in_MAKERNOTE * Process nested IFDs directories in Maker Note. */ -static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * value_ptr, int value_len, char *offset_base, size_t IFDlength, size_t displacement) +static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * value_ptr, int value_len, const exif_offset_info *info, size_t displacement) { size_t i; int de, section_index = SECTION_MAKERNOTE; int NumDirEntries, old_motorola_intel; const maker_note_type *maker_note; char *dir_start; - int data_len; + exif_offset_info new_info; for (i=0; i<=sizeof(maker_note_array)/sizeof(maker_note_type); i++) { if (i==sizeof(maker_note_array)/sizeof(maker_note_type)) { @@ -3122,12 +3182,11 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu switch (maker_note->offset_mode) { case MN_OFFSET_MAKER: - offset_base = value_ptr; - data_len = value_len; + exif_offset_info_init(&new_info, value_ptr, value_ptr, value_len); + info = &new_info; break; default: case MN_OFFSET_NORMAL: - data_len = value_len; break; } @@ -3143,7 +3202,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu for (de=0;detag_table)) { + info, displacement, section_index, 0, maker_note->tag_table)) { return FALSE; } } @@ -3166,7 +3225,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu /* {{{ exif_process_IFD_TAG * Process one of the nested IFDs directories. */ -static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, char *offset_base, size_t IFDlength, size_t displacement, int section_index, int ReadNextIFD, tag_table_type tag_table) +static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, const exif_offset_info *info, size_t displacement, int section_index, int ReadNextIFD, tag_table_type tag_table) { size_t length; unsigned int tag, format, components; @@ -3206,28 +3265,16 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha byte_count = (size_t)byte_count_signed; if (byte_count > 4) { - offset_val = php_ifd_get32u(dir_entry+8, ImageInfo->motorola_intel); /* If its bigger than 4 bytes, the dir entry contains an offset. */ - value_ptr = offset_base+offset_val; - /* - dir_entry is ImageInfo->file.list[sn].data+2+i*12 - offset_base is ImageInfo->file.list[sn].data-dir_offset - dir_entry - offset_base is dir_offset+2+i*12 - */ - if (byte_count > IFDlength || offset_val > IFDlength-byte_count || value_ptr < dir_entry || offset_val < (size_t)(dir_entry-offset_base) || dir_entry <= offset_base) { + offset_val = php_ifd_get32u(dir_entry+8, ImageInfo->motorola_intel); + value_ptr = exif_offset_info_try_get(info, offset_val, byte_count); + if (!value_ptr) { /* It is important to check for IMAGE_FILETYPE_TIFF * JPEG does not use absolute pointers instead its pointers are * relative to the start of the TIFF header in APP1 section. */ + // TODO: Shouldn't we also be taking "displacement" into account here? if (byte_count > ImageInfo->FileSize || offset_val>ImageInfo->FileSize-byte_count || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM && ImageInfo->FileType!=IMAGE_FILETYPE_JPEG)) { - if (value_ptr < dir_entry) { - /* we can read this if offset_val > 0 */ - /* some files have their values in other parts of the file */ - exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal pointer offset(x%04X < x%04X)", tag, exif_get_tagname_debug(tag, tag_table), offset_val, dir_entry); - } else { - /* this is for sure not allowed */ - /* exception are IFD pointers */ - exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal pointer offset(x%04X + x%04X = x%04X > x%04X)", tag, exif_get_tagname_debug(tag, tag_table), offset_val, byte_count, offset_val+byte_count, IFDlength); - } + exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal pointer offset(x%04X + x%04X = x%04X > x%04X)", tag, exif_get_tagname_debug(tag, tag_table), offset_val, byte_count, offset_val+byte_count, ImageInfo->FileSize); return FALSE; } if (byte_count>sizeof(cbuf)) { @@ -3263,7 +3310,8 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha } else { /* 4 bytes or less and value is in the dir entry itself */ value_ptr = dir_entry+8; - offset_val= value_ptr-offset_base; + // TODO: This is dubious, but the value is only used for debugging. + offset_val = value_ptr-info->offset_base; } ImageInfo->sections_found |= FOUND_ANY_TAG; @@ -3446,7 +3494,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha break; case TAG_MAKER_NOTE: - if (!exif_process_IFD_in_MAKERNOTE(ImageInfo, value_ptr, byte_count, offset_base, IFDlength, displacement)) { + if (!exif_process_IFD_in_MAKERNOTE(ImageInfo, value_ptr, byte_count, info, displacement)) { EFREE_IF(outside); return FALSE; } @@ -3482,13 +3530,14 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha sub_section_index = SECTION_INTEROP; break; } - Subdir_start = offset_base + php_ifd_get32u(value_ptr, ImageInfo->motorola_intel); - if (Subdir_start < offset_base || Subdir_start > offset_base+IFDlength) { + offset_val = php_ifd_get32u(value_ptr, ImageInfo->motorola_intel); + Subdir_start = exif_offset_info_try_get(info, offset_val, 0); + if (!Subdir_start) { exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD Pointer"); EFREE_IF(outside); return FALSE; } - if (!exif_process_IFD_in_JPEG(ImageInfo, Subdir_start, offset_base, IFDlength, displacement, sub_section_index, tag)) { + if (!exif_process_IFD_in_JPEG(ImageInfo, Subdir_start, info, displacement, sub_section_index, tag)) { EFREE_IF(outside); return FALSE; } @@ -3506,7 +3555,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha /* {{{ exif_process_IFD_in_JPEG * Process one of the nested IFDs directories. */ -static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, char *offset_base, size_t IFDlength, size_t displacement, int section_index, int tag) +static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, const exif_offset_info *info, size_t displacement, int section_index, int tag) { int de; int NumDirEntries; @@ -3518,21 +3567,21 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, ImageInfo->sections_found |= FOUND_IFD0; - if ((dir_start + 2) > (offset_base+IFDlength)) { + if (!exif_offset_info_contains(info, dir_start, 2)) { exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size"); return FALSE; } NumDirEntries = php_ifd_get16u(dir_start, ImageInfo->motorola_intel); - if ((dir_start+2+NumDirEntries*12) > (offset_base+IFDlength)) { - exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size: x%04X + 2 + x%04X*12 = x%04X > x%04X", (int)((size_t)dir_start+2-(size_t)offset_base), NumDirEntries, (int)((size_t)dir_start+2+NumDirEntries*12-(size_t)offset_base), IFDlength); + if (!exif_offset_info_contains(info, dir_start+2, NumDirEntries*12)) { + exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size: x%04X + 2 + x%04X*12 = x%04X > x%04X", (int)((size_t)dir_start+2-(size_t)info->valid_start), NumDirEntries, (int)((size_t)dir_start+2+NumDirEntries*12-(size_t)info->valid_start), info->valid_end - info->valid_start); return FALSE; } for (de=0;de (offset_base+IFDlength)) { + if (!exif_offset_info_contains(info, dir_start+2+NumDirEntries*12, 4)) { exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size"); return FALSE; } @@ -3556,8 +3605,8 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, } if (NextDirOffset) { - /* the next line seems false but here IFDlength means length of all IFDs */ - if (offset_base + NextDirOffset < offset_base || offset_base + NextDirOffset > offset_base+IFDlength) { + char *next_dir_start = exif_offset_info_try_get(info, NextDirOffset, 0); + if (!next_dir_start) { exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD offset"); return FALSE; } @@ -3565,7 +3614,7 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, #ifdef EXIF_DEBUG exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Expect next IFD to be thumbnail"); #endif - if (exif_process_IFD_in_JPEG(ImageInfo, offset_base + NextDirOffset, offset_base, IFDlength, displacement, SECTION_THUMBNAIL, 0)) { + if (exif_process_IFD_in_JPEG(ImageInfo, next_dir_start, info, displacement, SECTION_THUMBNAIL, 0)) { #ifdef EXIF_DEBUG exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Thumbnail size: 0x%04X", ImageInfo->Thumbnail.size); #endif @@ -3574,7 +3623,7 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, && ImageInfo->Thumbnail.offset && ImageInfo->read_thumbnail ) { - exif_thumbnail_extract(ImageInfo, offset_base, IFDlength); + exif_thumbnail_extract(ImageInfo, info); } return TRUE; } else { @@ -3591,6 +3640,7 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf, size_t length, size_t displacement) { unsigned exif_value_2a, offset_of_ifd; + exif_offset_info info; /* set the thumbnail stuff to nothing so we can test to see if they get set up */ if (memcmp(CharBuf, "II", 2) == 0) { @@ -3620,7 +3670,8 @@ static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf, ImageInfo->sections_found |= FOUND_IFD0; /* First directory starts at offset 8. Offsets starts at 0. */ - exif_process_IFD_in_JPEG(ImageInfo, CharBuf+offset_of_ifd, CharBuf, length/*-14*/, displacement, SECTION_IFD0, 0); + exif_offset_info_init(&info, CharBuf, CharBuf, length/*-14*/); + exif_process_IFD_in_JPEG(ImageInfo, CharBuf+offset_of_ifd, &info, displacement, SECTION_IFD0, 0); #ifdef EXIF_DEBUG exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Process TIFF in JPEG done"); @@ -4116,9 +4167,12 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Next IFD: %s done", exif_get_sectionname(sub_section_index)); #endif } else { - if (!exif_process_IFD_TAG(ImageInfo, (char*)dir_entry, - (char*)(ImageInfo->file.list[sn].data-dir_offset), - ifd_size, 0, section_index, 0, tag_table)) { + exif_offset_info info; + exif_offset_info_init(&info, + (char *) (ImageInfo->file.list[sn].data - dir_offset), + (char *) ImageInfo->file.list[sn].data, ifd_size); + if (!exif_process_IFD_TAG(ImageInfo, (char*)dir_entry, &info, + 0, section_index, 0, tag_table)) { return FALSE; } } From 9d31a42a30e944688c29aefc4bd0396ce395efe1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 18 Feb 2020 16:17:34 +0100 Subject: [PATCH 049/201] Don't use VLA in mysqlnd auth We use alloca instead of VLA. This should also allow building this code on Windows. --- configure.ac | 14 -------------- ext/mysqlnd/mysqlnd_auth.c | 10 ++++++++-- ext/mysqlnd/mysqlnd_wireprotocol.c | 7 ------- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/configure.ac b/configure.ac index 501730ba47fbc..f7fb19eff4569 100644 --- a/configure.ac +++ b/configure.ac @@ -737,20 +737,6 @@ if test "$ac_cv__asm_goto" = yes; then AC_DEFINE(HAVE_ASM_GOTO,1,[Define if asm goto support]) fi -dnl Check for variable length array support. -AC_CACHE_CHECK([whether compiler supports VLA], ac_cv__compiler_c99_vla, -[AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - int main(void) { - int i[rand()%10]; - return 0; - } - ]])],[ac_cv__compiler_c99_vla=yes], [ac_cv__compiler_c99_vla=no], [ac_cv__compiler_c99_vla=no])]) - -if test "$ac_cv__compiler_c99_vla" = yes; then - AC_DEFINE(HAVE_COMPILER_C99_VLA, 1, [Compiler supports VLA]) -fi - dnl Check valgrind support. PHP_ARG_WITH([valgrind], [whether to enable valgrind support], diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 24c77220fcbdf..14a65eed0dab0 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -806,7 +806,8 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self if (server_public_key) { int server_public_key_len; - char xor_str[passwd_len + 1]; + ALLOCA_FLAG(use_heap); + char *xor_str = do_alloca(passwd_len + 1, use_heap); memcpy(xor_str, passwd, passwd_len); xor_str[passwd_len] = '\0'; mysqlnd_xor_string(xor_str, passwd_len, (char *) auth_plugin_data, auth_plugin_data_len); @@ -819,6 +820,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self */ if ((size_t) server_public_key_len - 41 <= passwd_len) { /* password message is to long */ + free_alloca(xor_str, use_heap); SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long"); DBG_ERR("password is too long"); DBG_RETURN(NULL); @@ -828,6 +830,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self ret = malloc(*auth_data_len); RSA_public_encrypt(passwd_len + 1, (zend_uchar *) xor_str, ret, server_public_key, RSA_PKCS1_OAEP_PADDING); RSA_free(server_public_key); + free_alloca(xor_str, use_heap); } } @@ -1025,7 +1028,8 @@ mysqlnd_caching_sha2_get_and_use_key(MYSQLND_CONN_DATA *conn, if (server_public_key) { int server_public_key_len; - char xor_str[passwd_len + 1]; + ALLOCA_FLAG(use_heap) + char *xor_str = do_alloca(passwd_len + 1, use_heap); memcpy(xor_str, passwd, passwd_len); xor_str[passwd_len] = '\0'; mysqlnd_xor_string(xor_str, passwd_len, (char *) auth_plugin_data, SCRAMBLE_LENGTH); @@ -1038,6 +1042,7 @@ mysqlnd_caching_sha2_get_and_use_key(MYSQLND_CONN_DATA *conn, */ if ((size_t) server_public_key_len - 41 <= passwd_len) { /* password message is to long */ + free_alloca(xor_str, use_heap); SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long"); DBG_ERR("password is too long"); DBG_RETURN(0); @@ -1045,6 +1050,7 @@ mysqlnd_caching_sha2_get_and_use_key(MYSQLND_CONN_DATA *conn, *crypted = emalloc(server_public_key_len); RSA_public_encrypt(passwd_len + 1, (zend_uchar *) xor_str, *crypted, server_public_key, RSA_PKCS1_OAEP_PADDING); + free_alloca(xor_str, use_heap); DBG_RETURN(server_public_key_len); } DBG_RETURN(0); diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index ba289a6fce9d5..b9a91c900e7e4 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -2141,12 +2141,8 @@ size_t php_mysqlnd_cached_sha2_result_write(MYSQLND_CONN_DATA * conn, void * _pa MYSQLND_PFC * pfc = conn->protocol_frame_codec; MYSQLND_VIO * vio = conn->vio; MYSQLND_STATS * stats = conn->stats; -#if HAVE_COMPILER_C99_VLA - zend_uchar buffer[MYSQLND_HEADER_SIZE + packet->password_len + 1]; -#else ALLOCA_FLAG(use_heap) zend_uchar *buffer = do_alloca(MYSQLND_HEADER_SIZE + packet->password_len + 1, use_heap); -#endif size_t sent; DBG_ENTER("php_mysqlnd_cached_sha2_result_write"); @@ -2159,10 +2155,7 @@ size_t php_mysqlnd_cached_sha2_result_write(MYSQLND_CONN_DATA * conn, void * _pa sent = pfc->data->m.send(pfc, vio, buffer, packet->password_len, stats, error_info); } -#if !HAVE_COMPILER_C99_VLA free_alloca(buffer, use_heap); -#endif - DBG_RETURN(sent); } From 736b22dc0b2fc36e9bd87f2ee5af8c4b2be9fd3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 18 Feb 2020 19:59:15 +0100 Subject: [PATCH 050/201] Add stubs for aliases Closes GH-5187 --- ext/bz2/bz2.stub.php | 20 ++----- ext/ftp/ftp.stub.php | 3 + ext/ftp/ftp_arginfo.h | 2 + ext/ftp/php_ftp.c | 2 +- ext/imap/php_imap.c | 16 +++--- ext/imap/php_imap.stub.php | 80 ++++++++++++-------------- ext/imap/php_imap_arginfo.h | 16 ++++++ ext/ldap/ldap.stub.php | 73 +++++++---------------- ext/ldap/ldap_arginfo.h | 8 +-- ext/openssl/openssl.c | 6 +- ext/openssl/openssl.stub.php | 15 +++++ ext/openssl/openssl_arginfo.h | 6 ++ ext/pcntl/pcntl.c | 2 +- ext/pcntl/pcntl.stub.php | 2 + ext/pcntl/pcntl_arginfo.h | 2 + ext/skeleton/skeleton.c | 8 +-- ext/skeleton/skeleton.stub.php | 4 +- ext/skeleton/skeleton_arginfo.h | 8 +++ ext/skeleton/tests/002.phpt | 4 +- ext/sockets/sockets.c | 4 +- ext/sockets/sockets.stub.php | 6 ++ ext/sockets/sockets_arginfo.h | 4 ++ ext/standard/basic_functions.c | 50 ++++++++-------- ext/standard/basic_functions.stub.php | 62 ++++++++++++++++++++ ext/standard/basic_functions_arginfo.h | 56 +++++++++++++++++- 25 files changed, 295 insertions(+), 164 deletions(-) create mode 100644 ext/skeleton/skeleton_arginfo.h diff --git a/ext/bz2/bz2.stub.php b/ext/bz2/bz2.stub.php index b4898481d0e61..4dcaf07a11ae4 100644 --- a/ext/bz2/bz2.stub.php +++ b/ext/bz2/bz2.stub.php @@ -12,29 +12,19 @@ function bzread($bz, int $length = 1024): string|false {} /** @param resource $bz */ function bzwrite($bz, string $str, int $length = UNKNOWN): int|false {} -/** - * @param resource $bz - */ +/** @param resource $bz */ function bzflush($bz): bool {} -/** - * @param resource $bz - */ +/** @param resource $bz */ function bzclose($bz): bool {} -/** - * @param resource $bz - */ +/** @param resource $bz */ function bzerrno($bz): int {} -/** - * @param resource $bz - */ +/** @param resource $bz */ function bzerrstr($bz): string {} -/** - * @param resource $bz - */ +/** @param resource $bz */ function bzerror($bz): array {} function bzcompress(string $source, int $blocksize = 4, int $workfactor = 0): string|int {} diff --git a/ext/ftp/ftp.stub.php b/ext/ftp/ftp.stub.php index e01603a99cf01..bae3a5128c964 100644 --- a/ext/ftp/ftp.stub.php +++ b/ext/ftp/ftp.stub.php @@ -113,6 +113,9 @@ function ftp_site($ftp, string $cmd): bool {} /** @param resource $ftp */ function ftp_close($ftp): bool {} +/** @param resource $ftp */ +function ftp_quit($ftp): bool {} + /** @param resource $ftp */ function ftp_set_option($ftp, int $option, $value): bool {} diff --git a/ext/ftp/ftp_arginfo.h b/ext/ftp/ftp_arginfo.h index 69a3cd01e95d8..04292b459f2c0 100644 --- a/ext/ftp/ftp_arginfo.h +++ b/ext/ftp/ftp_arginfo.h @@ -182,6 +182,8 @@ ZEND_END_ARG_INFO() #define arginfo_ftp_close arginfo_ftp_cdup +#define arginfo_ftp_quit arginfo_ftp_cdup + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_set_option, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, ftp) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index d196230a628da..8254ed9127daf 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -75,7 +75,7 @@ static const zend_function_entry php_ftp_functions[] = { PHP_FE(ftp_nb_continue, arginfo_ftp_nb_continue) PHP_FE(ftp_nb_put, arginfo_ftp_nb_put) PHP_FE(ftp_nb_fput, arginfo_ftp_nb_fput) - PHP_FALIAS(ftp_quit, ftp_close, arginfo_ftp_close) + PHP_FALIAS(ftp_quit, ftp_close, arginfo_ftp_quit) PHP_FE_END }; diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index d539f6fbcf333..f473e24caa381 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -174,14 +174,14 @@ static const zend_function_entry imap_functions[] = { PHP_FE(imap_getsubscribed, arginfo_imap_getsubscribed) PHP_FE(imap_getmailboxes, arginfo_imap_getmailboxes) - PHP_FALIAS(imap_header, imap_headerinfo, arginfo_imap_headerinfo) - PHP_FALIAS(imap_listmailbox, imap_list, arginfo_imap_list) - PHP_FALIAS(imap_scanmailbox, imap_listscan, arginfo_imap_listscan) - PHP_FALIAS(imap_listsubscribed, imap_lsub, arginfo_imap_lsub) - PHP_FALIAS(imap_fetchtext, imap_body, arginfo_imap_body) - PHP_FALIAS(imap_scan, imap_listscan, arginfo_imap_listscan) - PHP_FALIAS(imap_create, imap_createmailbox, arginfo_imap_createmailbox) - PHP_FALIAS(imap_rename, imap_renamemailbox, arginfo_imap_renamemailbox) + PHP_FALIAS(imap_header, imap_headerinfo, arginfo_imap_header) + PHP_FALIAS(imap_listmailbox, imap_list, arginfo_imap_listmailbox) + PHP_FALIAS(imap_scanmailbox, imap_listscan, arginfo_imap_scanmailbox) + PHP_FALIAS(imap_listsubscribed, imap_lsub, arginfo_imap_listsubscribed) + PHP_FALIAS(imap_fetchtext, imap_body, arginfo_imap_fetchtext) + PHP_FALIAS(imap_scan, imap_listscan, arginfo_imap_scan) + PHP_FALIAS(imap_create, imap_createmailbox, arginfo_imap_create) + PHP_FALIAS(imap_rename, imap_renamemailbox, arginfo_imap_rename) PHP_FE_END }; /* }}} */ diff --git a/ext/imap/php_imap.stub.php b/ext/imap/php_imap.stub.php index 06d19318f521e..c80799225cd2e 100644 --- a/ext/imap/php_imap.stub.php +++ b/ext/imap/php_imap.stub.php @@ -27,6 +27,8 @@ function imap_headers($stream_id): array|false {} /** @param resource $stream_id */ function imap_headerinfo($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN): stdClass|false {} +function imap_header($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN): stdClass|false {} + function imap_rfc822_parse_headers(string $headers, string $default_host = 'UNKNOWN'): \stdClass {} function imap_rfc822_write_address(string $mailbox, string $host, string $personal): string|false {} @@ -36,6 +38,9 @@ function imap_rfc822_parse_adrlist(string $address_string, string $default_host) /** @param resource $stream_id */ function imap_body($stream_id, int $msg_no, int $options = 0): string|false {} +/** @param resource $stream_id */ +function imap_fetchtext($stream_id, int $msg_no, int $options = 0): string|false {} + /** * @param resource $stream_id * @return \stdClass|false @@ -86,51 +91,45 @@ function imap_check($stream_id): stdClass|false {} /** @param resource $stream_id */ function imap_listscan($stream_id, string $ref, string $pattern, string $content): array|false {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ +function imap_scan($stream_id, string $ref, string $pattern, string $content): array|false {} + +/** @param resource $stream_id */ +function imap_scanmailbox($stream_id, string $ref, string $pattern, string $content): array|false {} + +/** @param resource $stream_id */ function imap_mail_copy($stream_id, string $msglist, string $mailbox, int $options = 0): bool {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_mail_move($stream_id, string $sequence, string $mailbox, int $options = 0): bool {} function imap_mail_compose(array $envelope, array $body): string|false {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_createmailbox($stream_id, string $mailbox): bool {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ +function imap_create($stream_id, string $mailbox): bool {} + +/** @param resource $stream_id */ function imap_renamemailbox($stream_id, string $old_name, string $new_name): bool {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ +function imap_rename($stream_id, string $old_name, string $new_name): bool {} + +/** @param resource $stream_id */ function imap_deletemailbox($stream_id, string $mailbox): bool {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_subscribe($stream_id, string $mailbox): bool {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_unsubscribe($stream_id, string $mailbox): bool {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_append($stream_id, string $folder, string $message, string $options = UNKNOWN, string $internal_date = UNKNOWN): bool {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_ping($stream_id): bool {} function imap_base64(string $text): string|false {} @@ -150,25 +149,18 @@ function imap_utf8(string $mime_encoded_text): string {} */ function imap_status($stream_id, string $mailbox, int $options) {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_mailboxmsginfo($stream_id): \stdClass {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_setflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_clearflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {} /** @param resource $stream_id */ function imap_sort($stream_id, int $criteria, int $reverse, int $options = 0, string $search_criteria = UNKNOWN, string $charset = UNKNOWN): array|false {} - /** @param resource $stream_id */ function imap_uid($stream_id, int $msg_no): int|false {} @@ -178,9 +170,15 @@ function imap_msgno($stream_id, int $unique_msg_id): int|false {} /** @param resource $stream_id */ function imap_list($stream_id, string $ref, string $pattern): array|false {} +/** @param resource $stream_id */ +function imap_listmailbox($stream_id, string $ref, string $pattern): array|false {} + /** @param resource $stream_id */ function imap_lsub($stream_id, string $ref, string $pattern): array|false {} +/** @param resource $stream_id */ +function imap_listsubscribed($stream_id, string $ref, string $pattern): array|false {} + /** @param resource $stream_id */ function imap_getsubscribed($stream_id, string $ref, string $pattern): array|false {} @@ -223,14 +221,10 @@ function imap_get_quota($stream_id, string $qroot): array|false {} /** @param resource $stream_id */ function imap_get_quotaroot($stream_id, string $mbox): array|false {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_set_quota($stream_id, string $qroot, int $mailbox_size): bool {} -/** - * @param resource $stream_id - */ +/** @param resource $stream_id */ function imap_setacl($stream_id, string $mailbox, string $id, string $rights): bool {} /** @param resource $stream_id */ diff --git a/ext/imap/php_imap_arginfo.h b/ext/imap/php_imap_arginfo.h index 74fb1f7afbd38..df274969e7fca 100644 --- a/ext/imap/php_imap_arginfo.h +++ b/ext/imap/php_imap_arginfo.h @@ -39,6 +39,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_headerinfo, 0, 2, stdCl ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0) ZEND_END_ARG_INFO() +#define arginfo_imap_header arginfo_imap_headerinfo + ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_rfc822_parse_headers, 0, 1, stdClass, 0) ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0) @@ -61,6 +63,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_body, 0, 2, MAY_BE_STRING|M ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) ZEND_END_ARG_INFO() +#define arginfo_imap_fetchtext arginfo_imap_body + ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_bodystruct, 0, 0, 3) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0) @@ -120,6 +124,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_listscan, 0, 4, MAY_BE_ARRA ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_END_ARG_INFO() +#define arginfo_imap_scan arginfo_imap_listscan + +#define arginfo_imap_scanmailbox arginfo_imap_listscan + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail_copy, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, msglist, IS_STRING, 0) @@ -144,12 +152,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_createmailbox, 0, 2, _IS_BO ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0) ZEND_END_ARG_INFO() +#define arginfo_imap_create arginfo_imap_createmailbox + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_renamemailbox, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, old_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, new_name, IS_STRING, 0) ZEND_END_ARG_INFO() +#define arginfo_imap_rename arginfo_imap_renamemailbox + #define arginfo_imap_deletemailbox arginfo_imap_createmailbox #define arginfo_imap_subscribe arginfo_imap_createmailbox @@ -224,8 +236,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_list, 0, 3, MAY_BE_ARRAY|MA ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_END_ARG_INFO() +#define arginfo_imap_listmailbox arginfo_imap_list + #define arginfo_imap_lsub arginfo_imap_list +#define arginfo_imap_listsubscribed arginfo_imap_list + #define arginfo_imap_getsubscribed arginfo_imap_list #define arginfo_imap_getmailboxes arginfo_imap_list diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index e8a2fc8a32a02..7db01d57b769d 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -10,19 +10,13 @@ function ldap_connect(string $hostname = UNKNOWN, int $port = 389, string $walle function ldap_connect(string $hostname = UNKNOWN, int $port = 389) {} #endif -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_unbind($link_identifier): bool {} -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_close($link_identifier): bool {} -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_bind($link_identifier, string $bind_rdn = UNKNOWN, string $bind_password = UNKNOWN): bool {} /** @@ -32,9 +26,7 @@ function ldap_bind($link_identifier, string $bind_rdn = UNKNOWN, string $bind_pa function ldap_bind_ext($link_identifier, string $bind_rdn = UNKNOWN, string $bind_password = UNKNOWN, array $servercontrols = []) {} #ifdef HAVE_LDAP_SASL -/** - * @param resource $link - */ +/** @param resource $link */ function ldap_sasl_bind($link, string $binddn = UNKNOWN, string $password = UNKNOWN, string $sasl_mech = UNKNOWN, string $sasl_realm = UNKNOWN, string $sasl_authc_id = UNKNOWN, string $sasl_authz_id = UNKNOWN, string $props = UNKNOWN): bool {} #endif @@ -62,9 +54,7 @@ function ldap_list($link_identifier, $base_dn, $filter, array $attributes = [], */ function ldap_search($link_identifier, $base_dn, $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {} -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_free_result($link_identifier): bool {} @@ -116,13 +106,13 @@ function ldap_get_attributes($link_identifier, $result_entry_identifier): array * @param resource $link_identifier * @param resource $result_entry_identifier */ -function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute): array|false {} +function ldap_get_values_len($link_identifier, $result_entry_identifier, string $attribute): array|false {} /** * @param resource $link_identifier * @param resource $result_entry_identifier */ -function ldap_get_values_len($link_identifier, $result_entry_identifier, string $attribute): array|false {} +function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute): array|false {} /** * @param resource $link_identifier @@ -152,19 +142,10 @@ function ldap_delete($link_identifier, string $dn, array $servercontrols = []): */ function ldap_delete_ext($link_identifier, string $dn, array $servercontrols = []) {} -/** - * @param resource $link_identifier - */ -function ldap_modify($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} - -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_modify_batch($link_identifier, string $dn, array $modifications_info, array $servercontrols = []): bool {} -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_mod_add($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} /** @@ -173,21 +154,19 @@ function ldap_mod_add($link_identifier, string $dn, array $entry, array $serverc */ function ldap_mod_add_ext($link_identifier, string $dn, array $entry, array $servercontrols = []) {} - -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_mod_replace($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} +/** @param resource $link_identifier */ +function ldap_modify($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} + /** * @param resource $link_identifier * @return resource|false */ function ldap_mod_replace_ext($link_identifier, string $dn, array $entry, array $servercontrols = []) {} -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_mod_del($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} /** @@ -196,14 +175,10 @@ function ldap_mod_del($link_identifier, string $dn, array $entry, array $serverc */ function ldap_mod_del_ext($link_identifier, string $dn, array $entry, array $servercontrols = []) {} -/** - * @param resource $link - */ +/** @param resource $link */ function ldap_errno($link): int {} -/** - * @param resource $link - */ +/** @param resource $link */ function ldap_error($link): string {} function ldap_err2str(int $errno): string {} @@ -213,9 +188,7 @@ function ldap_compare($link_identifier, string $dn, string $attribute, string $v #ifdef LDAP_CONTROL_PAGEDRESULTS -/** - * @param resource $link - */ +/** @param resource $link */ function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ''): bool {} /** @@ -226,9 +199,7 @@ function ldap_control_paged_result_response($link, $result, &$cookie = null, &$e #endif #if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_rename($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $servercontrols = []): bool {} /** @@ -238,14 +209,10 @@ function ldap_rename($link_identifier, string $dn, string $newrdn, string $newpa function ldap_rename_ext($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $servercontrols = []) {} -/** - * @param resource $link_identifier - */ +/** @param resource $link_identifier */ function ldap_get_option($link_identifier, int $option, &$retval = null): bool {} -/** - * @param ?resource $link_identifier - */ +/** @param ?resource $link_identifier */ function ldap_set_option($link_identifier, int $option, $newval): bool {} /** diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index c7e5429bdf6bc..b03bd99f25202 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -97,13 +97,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_attributes, 0, 2, IS_AR ZEND_ARG_INFO(0, result_entry_identifier) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_values, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_values_len, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_INFO(0, result_entry_identifier) ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_ldap_get_values_len arginfo_ldap_get_values +#define arginfo_ldap_get_values arginfo_ldap_get_values_len ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_dn, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, link_identifier) @@ -145,8 +145,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_delete_ext, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) ZEND_END_ARG_INFO() -#define arginfo_ldap_modify arginfo_ldap_add - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_modify_batch, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) @@ -160,6 +158,8 @@ ZEND_END_ARG_INFO() #define arginfo_ldap_mod_replace arginfo_ldap_add +#define arginfo_ldap_modify arginfo_ldap_add + #define arginfo_ldap_mod_replace_ext arginfo_ldap_add_ext #define arginfo_ldap_mod_del arginfo_ldap_add diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index bb3880f5185b7..62263d2f7e2e6 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -150,9 +150,9 @@ static const zend_function_entry openssl_functions[] = { PHP_FE(openssl_pkey_get_public, arginfo_openssl_pkey_get_public) PHP_FE(openssl_pkey_get_details, arginfo_openssl_pkey_get_details) - PHP_FALIAS(openssl_free_key, openssl_pkey_free, arginfo_openssl_pkey_free) - PHP_FALIAS(openssl_get_privatekey, openssl_pkey_get_private, arginfo_openssl_pkey_get_private) - PHP_FALIAS(openssl_get_publickey, openssl_pkey_get_public, arginfo_openssl_pkey_get_public) + PHP_FALIAS(openssl_free_key, openssl_pkey_free, arginfo_openssl_free_key) + PHP_FALIAS(openssl_get_privatekey, openssl_pkey_get_private, arginfo_openssl_get_privatekey) + PHP_FALIAS(openssl_get_publickey, openssl_pkey_get_public, arginfo_openssl_get_publickey) /* x.509 cert funcs */ PHP_FE(openssl_x509_read, arginfo_openssl_x509_read) diff --git a/ext/openssl/openssl.stub.php b/ext/openssl/openssl.stub.php index e75f79c906e09..413414117f250 100644 --- a/ext/openssl/openssl.stub.php +++ b/ext/openssl/openssl.stub.php @@ -74,15 +74,30 @@ function openssl_pkey_export($key, &$out, ?string $passphrase = null, ?array $co */ function openssl_pkey_get_public($cert) {} +/** + * @param resource|string|array $cert + * @return resource|false + */ +function openssl_get_publickey($cert) {} + /** @param resource $key */ function openssl_pkey_free($key): void {} +/** @param resource $key */ +function openssl_free_key($key): void {} + /** * @param resource|string|array $key * @return resource|false */ function openssl_pkey_get_private($key, string $passphrase = UNKNOWN) {} +/** + * @param resource|string|array $key + * @return resource|false + */ +function openssl_get_privatekey($key, string $passphrase = UNKNOWN) {} + /** @param resource $key */ function openssl_pkey_get_details($key): array|false {} diff --git a/ext/openssl/openssl_arginfo.h b/ext/openssl/openssl_arginfo.h index 9f8835ec13c23..ef1db8bfcd077 100644 --- a/ext/openssl/openssl_arginfo.h +++ b/ext/openssl/openssl_arginfo.h @@ -128,15 +128,21 @@ ZEND_END_ARG_INFO() #define arginfo_openssl_pkey_get_public arginfo_openssl_x509_read +#define arginfo_openssl_get_publickey arginfo_openssl_x509_read + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkey_free, 0, 1, IS_VOID, 0) ZEND_ARG_INFO(0, key) ZEND_END_ARG_INFO() +#define arginfo_openssl_free_key arginfo_openssl_pkey_free + ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_get_private, 0, 0, 1) ZEND_ARG_INFO(0, key) ZEND_ARG_TYPE_INFO(0, passphrase, IS_STRING, 0) ZEND_END_ARG_INFO() +#define arginfo_openssl_get_privatekey arginfo_openssl_pkey_get_private + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pkey_get_details, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, key) ZEND_END_ARG_INFO() diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 0cf698c9a8566..c7aa6bcbc3b34 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -73,7 +73,7 @@ static const zend_function_entry pcntl_functions[] = { PHP_FE(pcntl_exec, arginfo_pcntl_exec) PHP_FE(pcntl_alarm, arginfo_pcntl_alarm) PHP_FE(pcntl_get_last_error, arginfo_pcntl_get_last_error) - PHP_FALIAS(pcntl_errno, pcntl_get_last_error, arginfo_pcntl_get_last_error) + PHP_FALIAS(pcntl_errno, pcntl_get_last_error, arginfo_pcntl_errno) PHP_FE(pcntl_strerror, arginfo_pcntl_strerror) #ifdef HAVE_GETPRIORITY PHP_FE(pcntl_getpriority, arginfo_pcntl_getpriority) diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php index 7ca872663ac2c..c8da88c481f1c 100644 --- a/ext/pcntl/pcntl.stub.php +++ b/ext/pcntl/pcntl.stub.php @@ -50,6 +50,8 @@ function pcntl_alarm(int $seconds): int {} function pcntl_get_last_error(): int {} +function pcntl_errno(): int {} + #ifdef HAVE_GETPRIORITY function pcntl_getpriority(int $pid = UNKNOWN, int $process_identifier = PRIO_PROCESS): int|false {} #endif diff --git a/ext/pcntl/pcntl_arginfo.h b/ext/pcntl/pcntl_arginfo.h index 7fc37ab4ec0bf..2b73bac3ebae6 100644 --- a/ext/pcntl/pcntl_arginfo.h +++ b/ext/pcntl/pcntl_arginfo.h @@ -87,6 +87,8 @@ ZEND_END_ARG_INFO() #define arginfo_pcntl_get_last_error arginfo_pcntl_fork +#define arginfo_pcntl_errno arginfo_pcntl_fork + #if defined(HAVE_GETPRIORITY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_getpriority, 0, 0, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0) diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c index 0bd99f3d41cd8..eae396156f2ec 100644 --- a/ext/skeleton/skeleton.c +++ b/ext/skeleton/skeleton.c @@ -16,9 +16,9 @@ ZEND_PARSE_PARAMETERS_END() #endif -/* {{{ void %EXTNAME%_test1() +/* {{{ void test1() */ -PHP_FUNCTION(%EXTNAME%_test1) +PHP_FUNCTION(test1) { ZEND_PARSE_PARAMETERS_NONE(); @@ -70,8 +70,8 @@ PHP_MINFO_FUNCTION(%EXTNAME%) /* {{{ %EXTNAME%_functions[] */ static const zend_function_entry %EXTNAME%_functions[] = { - PHP_FE(%EXTNAME%_test1, arginfo_%EXTNAME%_test1) - PHP_FE(%EXTNAME%_test2, arginfo_%EXTNAME%_test2) + PHP_FE(test1, arginfo_test1) + PHP_FE(test2, arginfo_test2) PHP_FE_END }; /* }}} */ diff --git a/ext/skeleton/skeleton.stub.php b/ext/skeleton/skeleton.stub.php index 4bddcf37aa551..59b5abd3dd054 100644 --- a/ext/skeleton/skeleton.stub.php +++ b/ext/skeleton/skeleton.stub.php @@ -1,5 +1,5 @@ --FILE-- diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 2f0184097f665..8552dfbc43a0f 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -189,8 +189,8 @@ static const zend_function_entry sockets_functions[] = { PHP_FE(socket_addrinfo_explain, arginfo_socket_addrinfo_explain) /* for downwards compatibility */ - PHP_FALIAS(socket_getopt, socket_get_option, arginfo_socket_get_option) - PHP_FALIAS(socket_setopt, socket_set_option, arginfo_socket_set_option) + PHP_FALIAS(socket_getopt, socket_get_option, arginfo_socket_getopt) + PHP_FALIAS(socket_setopt, socket_set_option, arginfo_socket_setopt) #ifdef PHP_WIN32 PHP_FE(socket_wsaprotocol_info_export, arginfo_socket_wsaprotocol_info_export) diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index d79cb7ac7aad7..86c4cd856e6f4 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -61,9 +61,15 @@ function socket_sendto($socket, string $buf, int $len, int $flags, string $addr, /** @param resource $socket */ function socket_get_option($socket, int $level, int $optname): array|int|false {} +/** @param resource $socket */ +function socket_getopt($socket, int $level, int $optname): array|int|false {} + /** @param resource $socket */ function socket_set_option($socket, int $level, int $optname, $optval): bool {} +/** @param resource $socket */ +function socket_setopt($socket, int $level, int $optname, $optval): bool {} + #ifdef HAVE_SOCKETPAIR function socket_create_pair(int $domain, int $type, int $protocol, &$fd): bool|null {} #endif diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index 397c2e5683cb8..ef40e5dda13f4 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -108,6 +108,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_get_option, 0, 3, MAY_BE_ ZEND_ARG_TYPE_INFO(0, optname, IS_LONG, 0) ZEND_END_ARG_INFO() +#define arginfo_socket_getopt arginfo_socket_get_option + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_set_option, 0, 4, _IS_BOOL, 0) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0) @@ -115,6 +117,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_set_option, 0, 4, _IS_BOO ZEND_ARG_INFO(0, optval) ZEND_END_ARG_INFO() +#define arginfo_socket_setopt arginfo_socket_set_option + #if defined(HAVE_SOCKETPAIR) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_create_pair, 0, 4, _IS_BOOL, 1) ZEND_ARG_TYPE_INFO(0, domain, IS_LONG, 0) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index f6d513f53d224..b7d2f4618b7e6 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -218,7 +218,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(similar_text, arginfo_similar_text) PHP_FE(explode, arginfo_explode) PHP_FE(implode, arginfo_implode) - PHP_FALIAS(join, implode, arginfo_implode) + PHP_FALIAS(join, implode, arginfo_join) PHP_FE(setlocale, arginfo_setlocale) PHP_FE(localeconv, arginfo_localeconv) @@ -233,8 +233,8 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(parse_str, arginfo_parse_str) PHP_FE(str_getcsv, arginfo_str_getcsv) PHP_FE(str_pad, arginfo_str_pad) - PHP_FALIAS(chop, rtrim, arginfo_rtrim) - PHP_FALIAS(strchr, strstr, arginfo_strstr) + PHP_FALIAS(chop, rtrim, arginfo_chop) + PHP_FALIAS(strchr, strstr, arginfo_strchr) PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), arginfo_sprintf) PHP_NAMED_FE(printf, PHP_FN(user_printf), arginfo_printf) PHP_FE(vprintf, arginfo_vprintf) @@ -276,8 +276,8 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ #endif PHP_FE(rand, arginfo_mt_rand) - PHP_FALIAS(srand, mt_srand, arginfo_mt_srand) - PHP_FALIAS(getrandmax, mt_getrandmax, arginfo_mt_getrandmax) + PHP_FALIAS(srand, mt_srand, arginfo_srand) + PHP_FALIAS(getrandmax, mt_getrandmax, arginfo_getrandmax) PHP_FE(mt_rand, arginfo_mt_rand) PHP_FE(mt_srand, arginfo_mt_srand) PHP_FE(mt_getrandmax, arginfo_mt_getrandmax) @@ -423,14 +423,14 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(unregister_tick_function, arginfo_unregister_tick_function) PHP_FE(highlight_file, arginfo_highlight_file) - PHP_FALIAS(show_source, highlight_file, arginfo_highlight_file) + PHP_FALIAS(show_source, highlight_file, arginfo_show_source) PHP_FE(highlight_string, arginfo_highlight_string) PHP_FE(php_strip_whitespace, arginfo_php_strip_whitespace) PHP_FE(ini_get, arginfo_ini_get) PHP_FE(ini_get_all, arginfo_ini_get_all) PHP_FE(ini_set, arginfo_ini_set) - PHP_FALIAS(ini_alter, ini_set, arginfo_ini_set) + PHP_FALIAS(ini_alter, ini_set, arginfo_ini_alter) PHP_FE(ini_restore, arginfo_ini_restore) PHP_FE(get_include_path, arginfo_get_include_path) PHP_FE(set_include_path, arginfo_set_include_path) @@ -471,11 +471,11 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ #if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC PHP_FE(dns_check_record, arginfo_dns_check_record) - PHP_FALIAS(checkdnsrr, dns_check_record, arginfo_dns_check_record) + PHP_FALIAS(checkdnsrr, dns_check_record, arginfo_checkdnsrr) # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS PHP_FE(dns_get_mx, arginfo_dns_get_mx) - PHP_FALIAS(getmxrr, dns_get_mx, arginfo_dns_get_mx) + PHP_FALIAS(getmxrr, dns_get_mx, arginfo_getmxrr) PHP_FE(dns_get_record, arginfo_dns_get_record) # endif #endif @@ -483,7 +483,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ /* functions from type.c */ PHP_FE(intval, arginfo_intval) PHP_FE(floatval, arginfo_floatval) - PHP_FALIAS(doubleval, floatval, arginfo_floatval) + PHP_FALIAS(doubleval, floatval, arginfo_doubleval) PHP_FE(strval, arginfo_strval) PHP_FE(boolval, arginfo_boolval) PHP_FE(gettype, arginfo_gettype) @@ -493,10 +493,10 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(is_bool, arginfo_is_bool) PHP_FE(is_int, arginfo_is_int) PHP_FE(is_float, arginfo_is_float) - PHP_FALIAS(is_integer, is_int, arginfo_is_int) - PHP_FALIAS(is_long, is_int, arginfo_is_int) - PHP_FALIAS(is_double, is_float, arginfo_is_float) - PHP_DEP_FALIAS(is_real, is_float, arginfo_is_float) + PHP_FALIAS(is_integer, is_int, arginfo_is_integer) + PHP_FALIAS(is_long, is_int, arginfo_is_long) + PHP_FALIAS(is_double, is_float, arginfo_is_double) + PHP_DEP_FALIAS(is_real, is_float, arginfo_is_real) PHP_FE(is_numeric, arginfo_is_numeric) PHP_FE(is_string, arginfo_is_string) PHP_FE(is_array, arginfo_is_array) @@ -526,7 +526,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(ftell, arginfo_ftell) PHP_FE(fflush, arginfo_fflush) PHP_FE(fwrite, arginfo_fwrite) - PHP_FALIAS(fputs, fwrite, arginfo_fwrite) + PHP_FALIAS(fputs, fwrite, arginfo_fputs) PHP_FE(mkdir, arginfo_mkdir) PHP_FE(rename, arginfo_rename) PHP_FE(copy, arginfo_copy) @@ -572,16 +572,16 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(get_meta_tags, arginfo_get_meta_tags) PHP_FE(stream_set_read_buffer, arginfo_stream_set_read_buffer) PHP_FE(stream_set_write_buffer, arginfo_stream_set_write_buffer) - PHP_FALIAS(set_file_buffer, stream_set_write_buffer, arginfo_stream_set_write_buffer) + PHP_FALIAS(set_file_buffer, stream_set_write_buffer, arginfo_set_file_buffer) PHP_FE(stream_set_chunk_size, arginfo_stream_set_chunk_size) PHP_FE(stream_set_blocking, arginfo_stream_set_blocking) - PHP_FALIAS(socket_set_blocking, stream_set_blocking, arginfo_stream_set_blocking) + PHP_FALIAS(socket_set_blocking, stream_set_blocking, arginfo_socket_set_blocking) PHP_FE(stream_get_meta_data, arginfo_stream_get_meta_data) PHP_FE(stream_get_line, arginfo_stream_get_line) PHP_FE(stream_wrapper_register, arginfo_stream_wrapper_register) - PHP_FALIAS(stream_register_wrapper, stream_wrapper_register, arginfo_stream_wrapper_register) + PHP_FALIAS(stream_register_wrapper, stream_wrapper_register, arginfo_stream_register_wrapper) PHP_FE(stream_wrapper_unregister, arginfo_stream_wrapper_unregister) PHP_FE(stream_wrapper_restore, arginfo_stream_wrapper_restore) PHP_FE(stream_get_wrappers, arginfo_stream_get_wrappers) @@ -592,10 +592,10 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ #if HAVE_SYS_TIME_H || defined(PHP_WIN32) PHP_FE(stream_set_timeout, arginfo_stream_set_timeout) - PHP_FALIAS(socket_set_timeout, stream_set_timeout, arginfo_stream_set_timeout) + PHP_FALIAS(socket_set_timeout, stream_set_timeout, arginfo_socket_set_timeout) #endif - PHP_FALIAS(socket_get_status, stream_get_meta_data, arginfo_stream_get_meta_data) + PHP_FALIAS(socket_get_status, stream_get_meta_data, arginfo_socket_get_status) #if HAVE_REALPATH || defined(ZTS) PHP_FE(realpath, arginfo_realpath) @@ -648,7 +648,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(filetype, arginfo_filetype) PHP_FE(file_exists, arginfo_file_exists) PHP_FE(is_writable, arginfo_is_writable) - PHP_FALIAS(is_writeable, is_writable, arginfo_is_writable) + PHP_FALIAS(is_writeable, is_writable, arginfo_is_writeable) PHP_FE(is_readable, arginfo_is_readable) PHP_FE(is_executable, arginfo_is_executable) PHP_FE(is_file, arginfo_is_file) @@ -671,7 +671,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(clearstatcache, arginfo_clearstatcache) PHP_FE(disk_total_space, arginfo_disk_total_space) PHP_FE(disk_free_space, arginfo_disk_free_space) - PHP_FALIAS(diskfreespace, disk_free_space, arginfo_disk_free_space) + PHP_FALIAS(diskfreespace, disk_free_space, arginfo_diskfreespace) PHP_FE(realpath_cache_size, arginfo_realpath_cache_size) PHP_FE(realpath_cache_get, arginfo_realpath_cache_get) @@ -786,9 +786,9 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(array_key_exists, arginfo_array_key_exists) /* aliases from array.c */ - PHP_FALIAS(pos, current, arginfo_current) - PHP_FALIAS(sizeof, count, arginfo_count) - PHP_FALIAS(key_exists, array_key_exists, arginfo_array_key_exists) + PHP_FALIAS(pos, current, arginfo_pos) + PHP_FALIAS(sizeof, count, arginfo_sizeof) + PHP_FALIAS(key_exists, array_key_exists, arginfo_key_exists) /* functions from assert.c */ PHP_FE(assert, arginfo_assert) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 1d2179fe62cda..3d19f2137b48d 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -47,6 +47,8 @@ function output_add_rewrite_var(string $name, string $value): bool {} function stream_wrapper_register(string $protocol, string $classname, int $flags = 0): bool {} +function stream_register_wrapper(string $protocol, string $classname, int $flags = 0): bool {} + function stream_wrapper_unregister(string $protocol): bool {} function stream_wrapper_restore(string $protocol): bool {} @@ -62,6 +64,9 @@ function ksort(array &$arg, int $sort_flags = SORT_REGULAR): bool {} /** @param mixed $var */ function count($var, int $mode = COUNT_NORMAL): int {} +/** @param mixed $var */ +function sizeof($var, int $mode = COUNT_NORMAL): int {} + function natsort(array &$arg): bool {} function natcasesort(array &$arg): bool {} @@ -95,6 +100,9 @@ function reset(array|object &$arg) {} /** @return mixed */ function current(array|object $arg) {} +/** @return mixed */ +function pos(array|object $arg) {} + function key(array|object $arg): int|string|null {} /** @return mixed */ @@ -230,6 +238,9 @@ function array_map(?callable $callback, array $arr1, array ...$arrays): array {} /** @param mixed $key */ function array_key_exists($key, array $search): bool {} +/** @param mixed $key */ +function key_exists($key, array $search): bool {} + function array_chunk(array $arg, int $size, bool $preserve_keys = false): array {} function array_combine(array $keys, array $values): array {} @@ -305,6 +316,8 @@ function register_shutdown_function($function, ...$args): ?bool {} function highlight_file(string $filename, bool $return = false): string|bool|null {} +function show_source(string $filename, bool $return = false): string|bool|null {} + function php_strip_whitespace(string $filename): string {} function highlight_string(string $string, bool $return = false): string|bool|null {} @@ -315,6 +328,8 @@ function ini_get_all(?string $extension = null, bool $details = true): array|fal function ini_set(string $varname, string $value): string|false {} +function ini_alter(string $varname, string $value): string|false {} + function ini_restore(string $varname): void {} function set_include_path(string $include_path): string|false {} @@ -402,9 +417,13 @@ function gethostbynamel(string $hostname): array|false {} #if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC function dns_check_record(string $hostname, string $type = "MX"): bool {} +function checkdnsrr(string $hostname, string $type = "MX"): bool {} + function dns_get_record(string $hostname, int $type = DNS_ANY, &$authns = null, &$addtl = null, bool $raw = false): array|false {} function dns_get_mx(string $hostname, &$mxhosts, &$weight = null): bool {} + +function getmxrr(string $hostname, &$mxhosts, &$weight = null): bool {} #endif /* net.c */ @@ -529,6 +548,8 @@ function trim(string $str, string $character_mask = " \n\r\t\v\0"): string {} function rtrim(string $str, string $character_mask = " \n\r\t\v\0"): string {} +function chop(string $str, string $character_mask = " \n\r\t\v\0"): string {} + function ltrim(string $str, string $character_mask = " \n\r\t\v\0"): string {} function wordwrap(string $str, int $width = 75, string $break = "\n", bool $cut = false): string {} @@ -537,6 +558,8 @@ function explode(string $separator, string $str, int $limit = PHP_INT_MAX): arra function implode(string|array $glue, array $pieces = UNKNOWN): string {} +function join(string|array $glue, array $pieces = UNKNOWN): string {} + function strtok(string $str, string $token = UNKNOWN): string|false {} function strtoupper(string $str): string {} @@ -553,6 +576,8 @@ function stristr(string $haystack, string $needle, bool $before_needle = false): function strstr(string $haystack, string $needle, bool $before_needle = false): string|false {} +function strchr(string $haystack, string $needle, bool $before_needle = false): string|false {} + function strpos(string $haystack, string $needle, int $offset = 0): int|false {} function stripos(string $haystack, string $needle, int $offset = 0): int|false {} @@ -695,6 +720,9 @@ public function read($dir_handle = UNKNOWN) {} */ function opendir(string $path, $context = UNKNOWN) {} +/** @param resource $context */ +function getdir(string $path, $context = UNKNOWN): Directory|false {} + /** @param resource $context */ function dir(string $path, $context = UNKNOWN): Directory|false {} @@ -811,6 +839,9 @@ function fflush($handle): bool {} /** @param resource $handle */ function fwrite($handle, string $content, int $max_length = UNKNOWN): int|false {} +/** @param resource $handle */ +function fputs($handle, string $content, int $max_length = UNKNOWN): int|false {} + /** @param resource|null $context */ function mkdir(string $pathname, int $mode = 0777, bool $recursive = false, $context = null): bool {} @@ -1157,10 +1188,14 @@ function quoted_printable_encode(string $str): string {} function mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} +function srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} + function mt_rand(int $min = 0, int $max = PHP_INT_MAX): int {} function mt_getrandmax(): int {} +function getrandmax(): int {} + /* random.c */ function random_bytes(int $length): string {} @@ -1275,15 +1310,24 @@ function stream_supports_lock($stream): bool {} /** @param resource $stream */ function stream_set_write_buffer($stream, int $buffer): int {} +/** @param resource $stream */ +function set_file_buffer($stream, int $buffer): int {} + /** @param resource $stream */ function stream_set_read_buffer($stream, int $buffer): int {} /** @param resource $stream */ function stream_set_blocking($stream, bool $mode): bool {} +/** @param resource $stream */ +function socket_set_blocking($stream, bool $mode): bool {} + /** @param resource $stream */ function stream_get_meta_data($stream): array {} +/** @param resource $stream */ +function socket_get_status($stream): array {} + /** @param resource $handle */ function stream_get_line($handle, int $max_length, string $ending = ""): string|false {} @@ -1310,6 +1354,9 @@ function stream_set_chunk_size($stream, int $size): int {} #if HAVE_SYS_TIME_H || defined(PHP_WIN32) /** @param resource $socket */ function stream_set_timeout($socket, int $seconds, int $microseconds = 0): bool {} + +/** @param resource $socket */ +function socket_set_timeout($socket, int $seconds, int $microseconds = 0): bool {} #endif /* type.c */ @@ -1325,6 +1372,9 @@ function intval($value, int $base = 10): int {} /** @param mixed $value */ function floatval($value): float {} +/** @param mixed $value */ +function doubleval($value): float {} + /** @param mixed $value */ function boolval($value): bool {} @@ -1343,9 +1393,21 @@ function is_bool($value): bool {} /** @param mixed $value */ function is_int($value): bool {} +/** @param mixed $value */ +function is_integer($value): bool {} + +/** @param mixed $value */ +function is_long($value): bool {} + /** @param mixed $value */ function is_float($value): bool {} +/** @param mixed $value */ +function is_double($value): bool {} + +/** @param mixed $value */ +function is_real($value): bool {} + /** @param mixed $value */ function is_numeric($value): bool {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 98c7ff77f7794..b5af02829d746 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -60,6 +60,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_wrapper_register, 0, 2, _ ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() +#define arginfo_stream_register_wrapper arginfo_stream_wrapper_register + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_wrapper_unregister, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, protocol, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -83,6 +85,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_count, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_END_ARG_INFO() +#define arginfo_sizeof arginfo_count + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_natsort, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(1, arg, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -120,6 +124,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_current, 0, 0, 1) ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT) ZEND_END_ARG_INFO() +#define arginfo_pos arginfo_current + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_key, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_NULL) ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT) ZEND_END_ARG_INFO() @@ -347,6 +353,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_key_exists, 0, 2, _IS_BOOL ZEND_ARG_TYPE_INFO(0, search, IS_ARRAY, 0) ZEND_END_ARG_INFO() +#define arginfo_key_exists arginfo_array_key_exists + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_chunk, 0, 2, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) @@ -463,6 +471,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_highlight_file, 0, 1, MAY_BE_STR ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) ZEND_END_ARG_INFO() +#define arginfo_show_source arginfo_highlight_file + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_php_strip_whitespace, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -486,6 +496,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_set, 0, 2, MAY_BE_STRING|MAY ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) ZEND_END_ARG_INFO() +#define arginfo_ini_alter arginfo_ini_set + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ini_restore, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, varname, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -625,6 +637,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dns_check_record, 0, 1, _IS_BOOL ZEND_END_ARG_INFO() #endif +#if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC +#define arginfo_checkdnsrr arginfo_dns_check_record +#endif + #if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dns_get_record, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) @@ -643,6 +659,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dns_get_mx, 0, 2, _IS_BOOL, 0) ZEND_END_ARG_INFO() #endif +#if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC +#define arginfo_getmxrr arginfo_dns_get_mx +#endif + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_net_get_interfaces, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_END_ARG_INFO() @@ -825,6 +845,8 @@ ZEND_END_ARG_INFO() #define arginfo_rtrim arginfo_trim +#define arginfo_chop arginfo_trim + #define arginfo_ltrim arginfo_trim ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_wordwrap, 0, 1, IS_STRING, 0) @@ -845,6 +867,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_implode, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, pieces, IS_ARRAY, 0) ZEND_END_ARG_INFO() +#define arginfo_join arginfo_implode + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtok, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, token, IS_STRING, 0) @@ -877,6 +901,8 @@ ZEND_END_ARG_INFO() #define arginfo_strstr arginfo_stristr +#define arginfo_strchr arginfo_stristr + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) @@ -1083,11 +1109,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_opendir, 0, 0, 1) ZEND_ARG_INFO(0, context) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_dir, 0, 1, Directory, MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_getdir, 0, 1, Directory, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_INFO(0, context) ZEND_END_ARG_INFO() +#define arginfo_dir arginfo_getdir + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_closedir, 0, 0, IS_VOID, 0) ZEND_ARG_INFO(0, dir_handle) ZEND_END_ARG_INFO() @@ -1256,6 +1284,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fwrite, 0, 2, MAY_BE_LONG|MAY_BE ZEND_ARG_TYPE_INFO(0, max_length, IS_LONG, 0) ZEND_END_ARG_INFO() +#define arginfo_fputs arginfo_fwrite + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mkdir, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, pathname, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) @@ -1801,6 +1831,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mt_srand, 0, 0, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_END_ARG_INFO() +#define arginfo_srand arginfo_mt_srand + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mt_rand, 0, 0, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, min, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, max, IS_LONG, 0) @@ -1808,6 +1840,8 @@ ZEND_END_ARG_INFO() #define arginfo_mt_getrandmax arginfo_ob_get_level +#define arginfo_getrandmax arginfo_ob_get_level + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_random_bytes, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -1961,6 +1995,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_write_buffer, 0, 2, I ZEND_ARG_TYPE_INFO(0, buffer, IS_LONG, 0) ZEND_END_ARG_INFO() +#define arginfo_set_file_buffer arginfo_stream_set_write_buffer + #define arginfo_stream_set_read_buffer arginfo_stream_set_write_buffer ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_blocking, 0, 2, _IS_BOOL, 0) @@ -1968,10 +2004,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_blocking, 0, 2, _IS_B ZEND_ARG_TYPE_INFO(0, mode, _IS_BOOL, 0) ZEND_END_ARG_INFO() +#define arginfo_socket_set_blocking arginfo_stream_set_blocking + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_get_meta_data, 0, 1, IS_ARRAY, 0) ZEND_ARG_INFO(0, stream) ZEND_END_ARG_INFO() +#define arginfo_socket_get_status arginfo_stream_get_meta_data + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_get_line, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, handle) ZEND_ARG_TYPE_INFO(0, max_length, IS_LONG, 0) @@ -2008,6 +2048,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_timeout, 0, 2, _IS_BO ZEND_END_ARG_INFO() #endif +#if HAVE_SYS_TIME_H || defined(PHP_WIN32) +#define arginfo_socket_set_timeout arginfo_stream_set_timeout +#endif + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gettype, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, var) ZEND_END_ARG_INFO() @@ -2026,6 +2070,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_floatval, 0, 1, IS_DOUBLE, 0) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() +#define arginfo_doubleval arginfo_floatval + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_boolval, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() @@ -2042,8 +2088,16 @@ ZEND_END_ARG_INFO() #define arginfo_is_int arginfo_boolval +#define arginfo_is_integer arginfo_boolval + +#define arginfo_is_long arginfo_boolval + #define arginfo_is_float arginfo_boolval +#define arginfo_is_double arginfo_boolval + +#define arginfo_is_real arginfo_boolval + #define arginfo_is_numeric arginfo_boolval #define arginfo_is_string arginfo_boolval From 28a30f7afa41034eefaf67a0a50c23a3ad6e257b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 19 Feb 2020 09:45:41 +0100 Subject: [PATCH 051/201] Handle static return type in AST printer Fixes OSS-Fuzz #20782. --- Zend/tests/assert/expect_015.phpt | 16 ++++++++-------- Zend/zend_ast.c | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Zend/tests/assert/expect_015.phpt b/Zend/tests/assert/expect_015.phpt index 9b2cabd59f8b9..21ff636f92c8c 100644 --- a/Zend/tests/assert/expect_015.phpt +++ b/Zend/tests/assert/expect_015.phpt @@ -119,7 +119,7 @@ assert(0 && ($a = function &(array &...$a) { } })); -assert(0 && ($a = function () { +assert(0 && ($a = function (): ?static { declare(C=1) { echo 1; } $x = '\'"`$a'; $x = "'\"`$a"; @@ -160,7 +160,7 @@ Warning: assert(): assert(0 && ($a = function () { $y = clone $x; yield 1 => 2; yield from $x; -})) failed in %sexpect_015.php on line %d +})) failed in %s on line %d Warning: assert(): assert(0 && ($a = function &(array &$a, ?X $b = null) use($c, &$d): ?X { abstract class A extends B implements C, D { @@ -202,7 +202,7 @@ Warning: assert(): assert(0 && ($a = function &(array &$a, ?X $b = null) use($c, } -})) failed in %sexpect_015.php on line %d +})) failed in %s on line %d Warning: assert(): assert(0 && ($a = function &(array &$a, X $b = null, int|float $c) use($c, &$d): X { final class A { @@ -242,7 +242,7 @@ Warning: assert(): assert(0 && ($a = function &(array &$a, X $b = null, int|floa } -})) failed in %sexpect_015.php on line %d +})) failed in %s on line %d Warning: assert(): assert(0 && ($a = function &(?array &$a, X $b = null) use($c, &$d): X { class A { @@ -255,7 +255,7 @@ Warning: assert(): assert(0 && ($a = function &(?array &$a, X $b = null) use($c, use T3; } -})) failed in %sexpect_015.php on line %d +})) failed in %s on line %d Warning: assert(): assert(0 && ($a = function &(array &...$a) { declare(A = 1, B = 2); @@ -268,9 +268,9 @@ Warning: assert(): assert(0 && ($a = function &(array &...$a) { } finally { echo 3; } -})) failed in %sexpect_015.php on line %d +})) failed in %s on line %d -Warning: assert(): assert(0 && ($a = function () { +Warning: assert(): assert(0 && ($a = function (): ?static { declare(C = 1) { echo 1; } @@ -296,4 +296,4 @@ Warning: assert(): assert(0 && ($a = function () { if ($a) { } else { } -})) failed in %sexpect_015.php on line %d +})) failed in %s on line %d diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index c88e6658edadf..7cfc0450fd84e 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -1571,6 +1571,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio switch (ast->attr & ~ZEND_TYPE_NULLABLE) { case IS_ARRAY: APPEND_STR("array"); case IS_CALLABLE: APPEND_STR("callable"); + case IS_STATIC: APPEND_STR("static"); EMPTY_SWITCH_DEFAULT_CASE(); } break; From 318fe06042a2196e4f79a0141ab71b26a6a3a277 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 19 Feb 2020 10:22:54 +0100 Subject: [PATCH 052/201] Create memory stream in exif fuzzer At least one segfault observed because temp file creation failed. Switch to using a memory stream, which should be more robust, and more efficient for that matter. --- sapi/fuzzer/fuzzer-exif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi/fuzzer/fuzzer-exif.c b/sapi/fuzzer/fuzzer-exif.c index 230852bb61ccc..71f1c88b7846f 100644 --- a/sapi/fuzzer/fuzzer-exif.c +++ b/sapi/fuzzer/fuzzer-exif.c @@ -45,7 +45,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; } - stream = php_stream_fopen_tmpfile(); + stream = php_stream_memory_create(TEMP_STREAM_DEFAULT); php_stream_write(stream, (const char *) Data, Size); php_stream_to_zval(stream, &stream_zv); From 4f892118106741b1765c4704d1feb89a4eade38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 19 Feb 2020 00:00:50 +0100 Subject: [PATCH 053/201] Remove the deprecated reflection export methods Closes GH-5188 --- ext/com_dotnet/tests/bug45280.phpt | 3 +- ext/reflection/php_reflection.c | 194 ------------------ ext/reflection/php_reflection.stub.php | 20 -- ext/reflection/php_reflection_arginfo.h | 37 ---- ext/reflection/tests/001.phpt | 1 - .../tests/ReflectionClassConstant_basic1.phpt | 50 +---- .../tests/ReflectionClass_toString_001.phpt | 9 +- .../ReflectionExtension_export_basic.phpt | 16 -- .../tests/ReflectionMethod_basic2.phpt | 86 +------- .../ReflectionParameter_export_error2.phpt | 34 --- .../ReflectionParameter_export_error3.phpt | 23 --- .../tests/ReflectionProperty_basic1.phpt | 50 +---- .../ReflectionProperty_export_basic.phpt | 14 -- .../ReflectionProperty_export_error.phpt | 50 ----- .../tests/ReflectionZendExtension.phpt | 4 - ext/reflection/tests/bug46205.phpt | 15 -- ext/simplexml/tests/bug37565.phpt | 33 --- 17 files changed, 13 insertions(+), 626 deletions(-) delete mode 100644 ext/reflection/tests/ReflectionExtension_export_basic.phpt delete mode 100644 ext/reflection/tests/ReflectionParameter_export_error2.phpt delete mode 100644 ext/reflection/tests/ReflectionParameter_export_error3.phpt delete mode 100644 ext/reflection/tests/ReflectionProperty_export_basic.phpt delete mode 100644 ext/reflection/tests/ReflectionProperty_export_error.phpt delete mode 100644 ext/reflection/tests/bug46205.phpt delete mode 100644 ext/simplexml/tests/bug37565.phpt diff --git a/ext/com_dotnet/tests/bug45280.phpt b/ext/com_dotnet/tests/bug45280.phpt index b530083cca337..393799e37469f 100644 --- a/ext/com_dotnet/tests/bug45280.phpt +++ b/ext/com_dotnet/tests/bug45280.phpt @@ -8,8 +8,9 @@ if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; name)); - RETURN_FALSE; - } - - if (return_output) { - ZVAL_COPY_VALUE(return_value, &retval); - } else { - /* No need for _r variant, return of __toString should always be a string */ - zend_print_zval(&retval, 0); - zend_printf("\n"); - zval_ptr_dtor(&retval); - } -} - -/* {{{ _reflection_export */ -static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *ce_ptr, int ctor_argc) -{ - zval reflector; - zval *argument_ptr, *argument2_ptr; - zval retval, params[2]; - int result; - int return_output = 0; - zend_fcall_info fci; - zend_fcall_info_cache fcc; - - if (ctor_argc == 1) { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &argument_ptr, &return_output) == FAILURE) { - RETURN_THROWS(); - } - ZVAL_COPY_VALUE(¶ms[0], argument_ptr); - ZVAL_NULL(¶ms[1]); - } else { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz|b", &argument_ptr, &argument2_ptr, &return_output) == FAILURE) { - RETURN_THROWS(); - } - ZVAL_COPY_VALUE(¶ms[0], argument_ptr); - ZVAL_COPY_VALUE(¶ms[1], argument2_ptr); - } - - /* Create object */ - if (object_init_ex(&reflector, ce_ptr) == FAILURE) { - _DO_THROW("Could not create reflector"); - RETURN_THROWS(); - } - - /* Call __construct() */ - - fci.size = sizeof(fci); - ZVAL_UNDEF(&fci.function_name); - fci.object = Z_OBJ(reflector); - fci.retval = &retval; - fci.param_count = ctor_argc; - fci.params = params; - fci.no_separation = 1; - - fcc.function_handler = ce_ptr->constructor; - fcc.called_scope = Z_OBJCE(reflector); - fcc.object = Z_OBJ(reflector); - - result = zend_call_function(&fci, &fcc); - - zval_ptr_dtor(&retval); - - if (EG(exception)) { - zval_ptr_dtor(&reflector); - RETURN_THROWS(); - } - if (result == FAILURE) { - zval_ptr_dtor(&reflector); - _DO_THROW("Could not create reflector"); - RETURN_THROWS(); - } - - reflection_export_impl(return_value, &reflector, return_output); - - /* Destruct reflector which is no longer needed */ - zval_ptr_dtor(&reflector); -} -/* }}} */ - /* {{{ _reflection_param_get_default_param */ static parameter_reference *_reflection_param_get_default_param(INTERNAL_FUNCTION_PARAMETERS) { @@ -1408,23 +1313,6 @@ ZEND_METHOD(reflection, __clone) } /* }}} */ -/* {{{ proto public static mixed Reflection::export(Reflector r [, bool return]) - Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection, export) -{ - zval *object; - zend_bool return_output = 0; - - ZEND_PARSE_PARAMETERS_START(1, 2) - Z_PARAM_OBJECT_OF_CLASS(object, reflector_ptr) - Z_PARAM_OPTIONAL - Z_PARAM_BOOL(return_output) - ZEND_PARSE_PARAMETERS_END(); - - reflection_export_impl(return_value, object, return_output); -} -/* }}} */ - /* {{{ proto public static array Reflection::getModifierNames(int modifiers) Returns an array of modifier names */ ZEND_METHOD(reflection, getModifierNames) @@ -1463,14 +1351,6 @@ ZEND_METHOD(reflection, getModifierNames) } /* }}} */ -/* {{{ proto public static mixed ReflectionFunction::export(string name [, bool return]) - Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection_function, export) -{ - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_function_ptr, 1); -} -/* }}} */ - /* {{{ proto public void ReflectionFunction::__construct(string name) Constructor. Throws an Exception in case the given function does not exist */ ZEND_METHOD(reflection_function, __construct) @@ -2227,14 +2107,6 @@ ZEND_METHOD(reflection_generator, getExecutingGenerator) } /* }}} */ -/* {{{ proto public static mixed ReflectionParameter::export(mixed function, mixed parameter [, bool return]) throws ReflectionException - Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection_parameter, export) -{ - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_parameter_ptr, 2); -} -/* }}} */ - /* {{{ proto public void ReflectionParameter::__construct(mixed function, mixed parameter) Constructor. Throws an Exception in case the given method does not exist */ ZEND_METHOD(reflection_parameter, __construct) @@ -2986,14 +2858,6 @@ ZEND_METHOD(reflection_union_type, getTypes) } /* }}} */ -/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name [, bool return]) throws ReflectionException - Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection_method, export) -{ - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_method_ptr, 2); -} -/* }}} */ - /* {{{ proto public void ReflectionMethod::__construct(mixed class_or_method [, string name]) Constructor. Throws an Exception in case the given method does not exist */ ZEND_METHOD(reflection_method, __construct) @@ -3750,14 +3614,6 @@ ZEND_METHOD(reflection_class_constant, getDocComment) } /* }}} */ -/* {{{ proto public static mixed ReflectionClass::export(mixed argument [, bool return]) throws ReflectionException - Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection_class, export) -{ - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_class_ptr, 1); -} -/* }}} */ - /* {{{ reflection_class_object_ctor */ static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int is_object) { @@ -5254,14 +5110,6 @@ ZEND_METHOD(reflection_class, getShortName) } /* }}} */ -/* {{{ proto public static mixed ReflectionObject::export(mixed argument [, bool return]) throws ReflectionException - Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection_object, export) -{ - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_object_ptr, 1); -} -/* }}} */ - /* {{{ proto public void ReflectionObject::__construct(mixed argument) throws ReflectionException Constructor. Takes an instance as an argument */ ZEND_METHOD(reflection_object, __construct) @@ -5270,22 +5118,6 @@ ZEND_METHOD(reflection_object, __construct) } /* }}} */ -/* {{{ proto public static mixed ReflectionProperty::export(mixed class, string name [, bool return]) throws ReflectionException - Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection_property, export) -{ - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_property_ptr, 2); -} -/* }}} */ - -/* {{{ proto public static mixed ReflectionClassConstant::export(mixed class, string name [, bool return]) throws ReflectionException - Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection_class_constant, export) -{ - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_class_constant_ptr, 2); -} -/* }}} */ - /* {{{ proto public void ReflectionProperty::__construct(mixed class, string name) Constructor. Throws an Exception in case the given property does not exist */ ZEND_METHOD(reflection_property, __construct) @@ -5782,14 +5614,6 @@ ZEND_METHOD(reflection_property, getDefaultValue) } /* }}} */ -/* {{{ proto public static mixed ReflectionExtension::export(string name [, bool return]) throws ReflectionException - Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection_extension, export) -{ - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_extension_ptr, 1); -} -/* }}} */ - /* {{{ proto public void ReflectionExtension::__construct(string name) Constructor. Throws an Exception in case the given extension does not exist */ ZEND_METHOD(reflection_extension, __construct) @@ -6137,14 +5961,6 @@ ZEND_METHOD(reflection_extension, isTemporary) } /* }}} */ -/* {{{ proto public static mixed ReflectionZendExtension::export(string name [, bool return]) throws ReflectionException - * Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ -ZEND_METHOD(reflection_zend_extension, export) -{ - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_zend_extension_ptr, 1); -} -/* }}} */ - /* {{{ proto public void ReflectionZendExtension::__construct(string name) Constructor. Throws an Exception in case the given Zend extension does not exist */ ZEND_METHOD(reflection_zend_extension, __construct) @@ -6390,7 +6206,6 @@ static const zend_function_entry reflection_exception_functions[] = { static const zend_function_entry reflection_functions[] = { ZEND_ME(reflection, getModifierNames, arginfo_class_Reflection_getModifierNames, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - ZEND_DEP_ME(reflection, export, arginfo_class_Reflection_export, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_FE_END }; @@ -6432,7 +6247,6 @@ static const zend_function_entry reflection_function_abstract_functions[] = { static const zend_function_entry reflection_function_functions[] = { ZEND_ME(reflection_function, __construct, arginfo_class_ReflectionFunction___construct, 0) ZEND_ME(reflection_function, __toString, arginfo_class_ReflectionFunction___toString, 0) - ZEND_DEP_ME(reflection_function, export, arginfo_class_ReflectionFunction_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_function, isDisabled, arginfo_class_ReflectionFunction_isDisabled, 0) ZEND_ME(reflection_function, invoke, arginfo_class_ReflectionFunction_invoke, 0) ZEND_ME(reflection_function, invokeArgs, arginfo_class_ReflectionFunction_invokeArgs, 0) @@ -6452,7 +6266,6 @@ static const zend_function_entry reflection_generator_functions[] = { }; static const zend_function_entry reflection_method_functions[] = { - ZEND_DEP_ME(reflection_method, export, arginfo_class_ReflectionMethod_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_method, __construct, arginfo_class_ReflectionMethod___construct, 0) ZEND_ME(reflection_method, __toString, arginfo_class_ReflectionMethod___toString, 0) ZEND_ME(reflection_method, isPublic, arginfo_class_ReflectionMethod_isPublic, 0) @@ -6475,7 +6288,6 @@ static const zend_function_entry reflection_method_functions[] = { static const zend_function_entry reflection_class_functions[] = { ZEND_ME(reflection, __clone, arginfo_class_ReflectionClass___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_DEP_ME(reflection_class, export, arginfo_class_ReflectionClass_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_class, __construct, arginfo_class_ReflectionClass___construct, 0) ZEND_ME(reflection_class, __toString, arginfo_class_ReflectionClass___toString, 0) ZEND_ME(reflection_class, getName, arginfo_class_ReflectionClass_getName, 0) @@ -6532,14 +6344,12 @@ static const zend_function_entry reflection_class_functions[] = { }; static const zend_function_entry reflection_object_functions[] = { - ZEND_DEP_ME(reflection_object, export, arginfo_class_ReflectionObject_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_object, __construct, arginfo_class_ReflectionObject___construct, 0) PHP_FE_END }; static const zend_function_entry reflection_property_functions[] = { ZEND_ME(reflection, __clone, arginfo_class_ReflectionProperty___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_DEP_ME(reflection_property, export, arginfo_class_ReflectionProperty_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_property, __construct, arginfo_class_ReflectionProperty___construct, 0) ZEND_ME(reflection_property, __toString, arginfo_class_ReflectionProperty___toString, 0) ZEND_ME(reflection_property, getName, arginfo_class_ReflectionProperty_getName, 0) @@ -6564,7 +6374,6 @@ static const zend_function_entry reflection_property_functions[] = { static const zend_function_entry reflection_class_constant_functions[] = { ZEND_ME(reflection, __clone, arginfo_class_ReflectionClassConstant___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_DEP_ME(reflection_class_constant, export, arginfo_class_ReflectionClassConstant_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_class_constant, __construct, arginfo_class_ReflectionClassConstant___construct, 0) ZEND_ME(reflection_class_constant, __toString, arginfo_class_ReflectionClassConstant___toString, 0) ZEND_ME(reflection_class_constant, getName, arginfo_class_ReflectionClassConstant_getName, 0) @@ -6580,7 +6389,6 @@ static const zend_function_entry reflection_class_constant_functions[] = { static const zend_function_entry reflection_parameter_functions[] = { ZEND_ME(reflection, __clone, arginfo_class_ReflectionParameter___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_DEP_ME(reflection_parameter, export, arginfo_class_ReflectionParameter_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_parameter, __construct, arginfo_class_ReflectionParameter___construct, 0) ZEND_ME(reflection_parameter, __toString, arginfo_class_ReflectionParameter___toString, 0) ZEND_ME(reflection_parameter, getName, arginfo_class_ReflectionParameter_getName, 0) @@ -6624,7 +6432,6 @@ static const zend_function_entry reflection_union_type_functions[] = { static const zend_function_entry reflection_extension_functions[] = { ZEND_ME(reflection, __clone, arginfo_class_ReflectionExtension___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_DEP_ME(reflection_extension, export, arginfo_class_ReflectionExtension_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_extension, __construct, arginfo_class_ReflectionExtension___construct, 0) ZEND_ME(reflection_extension, __toString, arginfo_class_ReflectionExtension___toString, 0) ZEND_ME(reflection_extension, getName, arginfo_class_ReflectionExtension_getName, 0) @@ -6643,7 +6450,6 @@ static const zend_function_entry reflection_extension_functions[] = { static const zend_function_entry reflection_zend_extension_functions[] = { ZEND_ME(reflection, __clone, arginfo_class_ReflectionZendExtension___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_DEP_ME(reflection_zend_extension, export, arginfo_class_ReflectionZendExtension_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_zend_extension, __construct, arginfo_class_ReflectionZendExtension___construct, 0) ZEND_ME(reflection_zend_extension, __toString, arginfo_class_ReflectionZendExtension___toString, 0) ZEND_ME(reflection_zend_extension, getName, arginfo_class_ReflectionZendExtension_getName, 0) diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index 76cbe75dd7222..dc6b7014737e1 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -8,8 +8,6 @@ class Reflection { /** @return string[] */ public static function getModifierNames(int $modifiers) {} - - public static function export(Reflector $reflector, bool $return = false) {} } interface Reflector @@ -106,8 +104,6 @@ public function __construct($name) {} /** @return string */ public function __toString() {} - public static function export($name, bool $return = false) {} - /** @return bool */ public function isDisabled() {} @@ -150,8 +146,6 @@ public function __construct($class_or_method, string $name = UNKNOWN) {} /** @return string */ public function __toString() {} - public static function export($class, $name, bool $return = false) {} - /** @return bool */ public function isPublic() {} @@ -200,8 +194,6 @@ class ReflectionClass implements Reflector { final private function __clone() {} - public static function export($argument, bool $return = false) {} - /** @param object|string $argument */ public function __construct($argument) {} @@ -366,16 +358,12 @@ public function getShortName() {} class ReflectionObject extends ReflectionClass { public function __construct(object $argument) {} - - public static function export($argument, bool $return = false) {} } class ReflectionProperty implements Reflector { final private function __clone() {} - public static function export($class, $name, bool $return = false) {} - /** @param string|object $class */ public function __construct($class, string $name) {} @@ -436,8 +424,6 @@ class ReflectionClassConstant implements Reflector { final private function __clone() {} - public static function export($class, $name, bool $return = false) {} - /** @return string|object */ public function __construct($class, string $name) {} @@ -472,8 +458,6 @@ class ReflectionParameter implements Reflector { final private function __clone() {} - public static function export($function, $parameter, bool $return = false) {} - /** * @param string|array|object * @param int|string @@ -566,8 +550,6 @@ class ReflectionExtension implements Reflector { final private function __clone() {} - public static function export($name, bool $return = false) {} - public function __construct(string $name) {} /** @return string */ @@ -611,8 +593,6 @@ class ReflectionZendExtension implements Reflector { final private function __clone() {} - public static function export($name, bool $return = false) {} - public function __construct(string $name) {} /** @return string */ diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 35ee71373224d..5f5079f59edf2 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -4,11 +4,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_export, 0, 0, 1) - ZEND_ARG_OBJ_INFO(0, reflector, Reflector, 0) - ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) -ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflector___toString, 0, 0, 0) ZEND_END_ARG_INFO() @@ -70,11 +65,6 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionFunction___toString arginfo_class_Reflector___toString -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionFunction_export, 0, 0, 1) - ZEND_ARG_INFO(0, name) - ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) -ZEND_END_ARG_INFO() - #define arginfo_class_ReflectionFunction_isDisabled arginfo_class_Reflector___toString ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionFunction_invoke, 0, 0, 0) @@ -112,12 +102,6 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionMethod___toString arginfo_class_Reflector___toString -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_export, 0, 0, 2) - ZEND_ARG_INFO(0, class) - ZEND_ARG_INFO(0, name) - ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) -ZEND_END_ARG_INFO() - #define arginfo_class_ReflectionMethod_isPublic arginfo_class_Reflector___toString #define arginfo_class_ReflectionMethod_isPrivate arginfo_class_Reflector___toString @@ -160,11 +144,6 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass___clone arginfo_class_Reflector___toString -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_export, 0, 0, 1) - ZEND_ARG_INFO(0, argument) - ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) -ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass___construct, 0, 0, 1) ZEND_ARG_INFO(0, argument) ZEND_END_ARG_INFO() @@ -293,12 +272,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionObject___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, argument, IS_OBJECT, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionObject_export arginfo_class_ReflectionClass_export - #define arginfo_class_ReflectionProperty___clone arginfo_class_Reflector___toString -#define arginfo_class_ReflectionProperty_export arginfo_class_ReflectionMethod_export - ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionProperty___construct, 0, 0, 2) ZEND_ARG_INFO(0, class) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) @@ -348,8 +323,6 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClassConstant___clone arginfo_class_Reflector___toString -#define arginfo_class_ReflectionClassConstant_export arginfo_class_ReflectionMethod_export - #define arginfo_class_ReflectionClassConstant___construct arginfo_class_ReflectionProperty___construct #define arginfo_class_ReflectionClassConstant___toString arginfo_class_Reflector___toString @@ -372,12 +345,6 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionParameter___clone arginfo_class_Reflector___toString -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionParameter_export, 0, 0, 2) - ZEND_ARG_INFO(0, function) - ZEND_ARG_INFO(0, parameter) - ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) -ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionParameter___construct, 0, 0, 2) ZEND_ARG_INFO(0, function) ZEND_ARG_INFO(0, parameter) @@ -436,8 +403,6 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionExtension___clone arginfo_class_Reflector___toString -#define arginfo_class_ReflectionExtension_export arginfo_class_ReflectionFunction_export - #define arginfo_class_ReflectionExtension___construct arginfo_class_ReflectionClass_hasMethod #define arginfo_class_ReflectionExtension___toString arginfo_class_Reflector___toString @@ -466,8 +431,6 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionZendExtension___clone arginfo_class_Reflector___toString -#define arginfo_class_ReflectionZendExtension_export arginfo_class_ReflectionFunction_export - #define arginfo_class_ReflectionZendExtension___construct arginfo_class_ReflectionClass_hasMethod #define arginfo_class_ReflectionZendExtension___toString arginfo_class_Reflector___toString diff --git a/ext/reflection/tests/001.phpt b/ext/reflection/tests/001.phpt index d4760136532ab..7812679ba7599 100644 --- a/ext/reflection/tests/001.phpt +++ b/ext/reflection/tests/001.phpt @@ -22,7 +22,6 @@ $r = new ReflectionClassEx('ReflectionClassEx'); $exp = array ( 'UMLClass::__clone', - 'UMLClass::export', 'UMLClass::__construct', 'UMLClass::__toString', 'UMLClass::getName', diff --git a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt index 181360d733e91..414fac8543d5d 100644 --- a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt +++ b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test usage of ReflectionClassConstant methods __toString(), export(), getName(), getValue(), isPublic(), isPrivate(), isProtected(), getModifiers(), getDeclaringClass() and getDocComment(). +Test usage of ReflectionClassConstant methods __toString(), getName(), getValue(), isPublic(), isPrivate(), isProtected(), getModifiers(), getDeclaringClass() and getDocComment(). --FILE-- __toString()); - echo "export():\n"; - var_dump(ReflectionClassConstant::export($base, $constant, true)); - echo "export():\n"; - var_dump(ReflectionClassConstant::export($base, $constant, false)); echo "getName():\n"; var_dump($constInfo->getName()); echo "getValue():\n"; @@ -55,17 +51,6 @@ Reflecting on class constant TestClass::PUB __toString(): string(35) "Constant [ public bool PUB ] { 1 } " -export(): - -Deprecated: Function ReflectionClassConstant::export() is deprecated in %s on line %d -string(35) "Constant [ public bool PUB ] { 1 } -" -export(): - -Deprecated: Function ReflectionClassConstant::export() is deprecated in %s on line %d -Constant [ public bool PUB ] { 1 } - -NULL getName(): string(3) "PUB" getValue(): @@ -93,17 +78,6 @@ Reflecting on class constant TestClass::PROT __toString(): string(38) "Constant [ protected int PROT ] { 4 } " -export(): - -Deprecated: Function ReflectionClassConstant::export() is deprecated in %s on line %d -string(38) "Constant [ protected int PROT ] { 4 } -" -export(): - -Deprecated: Function ReflectionClassConstant::export() is deprecated in %s on line %d -Constant [ protected int PROT ] { 4 } - -NULL getName(): string(4) "PROT" getValue(): @@ -131,17 +105,6 @@ Reflecting on class constant TestClass::PRIV __toString(): string(45) "Constant [ private string PRIV ] { keepOut } " -export(): - -Deprecated: Function ReflectionClassConstant::export() is deprecated in %s on line %d -string(45) "Constant [ private string PRIV ] { keepOut } -" -export(): - -Deprecated: Function ReflectionClassConstant::export() is deprecated in %s on line %d -Constant [ private string PRIV ] { keepOut } - -NULL getName(): string(4) "PRIV" getValue(): @@ -169,17 +132,6 @@ Reflecting on class constant TestClass::PRIV __toString(): string(45) "Constant [ private string PRIV ] { keepOut } " -export(): - -Deprecated: Function ReflectionClassConstant::export() is deprecated in %s on line %d -string(45) "Constant [ private string PRIV ] { keepOut } -" -export(): - -Deprecated: Function ReflectionClassConstant::export() is deprecated in %s on line %d -Constant [ private string PRIV ] { keepOut } - -NULL getName(): string(4) "PRIV" getValue(): diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt index a70e09fa68e12..0aa46652b7b70 100644 --- a/ext/reflection/tests/ReflectionClass_toString_001.phpt +++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt @@ -20,14 +20,7 @@ Class [ class ReflectionClass implements Reflector ] { - Static properties [0] { } - - Static methods [1] { - Method [ static public method export ] { - - - Parameters [2] { - Parameter #0 [ $argument ] - Parameter #1 [ bool $return ] - } - } + - Static methods [0] { } - Properties [1] { diff --git a/ext/reflection/tests/ReflectionExtension_export_basic.phpt b/ext/reflection/tests/ReflectionExtension_export_basic.phpt deleted file mode 100644 index 42972f15745da..0000000000000 --- a/ext/reflection/tests/ReflectionExtension_export_basic.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -ReflectionExtension::export() ---CREDITS-- -Gerrit "Remi" te Sligte -Leon Luijkx ---FILE-- - ---EXPECTF-- -Deprecated: Function ReflectionExtension::export() is deprecated in %s on line %d -bool(false) diff --git a/ext/reflection/tests/ReflectionMethod_basic2.phpt b/ext/reflection/tests/ReflectionMethod_basic2.phpt index 46abc6b816877..f7d4b9f4d6e9a 100644 --- a/ext/reflection/tests/ReflectionMethod_basic2.phpt +++ b/ext/reflection/tests/ReflectionMethod_basic2.phpt @@ -1,5 +1,5 @@ --TEST-- -ReflectionMethod class __toString() and export() methods +ReflectionMethod class __toString() method --FILE-- __toString()); - echo "\nexport():\n"; - var_dump(ReflectionMethod::export($class, $method, true)); echo "\n**********************************\n"; } @@ -55,15 +53,7 @@ Reflecting on method DerivedClass::foo() __toString(): string(%d) "Method [ public method foo ] { - @@ %s 16 - 18 -} -" - -export(): - -Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d -string(%d) "Method [ public method foo ] { - @@ %s 16 - 18 + @@ %s 14 - 16 } " @@ -73,15 +63,7 @@ Reflecting on method TestClass::stat() __toString(): string(%d) "Method [ static public method stat ] { - @@ %s 20 - 22 -} -" - -export(): - -Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d -string(%d) "Method [ static public method stat ] { - @@ %s 20 - 22 + @@ %s 18 - 20 } " @@ -91,15 +73,7 @@ Reflecting on method TestClass::priv() __toString(): string(%d) "Method [ private method priv ] { - @@ %s 24 - 26 -} -" - -export(): - -Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d -string(%d) "Method [ private method priv ] { - @@ %s 24 - 26 + @@ %s 22 - 24 } " @@ -109,15 +83,7 @@ Reflecting on method TestClass::prot() __toString(): string(%d) "Method [ protected method prot ] { - @@ %s 28 - 28 -} -" - -export(): - -Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d -string(%d) "Method [ protected method prot ] { - @@ %s 28 - 28 + @@ %s 26 - 26 } " @@ -127,15 +93,7 @@ Reflecting on method DerivedClass::prot() __toString(): string(%d) "Method [ protected method prot ] { - @@ %s 28 - 28 -} -" - -export(): - -Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d -string(%d) "Method [ protected method prot ] { - @@ %s 28 - 28 + @@ %s 26 - 26 } " @@ -145,15 +103,7 @@ Reflecting on method TestInterface::int() __toString(): string(%d) "Method [ abstract public method int ] { - @@ %s 36 - 36 -} -" - -export(): - -Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d -string(%d) "Method [ abstract public method int ] { - @@ %s 36 - 36 + @@ %s 34 - 34 } " @@ -171,33 +121,13 @@ string(%d) "Method [ public method __construct ] { } " -export(): - -Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d -string(%d) "Method [ public method __construct ] { - - - Parameters [2] { - Parameter #0 [ $class ] - Parameter #1 [ string $name ] - } -} -" - ********************************** ********************************** Reflecting on method TestClass::__destruct() __toString(): string(%d) "Method [ public method __destruct ] { - @@ %s 30 - 30 -} -" - -export(): - -Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d -string(%d) "Method [ public method __destruct ] { - @@ %s 30 - 30 + @@ %s 28 - 28 } " diff --git a/ext/reflection/tests/ReflectionParameter_export_error2.phpt b/ext/reflection/tests/ReflectionParameter_export_error2.phpt deleted file mode 100644 index 3def577e064e4..0000000000000 --- a/ext/reflection/tests/ReflectionParameter_export_error2.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -ReflectionParameter::export() with incorrect first parameter ---CREDITS-- -Stefan Koopmanschap ---FILE-- -getParameters(); -try { - foreach($params as $key => $value) { - ReflectionParameter::export($reflect, $key); - } -} -catch (ReflectionException $e) { - echo $e->getMessage() . "\n"; -} -try { - foreach($params as $key => $value) { - ReflectionParameter::export(42, $key); - } -} -catch (ReflectionException $e) { - echo $e->getMessage() . "\n"; -} -?> ---EXPECTF-- -Deprecated: Function ReflectionParameter::export() is deprecated in %s on line %d -Method ReflectionFunction::__invoke() does not exist - -Deprecated: Function ReflectionParameter::export() is deprecated in %s on line %d -The parameter class is expected to be either a string, an array(class, method) or a callable object diff --git a/ext/reflection/tests/ReflectionParameter_export_error3.phpt b/ext/reflection/tests/ReflectionParameter_export_error3.phpt deleted file mode 100644 index 822fca00329e3..0000000000000 --- a/ext/reflection/tests/ReflectionParameter_export_error3.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -ReflectionParameter::export() with incorrect second parameter ---CREDITS-- -Stefan Koopmanschap ---FILE-- -getParameters(); -foreach($params as $key => $value) { - ReflectionParameter::export('ReflectionParameterTest', 'incorrect_parameter'); -} ---EXPECTF-- -Deprecated: Function ReflectionParameter::export() is deprecated in %s on line %d - -Fatal error: Uncaught ReflectionException: The parameter specified by its name could not be found in %s:%d -Stack trace: -#0 [internal function]: ReflectionParameter->__construct('ReflectionParam...', 'incorrect_param...') -#1 %s(%d): ReflectionParameter::export('ReflectionParam...', 'incorrect_param...') -#2 {main} - thrown in %s on line %d diff --git a/ext/reflection/tests/ReflectionProperty_basic1.phpt b/ext/reflection/tests/ReflectionProperty_basic1.phpt index 1748ebfca90be..9bdf98b6e05ca 100644 --- a/ext/reflection/tests/ReflectionProperty_basic1.phpt +++ b/ext/reflection/tests/ReflectionProperty_basic1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test usage of ReflectionProperty methods __toString(), export(), getName(), isPublic(), isPrivate(), isProtected(), isStatic(), getValue() and setValue(). +Test usage of ReflectionProperty methods __toString(), getName(), isPublic(), isPrivate(), isProtected(), isStatic(), getValue() and setValue(). --FILE-- __toString()); - echo "export():\n"; - var_dump(ReflectionProperty::export($class, $property, true)); - echo "export():\n"; - var_dump(ReflectionProperty::export($class, $property, false)); echo "getName():\n"; var_dump($propInfo->getName()); echo "isPublic():\n"; @@ -54,17 +50,6 @@ Reflecting on property TestClass::pub __toString(): string(35) "Property [ public $pub ] " -export(): - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -string(35) "Property [ public $pub ] -" -export(): - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -Property [ public $pub ] - -NULL getName(): string(3) "pub" isPublic(): @@ -87,17 +72,6 @@ Reflecting on property TestClass::stat __toString(): string(33) "Property [ public static $stat ] " -export(): - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -string(33) "Property [ public static $stat ] -" -export(): - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -Property [ public static $stat ] - -NULL getName(): string(4) "stat" isPublic(): @@ -120,17 +94,6 @@ Reflecting on property TestClass::prot __toString(): string(39) "Property [ protected $prot ] " -export(): - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -string(39) "Property [ protected $prot ] -" -export(): - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -Property [ protected $prot ] - -NULL getName(): string(4) "prot" isPublic(): @@ -149,17 +112,6 @@ Reflecting on property TestClass::priv __toString(): string(37) "Property [ private $priv ] " -export(): - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -string(37) "Property [ private $priv ] -" -export(): - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -Property [ private $priv ] - -NULL getName(): string(4) "priv" isPublic(): diff --git a/ext/reflection/tests/ReflectionProperty_export_basic.phpt b/ext/reflection/tests/ReflectionProperty_export_basic.phpt deleted file mode 100644 index 28f1f6b988f96..0000000000000 --- a/ext/reflection/tests/ReflectionProperty_export_basic.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -Test ReflectionProperty::__toString() usage. ---FILE-- - ---EXPECT-- -Property [ public $proper ] diff --git a/ext/reflection/tests/ReflectionProperty_export_error.phpt b/ext/reflection/tests/ReflectionProperty_export_error.phpt deleted file mode 100644 index 446fedf0a3486..0000000000000 --- a/ext/reflection/tests/ReflectionProperty_export_error.phpt +++ /dev/null @@ -1,50 +0,0 @@ ---TEST-- -Test ReflectionProperty::export() errors. ---FILE-- -getMessage(); -} - -echo "\n\nWrong property parameter type:\n"; -try { - ReflectionProperty::export($a, 'TestClass', false); -} -catch(ReflectionException $e) { - echo $e->getMessage(); -} - -echo "\n\nNon-existent property:\n"; -try { - ReflectionProperty::export('TestClass', "nonExistentProperty", true); -} -catch(Exception $e) { - echo $e->getMessage(); -} - -?> ---EXPECTF-- -Non-existent class: - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -Class NonExistentClass does not exist - -Wrong property parameter type: - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -The parameter class is expected to be either a string or an object - -Non-existent property: - -Deprecated: Function ReflectionProperty::export() is deprecated in %s on line %d -Property TestClass::$nonExistentProperty does not exist diff --git a/ext/reflection/tests/ReflectionZendExtension.phpt b/ext/reflection/tests/ReflectionZendExtension.phpt index bce34f5a2c0dc..0c5a8e6121089 100644 --- a/ext/reflection/tests/ReflectionZendExtension.phpt +++ b/ext/reflection/tests/ReflectionZendExtension.phpt @@ -12,7 +12,6 @@ var_dump($reflection->getCopyright()); var_dump($reflection->getName()); var_dump($reflection->getURL()); var_dump($reflection->getVersion() === PHP_VERSION); -var_dump(gettype($reflection->export('Zend OPcache', true)) === 'string'); ?> --EXPECTF-- string(17) "Zend Technologies" @@ -20,6 +19,3 @@ string(13) "Copyright (c)" string(12) "Zend OPcache" string(20) "http://www.zend.com/" bool(true) - -Deprecated: Function ReflectionZendExtension::export() is deprecated in %s on line %d -bool(true) diff --git a/ext/reflection/tests/bug46205.phpt b/ext/reflection/tests/bug46205.phpt deleted file mode 100644 index 78e381370e303..0000000000000 --- a/ext/reflection/tests/bug46205.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Bug #46205 (Closure - Memory leaks when ReflectionException is thrown) ---FILE-- -invokeArgs(new reflectionparameter('trim', 'str'), array($y, 1)); -} catch (Exception $e) { } -?> -ok ---EXPECTF-- -Deprecated: Function ReflectionParameter::export() is deprecated in %s on line %d -ok diff --git a/ext/simplexml/tests/bug37565.phpt b/ext/simplexml/tests/bug37565.phpt deleted file mode 100644 index 38e475a744316..0000000000000 --- a/ext/simplexml/tests/bug37565.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Bug #37565 (Using reflection::export with simplexml causing a crash) ---SKIPIF-- - ---FILE-- -', 'Setting')); -} catch (Error $e) { - my_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); -} - -try { - Reflection::export(simplexml_load_file('data:,', 'Setting')); -} catch (Error $e) { - my_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); -} - -?> ---EXPECT-- -Error: simplexml_load_string() expects argument #2 ($class_name) to be a class name derived from SimpleXMLElement, 'Setting' given -Error: simplexml_load_file() expects argument #2 ($class_name) to be a class name derived from SimpleXMLElement, 'Setting' given From fb57ae9084a98ac5f06cd7b2d10205489b537e20 Mon Sep 17 00:00:00 2001 From: Bishop Bettini Date: Wed, 19 Feb 2020 11:30:32 -0500 Subject: [PATCH 054/201] Improve comment on RFC 1867 filename handling It was pointed out on the internals ML[1] that the basename comment around RFC 1867 file handling was confusing. The comment seemed to say that the basename handling was only necessary because of some esoteric bug in Windows IE. In fact that comment applied to earlier versions of the code and was, therefore, misleading. The comment needs to clear that basename is required per RFC 7578[2]. [1]:https://externals.io/message/108624 [2]:https://tools.ietf.org/html/rfc7578 --- main/rfc1867.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main/rfc1867.c b/main/rfc1867.c index ba734c9646184..4dfa6abcc74b6 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -1136,11 +1136,11 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ snprintf(lbuf, llen, "%s_name", param); } - /* The \ check should technically be needed for win32 systems only where - * it is a valid path separator. However, IE in all it's wisdom always sends - * the full path of the file on the user's filesystem, which means that unless - * the user does basename() they get a bogus file name. Until IE's user base drops - * to nill or problem is fixed this code must remain enabled for all systems. */ + /* Pursuant to RFC 7578, strip any path components in the + * user-supplied file name: + * > If a "filename" parameter is supplied ... do not use + * > directory path information that may be present." + */ s = _basename(internal_encoding, filename); if (!s) { s = filename; From c231bbb852ea0f87830890047e1801edae9dea5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 19 Feb 2020 20:36:45 +0100 Subject: [PATCH 055/201] Remove restore_include_path() Closes GH-5189 --- ext/standard/basic_functions.c | 15 ------------- ext/standard/basic_functions.h | 1 - ext/standard/basic_functions.stub.php | 2 -- ext/standard/basic_functions_arginfo.h | 2 -- .../tests/general_functions/include_path.phpt | 22 +++++-------------- 5 files changed, 5 insertions(+), 37 deletions(-) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index b7d2f4618b7e6..bf07aef503db7 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -434,7 +434,6 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(ini_restore, arginfo_ini_restore) PHP_FE(get_include_path, arginfo_get_include_path) PHP_FE(set_include_path, arginfo_set_include_path) - PHP_DEP_FE(restore_include_path, arginfo_restore_include_path) PHP_FE(setcookie, arginfo_setcookie) PHP_FE(setrawcookie, arginfo_setrawcookie) @@ -2978,20 +2977,6 @@ PHP_FUNCTION(get_include_path) } /* }}} */ -/* {{{ proto void restore_include_path() - Restore the value of the include_path configuration option */ -PHP_FUNCTION(restore_include_path) -{ - zend_string *key; - - ZEND_PARSE_PARAMETERS_NONE(); - - key = zend_string_init("include_path", sizeof("include_path")-1, 0); - zend_restore_ini_entry(key, PHP_INI_STAGE_RUNTIME); - zend_string_efree(key); -} -/* }}} */ - /* {{{ proto mixed print_r(mixed var [, bool return]) Prints out or returns information about the specified variable */ PHP_FUNCTION(print_r) diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index a010db88f680b..1366998983da1 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -94,7 +94,6 @@ PHP_FUNCTION(ini_set); PHP_FUNCTION(ini_restore); PHP_FUNCTION(get_include_path); PHP_FUNCTION(set_include_path); -PHP_FUNCTION(restore_include_path); PHP_FUNCTION(print_r); PHP_FUNCTION(fprintf); diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 3d19f2137b48d..baebfdd9f00e1 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -336,8 +336,6 @@ function set_include_path(string $include_path): string|false {} function get_include_path(): string|false {} -function restore_include_path(): void {} - /** @param mixed $var */ function print_r($var, bool $return = false): string|bool {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index b5af02829d746..964f412d7ebcd 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -508,8 +508,6 @@ ZEND_END_ARG_INFO() #define arginfo_get_include_path arginfo_ob_get_flush -#define arginfo_restore_include_path arginfo_flush - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_print_r, 0, 1, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_INFO(0, var) ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) diff --git a/ext/standard/tests/general_functions/include_path.phpt b/ext/standard/tests/general_functions/include_path.phpt index ffadbc280c8f1..56327500eaad7 100644 --- a/ext/standard/tests/general_functions/include_path.phpt +++ b/ext/standard/tests/general_functions/include_path.phpt @@ -6,58 +6,46 @@ include_path=. --EXPECTF-- string(1) "." - -Deprecated: Function restore_include_path() is deprecated in %s on line %d NULL string(1) "." string(3) "var" - -Deprecated: Function restore_include_path() is deprecated in %s on line %d NULL string(1) "." string(1) "." string(14) ".:/path/to/dir" - -Deprecated: Function restore_include_path() is deprecated in %s on line %d NULL string(1) "." bool(false) string(1) "." - -Deprecated: Function restore_include_path() is deprecated in %s on line %d NULL string(1) "." - -Deprecated: Function restore_include_path() is deprecated in %s on line %d NULL string(1) "." Done From ab5b6702d7115ca9d508b2f13c9cd59b0f2cfd39 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 20 Feb 2020 10:55:17 +0100 Subject: [PATCH 056/201] Fix NEWS [ci skip] Cosmetics. --- NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a593f1eb46690..4d154b2be9310 100644 --- a/NEWS +++ b/NEWS @@ -29,7 +29,7 @@ PHP NEWS - Core: . Fixed bug #71876 (Memory corruption htmlspecialchars(): charset `*' not supported). (Nikita) - . Fixed bug ##79146 (cscript can fail to run on some systems). (clarodeus) + . Fixed bug #79146 (cscript can fail to run on some systems). (clarodeus) . Fixed bug #78323 (Code 0 is returned on invalid options). (Ivan Mikheykin) . Fixed bug #76047 (Use-after-free when accessing already destructed backtrace arguments). (Nikita) @@ -38,7 +38,7 @@ PHP NEWS . Fixed bug #79078 (Hypothetical use-after-free in curl_multi_add_handle()). (cmb) - -Intl: +- Intl: . Fixed bug #79212 (NumberFormatter::format() may detect wrong type). (cmb) - Libxml: From f031735489ffbc834f5abb35496871504f7a80f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 20 Feb 2020 11:13:20 +0100 Subject: [PATCH 057/201] Update UPGRADING [skip ci] --- UPGRADING | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UPGRADING b/UPGRADING index 417119e074c2a..9275d20df9877 100644 --- a/UPGRADING +++ b/UPGRADING @@ -285,6 +285,7 @@ PHP 8.0 UPGRADE NOTES representation of the type, and is no longer deprecated. In particular the result will include a nullability indicator for nullable types. The format of the return value is not stable and may change between PHP versions. + . Reflection export() methods have been removed. - Socket: . The deprecated AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES @@ -328,6 +329,7 @@ PHP 8.0 UPGRADE NOTES . convert_cyr_string() has been removed. . money_format() has been removed. . ezmlm_hash() has been removed. + . restore_include_path() has been removed. . get_magic_quotes_gpc() and get_magic_quotes_gpc_runtime() has been removed. . FILTER_SANITIZE_MAGIC_QUOTES has been removed. . Calling implode() with parameters in a reverse order ($pieces, $glue) is no From ac51a5f02aeb160ef79e0acd6c65b8029ed8c0d3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 21 Feb 2020 09:53:17 +0100 Subject: [PATCH 058/201] Make SPL doubly linked list smaller Store rc in data u2. This drops element size from 40 to 32 bytes. --- ext/spl/spl_dllist.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index bed5f6a336b67..17c7eca6655cc 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -37,16 +37,18 @@ PHPAPI zend_class_entry *spl_ce_SplDoublyLinkedList; PHPAPI zend_class_entry *spl_ce_SplQueue; PHPAPI zend_class_entry *spl_ce_SplStack; -#define SPL_LLIST_DELREF(elem) if(!--(elem)->rc) { \ +#define SPL_LLIST_RC(elem) Z_EXTRA((elem)->data) + +#define SPL_LLIST_DELREF(elem) if (!--SPL_LLIST_RC(elem)) { \ efree(elem); \ } -#define SPL_LLIST_CHECK_DELREF(elem) if((elem) && !--(elem)->rc) { \ +#define SPL_LLIST_CHECK_DELREF(elem) if ((elem) && !--SPL_LLIST_RC(elem)) { \ efree(elem); \ } -#define SPL_LLIST_ADDREF(elem) (elem)->rc++ -#define SPL_LLIST_CHECK_ADDREF(elem) if(elem) (elem)->rc++ +#define SPL_LLIST_ADDREF(elem) SPL_LLIST_RC(elem)++ +#define SPL_LLIST_CHECK_ADDREF(elem) if (elem) SPL_LLIST_RC(elem)++ #define SPL_DLLIST_IT_DELETE 0x00000001 /* Delete flag makes the iterator delete the current element on next */ #define SPL_DLLIST_IT_LIFO 0x00000002 /* LIFO flag makes the iterator traverse the structure as a LastInFirstOut */ @@ -60,7 +62,6 @@ PHPAPI zend_class_entry *spl_ce_SplStack; typedef struct _spl_ptr_llist_element { struct _spl_ptr_llist_element *prev; struct _spl_ptr_llist_element *next; - int rc; zval data; } spl_ptr_llist_element; @@ -192,10 +193,10 @@ static void spl_ptr_llist_unshift(spl_ptr_llist *llist, zval *data) /* {{{ */ { spl_ptr_llist_element *elem = emalloc(sizeof(spl_ptr_llist_element)); - elem->rc = 1; elem->prev = NULL; elem->next = llist->head; ZVAL_COPY_VALUE(&elem->data, data); + SPL_LLIST_RC(elem) = 1; if (llist->head) { llist->head->prev = elem; @@ -216,10 +217,10 @@ static void spl_ptr_llist_push(spl_ptr_llist *llist, zval *data) /* {{{ */ { spl_ptr_llist_element *elem = emalloc(sizeof(spl_ptr_llist_element)); - elem->rc = 1; elem->prev = llist->tail; elem->next = NULL; ZVAL_COPY_VALUE(&elem->data, data); + SPL_LLIST_RC(elem) = 1; if (llist->tail) { llist->tail->next = elem; @@ -1311,7 +1312,7 @@ SPL_METHOD(SplDoublyLinkedList, add) element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); ZVAL_COPY_VALUE(&elem->data, value); - elem->rc = 1; + SPL_LLIST_RC(elem) = 1; /* connect to the neighbours */ elem->next = element; elem->prev = element->prev; From 2b50d905dfaf6304e95b994d9469411eb060b256 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 20 Feb 2020 15:05:04 +0100 Subject: [PATCH 059/201] Update Ubuntu version on Azure The i386 and community jobs were still on 16.04, update them to 18.04. --- azure/community_job.yml | 2 +- azure/i386/apt.yml | 2 +- azure/i386/job.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure/community_job.yml b/azure/community_job.yml index f8529826a9565..dc17e10ec5523 100644 --- a/azure/community_job.yml +++ b/azure/community_job.yml @@ -16,7 +16,7 @@ jobs: - job: ${{ parameters.configurationName }} timeoutInMinutes: ${{ parameters.timeoutInMinutes }} pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' variables: ubsan_options: 'print_stacktrace=1' steps: diff --git a/azure/i386/apt.yml b/azure/i386/apt.yml index 07489c976c529..9342df35e40ea 100644 --- a/azure/i386/apt.yml +++ b/azure/i386/apt.yml @@ -13,7 +13,7 @@ steps: locales \ language-pack-de \ libglib2.0-dev:i386 \ - openssl:i386 \ + libssl-dev:i386 \ zlib1g-dev:i386 \ libxml2-dev:i386 \ libgmp-dev:i386 \ diff --git a/azure/i386/job.yml b/azure/i386/job.yml index f1508b86332b2..0806a246e987b 100644 --- a/azure/i386/job.yml +++ b/azure/i386/job.yml @@ -5,7 +5,7 @@ parameters: jobs: - job: ${{ parameters.configurationName }} pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: - template: apt.yml - script: | From ad000a63e8a1b6aacbff5d7bd806abfe388c18eb Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 21 Feb 2020 10:30:51 +0100 Subject: [PATCH 060/201] Add test for bug #78569 --- .../tests/general_functions/bug78569.phpt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ext/standard/tests/general_functions/bug78569.phpt diff --git a/ext/standard/tests/general_functions/bug78569.phpt b/ext/standard/tests/general_functions/bug78569.phpt new file mode 100644 index 0000000000000..70d8a995a2aa6 --- /dev/null +++ b/ext/standard/tests/general_functions/bug78569.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #78569 (proc_open() may require extra quoting) +--SKIPIF-- + +--XFAIL-- +Before PHP 8.0.0 we would need to add extra quotes. +--FILE-- +&1', __FILE__); +$proc = proc_open($cmd, $descriptorspec, $pipes); +fpassthru($pipes[1]); +proc_close($proc); +?> +--EXPECT-- +// FIND ME From 5a5680c25b3e6d758cc25268c89e0ceb04147ad7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 29 Sep 2019 11:33:45 +0200 Subject: [PATCH 061/201] Don't use asm arithmetic under msan Clang 9 supports asm goto, so these no longer get automatically skipped. (cherry picked from commit 33bf1495b215d555d45ec638376bd434d8a038b3) --- Zend/zend_operators.h | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index c5f4ae84a8024..dad23bc4d8c83 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -500,9 +500,15 @@ ZEND_API void zend_update_current_locale(void); #define ZVAL_OFFSETOF_TYPE \ (offsetof(zval, u1.type_info) - offsetof(zval, value)) +#if defined(HAVE_ASM_GOTO) && !__has_feature(memory_sanitizer) +# define ZEND_USE_ASM_ARITHMETIC 1 +#else +# define ZEND_USE_ASM_ARITHMETIC 0 +#endif + static zend_always_inline void fast_long_increment_function(zval *op1) { -#if defined(HAVE_ASM_GOTO) && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) +#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) __asm__ goto( "addl $1,(%0)\n\t" "jo %l1\n" @@ -513,7 +519,7 @@ static zend_always_inline void fast_long_increment_function(zval *op1) return; overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(op1, (double)ZEND_LONG_MAX + 1.0); -#elif defined(HAVE_ASM_GOTO) && defined(__x86_64__) +#elif ZEND_USE_ASM_ARITHMETIC && defined(__x86_64__) __asm__ goto( "addq $1,(%0)\n\t" "jo %l1\n" @@ -524,7 +530,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL return; overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(op1, (double)ZEND_LONG_MAX + 1.0); -#elif defined(HAVE_ASM_GOTO) && defined(__aarch64__) +#elif ZEND_USE_ASM_ARITHMETIC && defined(__aarch64__) __asm__ goto ( "ldr x5, [%0]\n\t" "adds x5, x5, 1\n\t" @@ -565,7 +571,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL static zend_always_inline void fast_long_decrement_function(zval *op1) { -#if defined(HAVE_ASM_GOTO) && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) +#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) __asm__ goto( "subl $1,(%0)\n\t" "jo %l1\n" @@ -576,7 +582,7 @@ static zend_always_inline void fast_long_decrement_function(zval *op1) return; overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(op1, (double)ZEND_LONG_MIN - 1.0); -#elif defined(HAVE_ASM_GOTO) && defined(__x86_64__) +#elif ZEND_USE_ASM_ARITHMETIC && defined(__x86_64__) __asm__ goto( "subq $1,(%0)\n\t" "jo %l1\n" @@ -587,7 +593,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL return; overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(op1, (double)ZEND_LONG_MIN - 1.0); -#elif defined(HAVE_ASM_GOTO) && defined(__aarch64__) +#elif ZEND_USE_ASM_ARITHMETIC && defined(__aarch64__) __asm__ goto ( "ldr x5, [%0]\n\t" "subs x5 ,x5, 1\n\t" @@ -628,7 +634,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL static zend_always_inline void fast_long_add_function(zval *result, zval *op1, zval *op2) { -#if defined(HAVE_ASM_GOTO) && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) +#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) __asm__ goto( "movl (%1), %%eax\n\t" "addl (%2), %%eax\n\t" @@ -646,7 +652,7 @@ static zend_always_inline void fast_long_add_function(zval *result, zval *op1, z return; overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(result, (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2)); -#elif defined(HAVE_ASM_GOTO) && defined(__x86_64__) +#elif ZEND_USE_ASM_ARITHMETIC && defined(__x86_64__) __asm__ goto( "movq (%1), %%rax\n\t" "addq (%2), %%rax\n\t" @@ -664,7 +670,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL return; overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(result, (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2)); -#elif defined(HAVE_ASM_GOTO) && defined(__aarch64__) +#elif ZEND_USE_ASM_ARITHMETIC && defined(__aarch64__) __asm__ goto( "ldr x5, [%1]\n\t" "ldr x6, [%2]\n\t" @@ -738,7 +744,7 @@ static zend_always_inline int fast_add_function(zval *result, zval *op1, zval *o static zend_always_inline void fast_long_sub_function(zval *result, zval *op1, zval *op2) { -#if defined(HAVE_ASM_GOTO) && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) +#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) __asm__ goto( "movl (%1), %%eax\n\t" "subl (%2), %%eax\n\t" @@ -756,7 +762,7 @@ static zend_always_inline void fast_long_sub_function(zval *result, zval *op1, z return; overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(result, (double) Z_LVAL_P(op1) - (double) Z_LVAL_P(op2)); -#elif defined(HAVE_ASM_GOTO) && defined(__x86_64__) +#elif ZEND_USE_ASM_ARITHMETIC && defined(__x86_64__) __asm__ goto( "movq (%1), %%rax\n\t" "subq (%2), %%rax\n\t" @@ -774,7 +780,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL return; overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(result, (double) Z_LVAL_P(op1) - (double) Z_LVAL_P(op2)); -#elif defined(HAVE_ASM_GOTO) && defined(__aarch64__) +#elif ZEND_USE_ASM_ARITHMETIC && defined(__aarch64__) __asm__ goto( "ldr x5, [%1]\n\t" "ldr x6, [%2]\n\t" From 363d87f2568044bce53b0dd625609130646cea0f Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 21 Feb 2020 13:19:09 +0100 Subject: [PATCH 062/201] Fix [-Wmissing-field-initializers] compiler warning in mbstring Add missing NULL pointer for mbfl_convert_vtbl struct. --- ext/mbstring/libmbfl/filters/mbfilter_7bit.c | 6 +++-- .../libmbfl/filters/mbfilter_armscii8.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_ascii.c | 6 +++-- .../libmbfl/filters/mbfilter_base64.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_big5.c | 12 ++++++---- ext/mbstring/libmbfl/filters/mbfilter_byte2.c | 15 ++++++++---- ext/mbstring/libmbfl/filters/mbfilter_byte4.c | 13 ++++++---- .../libmbfl/filters/mbfilter_cp1251.c | 6 +++-- .../libmbfl/filters/mbfilter_cp1252.c | 6 +++-- .../libmbfl/filters/mbfilter_cp1254.c | 6 +++-- .../libmbfl/filters/mbfilter_cp5022x.c | 22 +++++++++++------ .../libmbfl/filters/mbfilter_cp51932.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_cp850.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_cp866.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_cp932.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_cp936.c | 6 +++-- .../libmbfl/filters/mbfilter_euc_cn.c | 6 +++-- .../libmbfl/filters/mbfilter_euc_jp.c | 6 +++-- .../libmbfl/filters/mbfilter_euc_jp_2004.c | 6 +++-- .../libmbfl/filters/mbfilter_euc_jp_win.c | 6 +++-- .../libmbfl/filters/mbfilter_euc_kr.c | 6 +++-- .../libmbfl/filters/mbfilter_euc_tw.c | 6 +++-- .../libmbfl/filters/mbfilter_gb18030.c | 6 +++-- .../libmbfl/filters/mbfilter_htmlent.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_hz.c | 6 +++-- .../libmbfl/filters/mbfilter_iso2022_jp_ms.c | 6 +++-- .../libmbfl/filters/mbfilter_iso2022_kr.c | 6 +++-- .../libmbfl/filters/mbfilter_iso2022jp_2004.c | 6 +++-- .../filters/mbfilter_iso2022jp_mobile.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_1.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_10.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_13.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_14.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_15.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_16.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_2.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_3.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_4.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_5.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_6.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_7.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_8.c | 6 +++-- .../libmbfl/filters/mbfilter_iso8859_9.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_jis.c | 12 ++++++---- ext/mbstring/libmbfl/filters/mbfilter_koi8r.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_koi8u.c | 6 +++-- .../libmbfl/filters/mbfilter_qprint.c | 8 +++++-- ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 6 +++-- .../libmbfl/filters/mbfilter_sjis_2004.c | 6 +++-- .../libmbfl/filters/mbfilter_sjis_mac.c | 6 +++-- .../libmbfl/filters/mbfilter_sjis_mobile.c | 18 +++++++++----- .../libmbfl/filters/mbfilter_sjis_open.c | 6 +++-- .../filters/mbfilter_tl_jisx0201_jisx0208.c | 3 ++- ext/mbstring/libmbfl/filters/mbfilter_ucs2.c | 18 +++++++++----- ext/mbstring/libmbfl/filters/mbfilter_ucs4.c | 18 +++++++++----- ext/mbstring/libmbfl/filters/mbfilter_uhc.c | 6 +++-- ext/mbstring/libmbfl/filters/mbfilter_utf16.c | 18 +++++++++----- ext/mbstring/libmbfl/filters/mbfilter_utf32.c | 18 +++++++++----- ext/mbstring/libmbfl/filters/mbfilter_utf7.c | 6 +++-- .../libmbfl/filters/mbfilter_utf7imap.c | 8 +++++-- ext/mbstring/libmbfl/filters/mbfilter_utf8.c | 6 +++-- .../libmbfl/filters/mbfilter_utf8_mobile.c | 24 ++++++++++++------- .../libmbfl/filters/mbfilter_uuencode.c | 3 ++- ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c | 6 +++-- ext/mbstring/libmbfl/mbfl/mbfilter_pass.c | 3 ++- 65 files changed, 341 insertions(+), 166 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_7bit.c b/ext/mbstring/libmbfl/filters/mbfilter_7bit.c index 0a4169a2d8fce..df7b4db6e64b1 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_7bit.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_7bit.c @@ -52,7 +52,8 @@ const struct mbfl_convert_vtbl vtbl_8bit_7bit = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_any_7bit, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_7bit_8bit = { @@ -61,7 +62,8 @@ const struct mbfl_convert_vtbl vtbl_7bit_8bit = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_7bit_any, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_armscii8.c b/ext/mbstring/libmbfl/filters/mbfilter_armscii8.c index 599c1485fbb29..41ddf41b1940b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_armscii8.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_armscii8.c @@ -62,7 +62,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_armscii8 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_armscii8, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_armscii8_wchar = { @@ -71,7 +72,8 @@ const struct mbfl_convert_vtbl vtbl_armscii8_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_armscii8_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ascii.c b/ext/mbstring/libmbfl/filters/mbfilter_ascii.c index 71bd5b46fa198..e31d968535706 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ascii.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ascii.c @@ -63,7 +63,8 @@ const struct mbfl_convert_vtbl vtbl_ascii_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_ascii_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_ascii = { @@ -72,7 +73,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_ascii = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_ascii, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_base64.c b/ext/mbstring/libmbfl/filters/mbfilter_base64.c index f79a3eb8e96a6..765afe522e463 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_base64.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_base64.c @@ -52,7 +52,8 @@ const struct mbfl_convert_vtbl vtbl_8bit_b64 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_base64enc, - mbfl_filt_conv_base64enc_flush + mbfl_filt_conv_base64enc_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_b64_8bit = { @@ -61,7 +62,8 @@ const struct mbfl_convert_vtbl vtbl_b64_8bit = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_base64dec, - mbfl_filt_conv_base64dec_flush + mbfl_filt_conv_base64dec_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.c b/ext/mbstring/libmbfl/filters/mbfilter_big5.c index 6c071e0e998c7..ad27b58bd3202 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.c @@ -101,7 +101,8 @@ const struct mbfl_convert_vtbl vtbl_big5_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_big5_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_big5 = { @@ -110,7 +111,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_big5 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_big5, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL }; const struct mbfl_convert_vtbl vtbl_cp950_wchar = { @@ -119,7 +121,8 @@ const struct mbfl_convert_vtbl vtbl_cp950_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_big5_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp950 = { @@ -128,7 +131,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp950 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_big5, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_byte2.c b/ext/mbstring/libmbfl/filters/mbfilter_byte2.c index 572b9fab84f0f..fcdd4a4c450cf 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_byte2.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_byte2.c @@ -63,7 +63,8 @@ const struct mbfl_convert_vtbl vtbl_byte2be_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_byte2be_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_byte2be = { @@ -72,7 +73,9 @@ const struct mbfl_convert_vtbl vtbl_wchar_byte2be = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_byte2be, - mbfl_filt_conv_common_flush }; + mbfl_filt_conv_common_flush, + NULL, +}; const struct mbfl_convert_vtbl vtbl_byte2le_wchar = { mbfl_no_encoding_byte2le, @@ -80,7 +83,9 @@ const struct mbfl_convert_vtbl vtbl_byte2le_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_byte2le_wchar, - mbfl_filt_conv_common_flush }; + mbfl_filt_conv_common_flush, + NULL, +}; const struct mbfl_convert_vtbl vtbl_wchar_byte2le = { mbfl_no_encoding_wchar, @@ -88,7 +93,9 @@ const struct mbfl_convert_vtbl vtbl_wchar_byte2le = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_byte2le, - mbfl_filt_conv_common_flush }; + mbfl_filt_conv_common_flush, + NULL, +}; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_byte4.c b/ext/mbstring/libmbfl/filters/mbfilter_byte4.c index ed09bb3fdec34..4c2835ab1afe8 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_byte4.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_byte4.c @@ -63,7 +63,8 @@ const struct mbfl_convert_vtbl vtbl_byte4be_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_byte4be_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_byte4be = { @@ -72,7 +73,9 @@ const struct mbfl_convert_vtbl vtbl_wchar_byte4be = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_byte4be, - mbfl_filt_conv_common_flush }; + mbfl_filt_conv_common_flush, + NULL, +}; const struct mbfl_convert_vtbl vtbl_byte4le_wchar = { mbfl_no_encoding_byte4le, @@ -80,7 +83,8 @@ const struct mbfl_convert_vtbl vtbl_byte4le_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_byte4le_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_byte4le = { @@ -89,7 +93,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_byte4le = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_byte4le, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp1251.c b/ext/mbstring/libmbfl/filters/mbfilter_cp1251.c index fec1b6f807a2e..806102dfc37e9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp1251.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp1251.c @@ -63,7 +63,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp1251 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp1251, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_cp1251_wchar = { @@ -72,7 +73,8 @@ const struct mbfl_convert_vtbl vtbl_cp1251_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_cp1251_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp1252.c b/ext/mbstring/libmbfl/filters/mbfilter_cp1252.c index a668364a5b8a3..c0cf0f43f08fb 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp1252.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp1252.c @@ -63,7 +63,8 @@ const struct mbfl_convert_vtbl vtbl_cp1252_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_cp1252_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp1252 = { @@ -72,7 +73,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp1252 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp1252, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp1254.c b/ext/mbstring/libmbfl/filters/mbfilter_cp1254.c index 89fc4b6f59a03..918428fbfb83a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp1254.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp1254.c @@ -63,7 +63,8 @@ const struct mbfl_convert_vtbl vtbl_cp1254_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_cp1254_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp1254 = { @@ -72,7 +73,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp1254 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp1254, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c index dd3d1949fa45d..4fa23344445f2 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c @@ -145,6 +145,7 @@ const struct mbfl_convert_vtbl vtbl_jis_ms_wchar = { mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis_ms_wchar, mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_jis_ms = { @@ -153,7 +154,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_jis_ms = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_jis_ms, - mbfl_filt_conv_any_jis_flush + mbfl_filt_conv_any_jis_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_cp50220_wchar = { @@ -162,7 +164,8 @@ const struct mbfl_convert_vtbl vtbl_cp50220_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis_ms_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp50220 = { @@ -181,7 +184,8 @@ const struct mbfl_convert_vtbl vtbl_cp50220raw_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis_ms_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp50220raw = { @@ -200,7 +204,8 @@ const struct mbfl_convert_vtbl vtbl_cp50221_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis_ms_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp50221 = { @@ -209,7 +214,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp50221 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp50221, - mbfl_filt_conv_any_jis_flush + mbfl_filt_conv_any_jis_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_cp50222_wchar = { @@ -218,7 +224,8 @@ const struct mbfl_convert_vtbl vtbl_cp50222_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis_ms_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp50222 = { @@ -227,7 +234,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp50222 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp50222, - mbfl_filt_conv_wchar_cp50222_flush + mbfl_filt_conv_wchar_cp50222_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c b/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c index 189feb2141c16..f099f51389b48 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c @@ -86,7 +86,8 @@ const struct mbfl_convert_vtbl vtbl_cp51932_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_cp51932_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp51932 = { @@ -95,7 +96,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp51932 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp51932, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp850.c b/ext/mbstring/libmbfl/filters/mbfilter_cp850.c index 38f42b8695991..187ee0f468c72 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp850.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp850.c @@ -59,7 +59,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp850 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp850, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_cp850_wchar = { @@ -68,7 +69,8 @@ const struct mbfl_convert_vtbl vtbl_cp850_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_cp850_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp866.c b/ext/mbstring/libmbfl/filters/mbfilter_cp866.c index 6f2d602112f36..3a135558eb896 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp866.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp866.c @@ -63,7 +63,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp866 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp866, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_cp866_wchar = { @@ -72,7 +73,8 @@ const struct mbfl_convert_vtbl vtbl_cp866_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_cp866_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c index dcadc4eaa71de..49590622d799f 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c @@ -84,7 +84,8 @@ const struct mbfl_convert_vtbl vtbl_cp932_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_cp932_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp932 = { @@ -93,7 +94,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp932 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp932, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c index 95eb6e801514d..6c22dd0c135b6 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c @@ -83,7 +83,8 @@ const struct mbfl_convert_vtbl vtbl_cp936_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_cp936_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_cp936 = { @@ -92,7 +93,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp936 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_cp936, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c index 13a14855ec189..eb39799b87ee0 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c @@ -83,7 +83,8 @@ const struct mbfl_convert_vtbl vtbl_euccn_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_euccn_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_euccn = { @@ -92,7 +93,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_euccn = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_euccn, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c index aeeac851e44bc..c5a884ea0ed1f 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c @@ -84,7 +84,8 @@ const struct mbfl_convert_vtbl vtbl_eucjp_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_eucjp_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_eucjp = { @@ -93,7 +94,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_eucjp = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_eucjp, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c index d68a6cc38d340..c8eff57e169bc 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c @@ -64,7 +64,8 @@ const struct mbfl_convert_vtbl vtbl_eucjp2004_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis2004_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_eucjp2004 = { @@ -73,5 +74,6 @@ const struct mbfl_convert_vtbl vtbl_wchar_eucjp2004 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_jis2004, - mbfl_filt_conv_jis2004_flush + mbfl_filt_conv_jis2004_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c index 4c26e38fa8699..ac032770d066d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c @@ -87,7 +87,8 @@ const struct mbfl_convert_vtbl vtbl_eucjpwin_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_eucjpwin_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_eucjpwin = { @@ -96,7 +97,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_eucjpwin = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_eucjpwin, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c index 8509ef4dd2ca0..9e7925904b8d3 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c @@ -82,7 +82,8 @@ const struct mbfl_convert_vtbl vtbl_euckr_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_euckr_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_euckr = { @@ -91,7 +92,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_euckr = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_euckr, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c index 290d8b83fbddf..f1174eab77fc7 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c @@ -84,7 +84,8 @@ const struct mbfl_convert_vtbl vtbl_euctw_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_euctw_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_euctw = { @@ -93,7 +94,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_euctw = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_euctw, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c index f8d2e1954a8d1..dcee840dbd808 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c @@ -65,7 +65,8 @@ const struct mbfl_convert_vtbl vtbl_gb18030_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_gb18030_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_gb18030 = { @@ -74,7 +75,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_gb18030 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_gb18030, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c index 4213cadb7aa7e..49162ac1b36ea 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c @@ -74,7 +74,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_html = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_html_enc, - mbfl_filt_conv_html_enc_flush + mbfl_filt_conv_html_enc_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_html_wchar = { @@ -84,7 +85,8 @@ const struct mbfl_convert_vtbl vtbl_html_wchar = { mbfl_filt_conv_html_dec_dtor, mbfl_filt_conv_html_dec, mbfl_filt_conv_html_dec_flush, - mbfl_filt_conv_html_dec_copy }; + mbfl_filt_conv_html_dec_copy, +}; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_hz.c b/ext/mbstring/libmbfl/filters/mbfilter_hz.c index 0e360726ed0e2..13abc427666f1 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_hz.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_hz.c @@ -62,7 +62,8 @@ const struct mbfl_convert_vtbl vtbl_hz_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_hz_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_hz = { @@ -71,7 +72,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_hz = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_hz, - mbfl_filt_conv_any_hz_flush + mbfl_filt_conv_any_hz_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c index cec21c26f2ae1..8c5605937b743 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c @@ -66,7 +66,8 @@ const struct mbfl_convert_vtbl vtbl_2022jpms_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_2022jpms_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_2022jpms = { @@ -75,7 +76,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_2022jpms = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_2022jpms, - mbfl_filt_conv_any_2022jpms_flush + mbfl_filt_conv_any_2022jpms_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c index bd1227e6a5627..3fb856c2b7f86 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_2022kr = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_2022kr, - mbfl_filt_conv_any_2022kr_flush + mbfl_filt_conv_any_2022kr_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_2022kr_wchar = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_2022kr_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_2022kr_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c index b3c5f60f698e3..79f88300eb9b9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c @@ -64,7 +64,8 @@ const struct mbfl_convert_vtbl vtbl_2022jp_2004_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis2004_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_2022jp_2004 = { @@ -73,7 +74,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_2022jp_2004 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_jis2004, - mbfl_filt_conv_jis2004_flush + mbfl_filt_conv_jis2004_flush, + NULL, }; static int mbfl_filt_ident_2022jp_2004(int c, mbfl_identify_filter *filter) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c index ecfdee110965e..bf45a8065c05d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c @@ -68,7 +68,8 @@ const struct mbfl_convert_vtbl vtbl_2022jp_kddi_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_2022jp_mobile_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_2022jp_kddi = { @@ -77,7 +78,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_2022jp_kddi = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_2022jp_mobile, - mbfl_filt_conv_any_jis_flush + mbfl_filt_conv_any_jis_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.c index 2b75b51e58ce8..5d593887443a6 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.c @@ -60,7 +60,8 @@ const struct mbfl_convert_vtbl vtbl_8859_1_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_1_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_1 = { @@ -69,7 +70,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_1 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_1, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.c index bb050df3286ff..15451b9d42d2c 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_10_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_10_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_10 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_10 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_10, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.c index 5398abd4f7b03..381d4f6b5d750 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_13_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_13_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_13 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_13 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_13, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.c index bd07ac7b61109..ed2d5b309874e 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_14_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_14_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_14 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_14 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_14, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.c index a564ac4fcf122..4cae1ec5f6dfb 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_15_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_15_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_15 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_15 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_15, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c index 26008220066ee..b2370b41322d9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_16_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_16_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_16 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_16 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_16, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.c index 245cc914dc617..1496eb0aade29 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_2_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_2_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_2 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_2 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_2, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.c index 557983b7a7ca6..4086646968421 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_3_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_3_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_3 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_3 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_3, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.c index f481e01465799..477c18d2592e3 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.c @@ -60,7 +60,8 @@ const struct mbfl_convert_vtbl vtbl_8859_4_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_4_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_4 = { @@ -69,7 +70,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_4 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_4, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.c index d00a0afff4726..9934dbb5c79ae 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_5_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_5_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_5 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_5 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_5, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.c index 45120cf487f67..1235fdbd23716 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_6_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_6_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_6 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_6 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_6, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.c index 79fe4d75099bc..f62018b9c2a84 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_7_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_7_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_7 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_7 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_7, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.c index a7124d3e4ea7f..1ed1cfc50d892 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_8_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_8_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_8 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_8 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_8, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.c index ba71bfd6a4f2f..3b686a42be5d3 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.c @@ -61,7 +61,8 @@ const struct mbfl_convert_vtbl vtbl_8859_9_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8859_9_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8859_9 = { @@ -70,7 +71,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8859_9 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8859_9, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_jis.c b/ext/mbstring/libmbfl/filters/mbfilter_jis.c index f3bd3f814129d..93cb1e88ac541 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_jis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_jis.c @@ -82,7 +82,8 @@ const struct mbfl_convert_vtbl vtbl_jis_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_jis = { @@ -91,7 +92,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_jis = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_jis, - mbfl_filt_conv_any_jis_flush + mbfl_filt_conv_any_jis_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_2022jp_wchar = { @@ -100,7 +102,8 @@ const struct mbfl_convert_vtbl vtbl_2022jp_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_2022jp = { @@ -109,7 +112,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_2022jp = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_2022jp, - mbfl_filt_conv_any_jis_flush + mbfl_filt_conv_any_jis_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_koi8r.c b/ext/mbstring/libmbfl/filters/mbfilter_koi8r.c index a9a4479aed218..04dcf2d639a23 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_koi8r.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_koi8r.c @@ -63,7 +63,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_koi8r = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_koi8r, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_koi8r_wchar = { @@ -72,7 +73,8 @@ const struct mbfl_convert_vtbl vtbl_koi8r_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_koi8r_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_koi8u.c b/ext/mbstring/libmbfl/filters/mbfilter_koi8u.c index 675ea03955d3a..d1e310bde72c9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_koi8u.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_koi8u.c @@ -60,7 +60,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_koi8u = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_koi8u, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_koi8u_wchar = { @@ -69,7 +70,8 @@ const struct mbfl_convert_vtbl vtbl_koi8u_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_koi8u_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c index 0d10ea49f8136..42dfde108b928 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c @@ -54,7 +54,9 @@ const struct mbfl_convert_vtbl vtbl_8bit_qprint = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_qprintenc, - mbfl_filt_conv_qprintenc_flush }; + mbfl_filt_conv_qprintenc_flush, + NULL, +}; const struct mbfl_convert_vtbl vtbl_qprint_8bit = { mbfl_no_encoding_qprint, @@ -62,7 +64,9 @@ const struct mbfl_convert_vtbl vtbl_qprint_8bit = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_qprintdec, - mbfl_filt_conv_qprintdec_flush }; + mbfl_filt_conv_qprintdec_flush, + NULL, +}; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index 73ded6c7043e5..f64fd13817da3 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -87,7 +87,8 @@ const struct mbfl_convert_vtbl vtbl_sjis_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_sjis_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_sjis = { @@ -96,7 +97,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_sjis = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_sjis, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c index ac476b3e19af8..481ae557cc004 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c @@ -69,7 +69,8 @@ const struct mbfl_convert_vtbl vtbl_sjis2004_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_jis2004_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_sjis2004 = { @@ -78,7 +79,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_sjis2004 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_jis2004, - mbfl_filt_conv_jis2004_flush + mbfl_filt_conv_jis2004_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c index 8bc8e6e68f747..e52ea2f321c47 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c @@ -70,7 +70,8 @@ const struct mbfl_convert_vtbl vtbl_sjis_mac_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_sjis_mac_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_sjis_mac = { @@ -79,7 +80,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_sjis_mac = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_sjis_mac, - mbfl_filt_conv_sjis_mac_flush + mbfl_filt_conv_sjis_mac_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c index 316250ddb2133..e3faa3fe20c8a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c @@ -107,7 +107,8 @@ const struct mbfl_convert_vtbl vtbl_sjis_docomo_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_sjis_mobile_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_sjis_docomo = { @@ -116,7 +117,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_sjis_docomo = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_sjis_mobile, - mbfl_filt_conv_sjis_mobile_flush + mbfl_filt_conv_sjis_mobile_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_sjis_kddi_wchar = { @@ -125,7 +127,8 @@ const struct mbfl_convert_vtbl vtbl_sjis_kddi_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_sjis_mobile_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_sjis_kddi = { @@ -134,7 +137,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_sjis_kddi = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_sjis_mobile, - mbfl_filt_conv_sjis_mobile_flush + mbfl_filt_conv_sjis_mobile_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_sjis_sb_wchar = { @@ -143,7 +147,8 @@ const struct mbfl_convert_vtbl vtbl_sjis_sb_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_sjis_mobile_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_sjis_sb = { @@ -152,7 +157,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_sjis_sb = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_sjis_mobile, - mbfl_filt_conv_sjis_mobile_flush + mbfl_filt_conv_sjis_mobile_flush, + NULL, }; static const char nflags_s[10][2] = {"CN","DE","ES","FR","GB","IT","JP","KR","RU","US"}; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c index 855b6eda8b8dc..a3cea997447e4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c @@ -84,7 +84,8 @@ const struct mbfl_convert_vtbl vtbl_sjis_open_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_sjis_open_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_sjis_open = { @@ -93,7 +94,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_sjis_open = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_sjis_open, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c b/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c index b99c658e4de89..e62472c6ac4db 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c @@ -297,5 +297,6 @@ const struct mbfl_convert_vtbl vtbl_tl_jisx0201_jisx0208 = { mbfl_filt_tl_jisx0201_jisx0208_init, mbfl_filt_tl_jisx0201_jisx0208_cleanup, mbfl_filt_tl_jisx0201_jisx0208, - mbfl_filt_tl_jisx0201_jisx0208_flush + mbfl_filt_tl_jisx0201_jisx0208_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c b/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c index da42ef10f527f..ffe493982b48a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ucs2.c @@ -75,7 +75,8 @@ const struct mbfl_convert_vtbl vtbl_ucs2_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_ucs2_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_ucs2 = { @@ -84,7 +85,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_ucs2 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_ucs2be, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_ucs2be_wchar = { @@ -93,7 +95,8 @@ const struct mbfl_convert_vtbl vtbl_ucs2be_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_ucs2be_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_ucs2be = { @@ -102,7 +105,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_ucs2be = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_ucs2be, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_ucs2le_wchar = { @@ -111,7 +115,8 @@ const struct mbfl_convert_vtbl vtbl_ucs2le_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_ucs2le_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_ucs2le = { @@ -120,7 +125,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_ucs2le = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_ucs2le, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c index 34715cd560f6b..696788e5597be 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c @@ -75,7 +75,8 @@ const struct mbfl_convert_vtbl vtbl_ucs4_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_ucs4_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_ucs4 = { @@ -84,7 +85,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_ucs4 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_ucs4be, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_ucs4be_wchar = { @@ -93,7 +95,8 @@ const struct mbfl_convert_vtbl vtbl_ucs4be_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_ucs4be_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_ucs4be = { @@ -102,7 +105,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_ucs4be = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_ucs4be, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_ucs4le_wchar = { @@ -111,7 +115,8 @@ const struct mbfl_convert_vtbl vtbl_ucs4le_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_ucs4le_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_ucs4le = { @@ -120,7 +125,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_ucs4le = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_ucs4le, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c index 7995c812c2578..1827292e0fa6f 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c @@ -83,7 +83,8 @@ const struct mbfl_convert_vtbl vtbl_uhc_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_uhc_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_uhc = { @@ -92,7 +93,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_uhc = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_uhc, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c index 961bfdcaf3a1d..f5779e06c7db3 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c @@ -75,7 +75,8 @@ const struct mbfl_convert_vtbl vtbl_utf16_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf16_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf16 = { @@ -84,7 +85,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf16 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf16be, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_utf16be_wchar = { @@ -93,7 +95,8 @@ const struct mbfl_convert_vtbl vtbl_utf16be_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf16be_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf16be = { @@ -102,7 +105,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf16be = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf16be, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_utf16le_wchar = { @@ -111,7 +115,8 @@ const struct mbfl_convert_vtbl vtbl_utf16le_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf16le_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf16le = { @@ -120,7 +125,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf16le = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf16le, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c index 3281cf9494a46..460794f9d64d0 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c @@ -75,7 +75,8 @@ const struct mbfl_convert_vtbl vtbl_utf32_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf32_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf32 = { @@ -84,7 +85,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf32 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf32be, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_utf32be_wchar = { @@ -93,7 +95,8 @@ const struct mbfl_convert_vtbl vtbl_utf32be_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf32be_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf32be = { @@ -102,7 +105,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf32be = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf32be, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_utf32le_wchar = { @@ -111,7 +115,8 @@ const struct mbfl_convert_vtbl vtbl_utf32le_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf32le_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf32le = { @@ -120,7 +125,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf32le = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf32le, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c index 901c1a4a8b2be..424798d74594b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c @@ -75,7 +75,8 @@ const struct mbfl_convert_vtbl vtbl_utf7_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf7_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf7 = { @@ -84,7 +85,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf7 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf7, - mbfl_filt_conv_wchar_utf7_flush + mbfl_filt_conv_wchar_utf7_flush, + NULL, }; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c index 4203124cc3ce4..d4ad592ca3ac0 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c @@ -51,7 +51,9 @@ const struct mbfl_convert_vtbl vtbl_utf7imap_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf7imap_wchar, - mbfl_filt_conv_common_flush }; + mbfl_filt_conv_common_flush, + NULL, +}; const struct mbfl_convert_vtbl vtbl_wchar_utf7imap = { mbfl_no_encoding_wchar, @@ -59,7 +61,9 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf7imap = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf7imap, - mbfl_filt_conv_wchar_utf7imap_flush }; + mbfl_filt_conv_wchar_utf7imap_flush, + NULL, +}; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c index 05815bbdb04d1..f624e153a42e5 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c @@ -81,7 +81,8 @@ const struct mbfl_convert_vtbl vtbl_utf8_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf8_wchar, - mbfl_filt_conv_utf8_wchar_flush + mbfl_filt_conv_utf8_wchar_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf8 = { @@ -90,7 +91,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf8 = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf8, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c index 3e166609e750b..173e9f3b9b958 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c @@ -124,7 +124,8 @@ const struct mbfl_convert_vtbl vtbl_utf8_docomo_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf8_mobile_wchar, - mbfl_filt_conv_utf8_wchar_flush + mbfl_filt_conv_utf8_wchar_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf8_docomo = { @@ -133,7 +134,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf8_docomo = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf8_mobile, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_utf8_kddi_a_wchar = { @@ -142,7 +144,8 @@ const struct mbfl_convert_vtbl vtbl_utf8_kddi_a_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf8_mobile_wchar, - mbfl_filt_conv_utf8_wchar_flush + mbfl_filt_conv_utf8_wchar_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf8_kddi_a = { @@ -151,7 +154,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf8_kddi_a = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf8_mobile, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_utf8_kddi_b_wchar = { @@ -160,7 +164,8 @@ const struct mbfl_convert_vtbl vtbl_utf8_kddi_b_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf8_mobile_wchar, - mbfl_filt_conv_utf8_wchar_flush + mbfl_filt_conv_utf8_wchar_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf8_kddi_b = { @@ -169,7 +174,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf8_kddi_b = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf8_mobile, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_utf8_sb_wchar = { @@ -178,7 +184,8 @@ const struct mbfl_convert_vtbl vtbl_utf8_sb_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_utf8_mobile_wchar, - mbfl_filt_conv_utf8_wchar_flush + mbfl_filt_conv_utf8_wchar_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_utf8_sb = { @@ -187,7 +194,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf8_sb = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_utf8_mobile, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c b/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c index 0645ef68c64cc..b6601fda9f7ad 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uuencode.c @@ -51,7 +51,8 @@ const struct mbfl_convert_vtbl vtbl_uuencode_8bit = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_uudec, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c index a6a4e9f01fbe4..98c9644f9dab0 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.c @@ -60,7 +60,8 @@ const struct mbfl_convert_vtbl vtbl_8bit_wchar = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_8bit_wchar, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; const struct mbfl_convert_vtbl vtbl_wchar_8bit = { @@ -69,7 +70,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_8bit = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_wchar_8bit, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c index 343a968794e99..34543786d8258 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.c @@ -55,7 +55,8 @@ const struct mbfl_convert_vtbl vtbl_pass = { mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, mbfl_filt_conv_pass, - mbfl_filt_conv_common_flush + mbfl_filt_conv_common_flush, + NULL, }; int mbfl_filt_conv_pass(int c, mbfl_convert_filter *filter) From f133f0024ec801dc9636ee5bf84a93de1300d4b2 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 21 Feb 2020 13:24:37 +0100 Subject: [PATCH 063/201] Fix #79294: ::columnType() may fail after SQLite3Stmt::reset() The fix for feature request #53466 did not properly handle resetting of the corresponding statement; the problem with this is that the statement does not know about its result sets. But even if we could fix this, the `complete` handling still appears to be brittle, since the `sqlite3_column_type()`docs[1] state: | If the SQL statement does not currently point to a valid row, or if | the column index is out of range, the result is undefined. Fortunately, we can use `sqlite3_data_count()` instead, since[2]: | If prepared statement P does not have results ready to return (via | calls to the sqlite3_column() family of interfaces) then | sqlite3_data_count(P) returns 0. Thus, we guard `SQLite3::columnType()` with `sqlite3_data_count()`, and completely drop updating the `php_sqlite3_result_object.complete` field, but keep it for ABI BC purposes. [1] [2] --- NEWS | 3 +++ ext/sqlite3/php_sqlite3_structs.h | 2 +- ext/sqlite3/sqlite3.c | 5 +---- ext/sqlite3/tests/bug79294.phpt | 34 +++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 ext/sqlite3/tests/bug79294.phpt diff --git a/NEWS b/NEWS index 4d154b2be9310..c5eaa64e7790f 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ PHP NEWS - PDO_ODBC: . Fixed bug #79038 (PDOStatement::nextRowset() leaks column values). (cmb) +- SQLite3: + . Fixed bug #79294 (::columnType() may fail after SQLite3Stmt::reset()). (cmb) + - Standard: . Fixed bug #79254 (getenv() w/o arguments not showing changes). (cmb) diff --git a/ext/sqlite3/php_sqlite3_structs.h b/ext/sqlite3/php_sqlite3_structs.h index bd650639066e4..5a25af61e19bc 100644 --- a/ext/sqlite3/php_sqlite3_structs.h +++ b/ext/sqlite3/php_sqlite3_structs.h @@ -108,7 +108,7 @@ struct _php_sqlite3_result_object { zval stmt_obj_zval; int is_prepared_statement; - int complete; + int complete; // unused zend_object zo; }; diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 6ae049a740443..c2b4fa8bca54b 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -1786,7 +1786,7 @@ PHP_METHOD(sqlite3result, columnType) return; } - if (result_obj->complete) { + if (!sqlite3_data_count(result_obj->stmt_obj->stmt)) { RETURN_FALSE; } @@ -1841,7 +1841,6 @@ PHP_METHOD(sqlite3result, fetchArray) break; case SQLITE_DONE: - result_obj->complete = 1; RETURN_FALSE; break; @@ -1869,8 +1868,6 @@ PHP_METHOD(sqlite3result, reset) RETURN_FALSE; } - result_obj->complete = 0; - RETURN_TRUE; } /* }}} */ diff --git a/ext/sqlite3/tests/bug79294.phpt b/ext/sqlite3/tests/bug79294.phpt new file mode 100644 index 0000000000000..5538e3886b34b --- /dev/null +++ b/ext/sqlite3/tests/bug79294.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #79294 ()::columnType() may fail after SQLite3Stmt::reset()) +--SKIPIF-- + +--FILE-- +exec("CREATE TABLE foo (bar INT)"); +$db->exec("INSERT INTO foo VALUES (1)"); + +$stmt = $db->prepare("SELECT * FROM foo"); +$res = $stmt->execute(); +var_dump($res->fetchArray() !== false); +var_dump($res->columnType(0)); +var_dump($res->fetchArray() !== false); +var_dump($res->columnType(0)); +$stmt->reset(); +var_dump($res->fetchArray() !== false); +var_dump($res->columnType(0)); +$res->reset(); +var_dump($res->fetchArray() !== false); +var_dump($res->columnType(0)); +?> +--EXPECT-- +bool(true) +int(1) +bool(false) +bool(false) +bool(true) +int(1) +bool(true) +int(1) From 1892def3a8c6ba05688d84590fb4e37af6c18b78 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 21 Feb 2020 16:26:57 +0100 Subject: [PATCH 064/201] Add rand() to ext/standard stub --- ext/standard/basic_functions.c | 2 +- ext/standard/basic_functions.stub.php | 2 ++ ext/standard/basic_functions_arginfo.h | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index bf07aef503db7..a55e58f565919 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -275,7 +275,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(proc_nice, arginfo_proc_nice) #endif - PHP_FE(rand, arginfo_mt_rand) + PHP_FE(rand, arginfo_rand) PHP_FALIAS(srand, mt_srand, arginfo_srand) PHP_FALIAS(getrandmax, mt_getrandmax, arginfo_getrandmax) PHP_FE(mt_rand, arginfo_mt_rand) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index baebfdd9f00e1..1e4cc22d00ec2 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1188,6 +1188,8 @@ function mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} function srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} +function rand(int $min = 0, int $max = PHP_INT_MAX): int {} + function mt_rand(int $min = 0, int $max = PHP_INT_MAX): int {} function mt_getrandmax(): int {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 964f412d7ebcd..e7ae2a5a384c4 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1831,11 +1831,13 @@ ZEND_END_ARG_INFO() #define arginfo_srand arginfo_mt_srand -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mt_rand, 0, 0, IS_LONG, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rand, 0, 0, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, min, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, max, IS_LONG, 0) ZEND_END_ARG_INFO() +#define arginfo_mt_rand arginfo_rand + #define arginfo_mt_getrandmax arginfo_ob_get_level #define arginfo_getrandmax arginfo_ob_get_level From 6e40ec7de95a945a255f7d16b8ead51ad68e9bf5 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sat, 22 Feb 2020 01:01:07 +0100 Subject: [PATCH 065/201] Second go at fixing [-Wmissing-field-initializers] compiler warning in PDO By 0 initializing the sub structs --- ext/pdo/pdo_stmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 84afe14b60235..162b47ee6c20d 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -750,7 +750,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_ { int flags, idx, old_arg_count = 0; zend_class_entry *ce = NULL, *old_ce = NULL; - zval grp_val, *pgrp, retval, old_ctor_args = {{0}}; + zval grp_val, *pgrp, retval, old_ctor_args = {{0}, {{0}}, {0}}; int colno; if (how == PDO_FETCH_USE_DEFAULT) { From 0aad7999e75898518db348a6b9b620e391d726cb Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 23 Feb 2020 03:27:05 +0100 Subject: [PATCH 066/201] Update Travis build config The sudo key is deprecated and doesn't do anything anymore. Adding the "os" key with default value "linux" which was assumed to the build config. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2c991431bf9cd..5d3f4c0e6d1a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ git: dist: xenial language: c -sudo: required +os: linux addons: apt: packages: From 0bc6a66a7a0624e63edcd2499f91b227cdb77f47 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 9 Feb 2020 19:40:25 +0000 Subject: [PATCH 067/201] Fix bug #77653 (operator displayed instead of the real error message) --- NEWS | 4 + sapi/fpm/fpm/fpm_main.c | 3 + sapi/fpm/fpm/fpm_request.c | 2 - sapi/fpm/fpm/fpm_stdio.c | 90 ++++++++++--------- sapi/fpm/fpm/zlog.c | 8 +- sapi/fpm/tests/log-bm-in-shutdown-fn.phpt | 49 ++++++++++ .../log-bwp-msg-flush-split-fallback.phpt | 49 ++++++++++ .../tests/log-bwp-msg-flush-split-real.phpt | 46 ++++++++++ 8 files changed, 202 insertions(+), 49 deletions(-) create mode 100644 sapi/fpm/tests/log-bm-in-shutdown-fn.phpt create mode 100644 sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt create mode 100644 sapi/fpm/tests/log-bwp-msg-flush-split-real.phpt diff --git a/NEWS b/NEWS index 56d1b12f93912..7a1fdd32b90e5 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,10 @@ PHP NEWS cmb) . Fixed bug #79271 (DOMDocumentType::$childNodes is NULL). (cmb) +- FPM: + . Fixed bug #77653 (operator displayed instead of the real error message). + (Jakub Zelenka) + - PCRE: . Fixed bug #79188 (Memory corruption in preg_replace/preg_replace_callback and unicode). (Nikita) diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index bc3c145ca0b2a..b4daa4e4ca8b1 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -87,6 +87,7 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS; #include "fpm_request.h" #include "fpm_status.h" #include "fpm_signals.h" +#include "fpm_stdio.h" #include "fpm_conf.h" #include "fpm_php.h" #include "fpm_log.h" @@ -1968,6 +1969,8 @@ consult the installation file that came with this distribution, or visit \n\ php_request_shutdown((void *) 0); + fpm_stdio_flush_child(); + requests++; if (UNEXPECTED(max_requests && (requests == max_requests))) { fcgi_request_set_keep(request, 0); diff --git a/sapi/fpm/fpm/fpm_request.c b/sapi/fpm/fpm/fpm_request.c index e480256a01235..c80aa144628fc 100644 --- a/sapi/fpm/fpm/fpm_request.c +++ b/sapi/fpm/fpm/fpm_request.c @@ -16,7 +16,6 @@ #include "fpm_children.h" #include "fpm_scoreboard.h" #include "fpm_status.h" -#include "fpm_stdio.h" #include "fpm_request.h" #include "fpm_log.h" @@ -200,7 +199,6 @@ void fpm_request_end(void) /* {{{ */ #endif proc->memory = memory; fpm_scoreboard_proc_release(proc); - fpm_stdio_flush_child(); } /* }}} */ diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c index fde9c9144c2cc..ddedfb48c7cfc 100644 --- a/sapi/fpm/fpm/fpm_stdio.c +++ b/sapi/fpm/fpm/fpm_stdio.c @@ -106,9 +106,11 @@ int fpm_stdio_init_child(struct fpm_worker_pool_s *wp) /* {{{ */ } /* }}} */ +#define FPM_STDIO_CMD_FLUSH "\0fscf" + int fpm_stdio_flush_child() /* {{{ */ { - return write(STDERR_FILENO, "\0", 1); + return write(STDERR_FILENO, FPM_STDIO_CMD_FLUSH, sizeof(FPM_STDIO_CMD_FLUSH)); } /* }}} */ @@ -120,10 +122,8 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg) struct fpm_child_s *child; int is_stdout; struct fpm_event_s *event; - int fifo_in = 1, fifo_out = 1; - int in_buf = 0; - int read_fail = 0, finish_log_stream = 0, create_log_stream; - int res; + int in_buf = 0, cmd_pos = 0, pos, start; + int read_fail = 0, create_log_stream; struct zlog_stream *log_stream; if (!arg) { @@ -162,49 +162,53 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg) } } - while (fifo_in || fifo_out) { - if (fifo_in) { - res = read(fd, buf + in_buf, max_buf_size - 1 - in_buf); - if (res <= 0) { /* no data */ - fifo_in = 0; - if (res == 0 || (errno != EAGAIN && errno != EWOULDBLOCK)) { - /* pipe is closed or error */ - read_fail = (res < 0) ? res : 1; - } - } else { - in_buf += res; - /* if buffer ends with \0, then the stream will be finished */ - if (!buf[in_buf - 1]) { - finish_log_stream = 1; - in_buf--; - } + while (1) { +stdio_read: + in_buf = read(fd, buf, max_buf_size - 1); + if (in_buf <= 0) { /* no data */ + if (in_buf == 0 || (errno != EAGAIN && errno != EWOULDBLOCK)) { + /* pipe is closed or error */ + read_fail = (in_buf < 0) ? in_buf : 1; } + break; } - - if (fifo_out) { - if (in_buf == 0) { - fifo_out = 0; + start = 0; + if (cmd_pos > 0) { + if ((sizeof(FPM_STDIO_CMD_FLUSH) - cmd_pos) <= in_buf && + !memcmp(buf, &FPM_STDIO_CMD_FLUSH[cmd_pos], sizeof(FPM_STDIO_CMD_FLUSH) - cmd_pos)) { + zlog_stream_finish(log_stream); + start = cmd_pos; } else { - char *nl; - - nl = memchr(buf, '\n', in_buf); - if (nl) { - /* we should print each new line int the new message */ - int out_len = nl - buf; - zlog_stream_str(log_stream, buf, out_len); + zlog_stream_str(log_stream, &FPM_STDIO_CMD_FLUSH[0], cmd_pos); + } + cmd_pos = 0; + } + for (pos = start; pos < in_buf; pos++) { + switch (buf[pos]) { + case '\n': + zlog_stream_str(log_stream, buf + start, pos - start); zlog_stream_finish(log_stream); - /* skip new line */ - out_len++; - /* move data in the buffer */ - memmove(buf, buf + out_len, in_buf - out_len); - in_buf -= out_len; - } else if (in_buf == max_buf_size - 1 || !fifo_in) { - /* we should print if no more space in the buffer or no more data to come */ - zlog_stream_str(log_stream, buf, in_buf); - in_buf = 0; - } + start = pos + 1; + break; + case '\0': + if (pos + sizeof(FPM_STDIO_CMD_FLUSH) <= in_buf) { + if (!memcmp(buf + pos, FPM_STDIO_CMD_FLUSH, sizeof(FPM_STDIO_CMD_FLUSH))) { + zlog_stream_str(log_stream, buf + start, pos - start); + zlog_stream_finish(log_stream); + start = pos + sizeof(FPM_STDIO_CMD_FLUSH); + pos = start - 1; + } + } else if (!memcmp(buf + pos, FPM_STDIO_CMD_FLUSH, in_buf - pos)) { + cmd_pos = in_buf - pos; + zlog_stream_str(log_stream, buf + start, pos - start); + goto stdio_read; + } + break; } } + if (start < pos) { + zlog_stream_str(log_stream, buf + start, pos - start); + } } if (read_fail) { @@ -225,8 +229,6 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg) close(child->fd_stderr); child->fd_stderr = -1; } - } else if (finish_log_stream) { - zlog_stream_finish(log_stream); } } /* }}} */ diff --git a/sapi/fpm/fpm/zlog.c b/sapi/fpm/fpm/zlog.c index ddfed2aef981d..db2f0db447ee8 100644 --- a/sapi/fpm/fpm/zlog.c +++ b/sapi/fpm/fpm/zlog.c @@ -734,14 +734,16 @@ ssize_t zlog_stream_format(struct zlog_stream *stream, const char *fmt, ...) /* ssize_t zlog_stream_str(struct zlog_stream *stream, const char *str, size_t str_len) /* {{{ */ { + /* do not write anything if the stream is full or str is empty */ + if (str_len == 0 || stream->full) { + return 0; + } + /* reset stream if it is finished */ if (stream->finished) { stream->finished = 0; stream->len = 0; stream->full = 0; - } else if (stream->full) { - /* do not write anything if the stream is full */ - return 0; } if (stream->use_buffer) { diff --git a/sapi/fpm/tests/log-bm-in-shutdown-fn.phpt b/sapi/fpm/tests/log-bm-in-shutdown-fn.phpt new file mode 100644 index 0000000000000..f968bf9f08bcf --- /dev/null +++ b/sapi/fpm/tests/log-bm-in-shutdown-fn.phpt @@ -0,0 +1,49 @@ +--TEST-- +FPM: Log message in shutdown function +--SKIPIF-- + +--FILE-- +start(); +$tester->expectLogStartNotices(); +$tester->request()->expectEmptyBody(); +$tester->terminate(); +$tester->expectFastCGIErrorMessage('e', 1050, 80); +$tester->expectLogMessage('NOTICE: PHP message: ' . str_repeat('e', 80), 1050); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt b/sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt new file mode 100644 index 0000000000000..0c152619a923c --- /dev/null +++ b/sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt @@ -0,0 +1,49 @@ +--TEST-- +FPM: Buffered worker output plain log with msg with flush split in buffer +--SKIPIF-- + +--FILE-- +start(); +$tester->expectLogStartNotices(); +$tester->request()->expectEmptyBody(); +$tester->terminate(); +$lines = $tester->getLogLines(2); +var_dump($lines[0] === str_repeat('a', 1021) . "\0f\n"); +var_dump($lines[1] === "abc\n"); +$tester->close(); + +?> +Done +--EXPECT-- +bool(true) +bool(true) +Done +--CLEAN-- + diff --git a/sapi/fpm/tests/log-bwp-msg-flush-split-real.phpt b/sapi/fpm/tests/log-bwp-msg-flush-split-real.phpt new file mode 100644 index 0000000000000..63b2555de76ed --- /dev/null +++ b/sapi/fpm/tests/log-bwp-msg-flush-split-real.phpt @@ -0,0 +1,46 @@ +--TEST-- +FPM: Buffered worker output plain log with msg with flush split in buffer +--SKIPIF-- + +--FILE-- +start(); +$tester->expectLogStartNotices(); +$tester->request()->expectEmptyBody(); +$tester->terminate(); +var_dump($tester->getLastLogLine() === str_repeat('a', 1022) . "\n"); +$tester->close(); + +?> +Done +--EXPECT-- +bool(true) +Done +--CLEAN-- + From 578a8113ebade39e68489c974cd6c16b2aecbf2e Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 23 Feb 2020 19:14:05 +0000 Subject: [PATCH 068/201] Fix bug #79014 (PHP-FPM & Primary script unknown) --- NEWS | 1 + sapi/fpm/php-fpm.service.in | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 7a1fdd32b90e5..e86daf5f7a4d8 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ PHP NEWS - FPM: . Fixed bug #77653 (operator displayed instead of the real error message). (Jakub Zelenka) + . Fixed bug #79014 (PHP-FPM & Primary script unknown). (Jakub Zelenka) - PCRE: . Fixed bug #79188 (Memory corruption in preg_replace/preg_replace_callback diff --git a/sapi/fpm/php-fpm.service.in b/sapi/fpm/php-fpm.service.in index eab81300b7e62..50a87dc555f41 100644 --- a/sapi/fpm/php-fpm.service.in +++ b/sapi/fpm/php-fpm.service.in @@ -17,10 +17,6 @@ ExecReload=/bin/kill -USR2 $MAINPID # access this service's directories. PrivateTmp=true -# The directories /home, /root and /run/user are made inaccessible and empty for processes -# invoked by this unit. -ProtectHome=true - # Mounts the /usr, /boot, and /etc directories read-only for processes invoked by this unit. ProtectSystem=full From 9e6358af36e71fa867b3de24dae2ec76d678c428 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 23 Feb 2020 23:23:12 +0100 Subject: [PATCH 069/201] Fix #79299: com_print_typeinfo prints duplicate variables `lastid` has to retain its value during the traversal, so we move it to an outer scope. Patch contributed by Litiano Moura. --- NEWS | 2 ++ ext/com_dotnet/com_typeinfo.c | 2 +- ext/com_dotnet/tests/bug79299.phpt | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ext/com_dotnet/tests/bug79299.phpt diff --git a/NEWS b/NEWS index c5eaa64e7790f..0208b395e8d15 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ PHP NEWS . Fixed bug #79242 (COM error constants don't match com_exception codes on x86). (cmb) . Fixed bug #79248 (Traversing empty VT_ARRAY throws com_exception). (cmb) + . Fixed bug #79299 (com_print_typeinfo prints duplicate variables). (Litiano + Moura) - DOM: . Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita, diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index 330d7b0052f03..f3cecd82f528b 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -436,6 +436,7 @@ int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int pri char *ansiname = NULL; size_t ansinamelen; int ret = 0; + DISPID lastid = 0; /* for props */ if (FAILED(ITypeInfo_GetTypeAttr(typeinfo, &attr))) { return 0; @@ -469,7 +470,6 @@ int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int pri /* So we've got the dispatch interface; lets list the event methods */ for (i = 0; i < attr->cFuncs; i++) { zval tmp; - DISPID lastid = 0; /* for props */ int isprop; if (FAILED(ITypeInfo_GetFuncDesc(typeinfo, i, &func))) diff --git a/ext/com_dotnet/tests/bug79299.phpt b/ext/com_dotnet/tests/bug79299.phpt new file mode 100644 index 0000000000000..99c1a997420de --- /dev/null +++ b/ext/com_dotnet/tests/bug79299.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #79299 (com_print_typeinfo prints duplicate variables) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(1) { + [0]=> + string(14) "/* DISPID=9 */" +} \ No newline at end of file From d0d60503b54b528d42546acf1ca34914fb8aea55 Mon Sep 17 00:00:00 2001 From: Miguel Xavier Penha Neto Date: Mon, 24 Feb 2020 02:04:37 -0300 Subject: [PATCH 070/201] Fixes #79265: Improper injection of Host header when using fopen for http requests Check all occurrences of the string "host:" (and other headers), not just the first one. --- NEWS | 2 + ext/standard/http_fopen_wrapper.c | 91 ++++++++++++++++++--------- ext/standard/tests/http/bug79265.phpt | 39 ++++++++++++ 3 files changed, 104 insertions(+), 28 deletions(-) create mode 100644 ext/standard/tests/http/bug79265.phpt diff --git a/NEWS b/NEWS index 0208b395e8d15..64682a8d070bd 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,8 @@ PHP NEWS - Standard: . Fixed bug #79254 (getenv() w/o arguments not showing changes). (cmb) + . Fixed bug #79265 (Improper injection of Host header when using fopen for + http requests). (Miguel Xavier Penha Neto) 20 Feb 2020, PHP 7.3.15 diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 0aeec9115b1f9..18a3c1c11c3ed 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -460,41 +460,76 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, strip_header(user_headers, t, "content-type:"); } - if ((s = strstr(t, "user-agent:")) && - (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ')) { - have_header |= HTTP_HEADER_USER_AGENT; + s = t; + while ((s = strstr(s, "user-agent:"))) { + if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || + *(s-1) == '\t' || *(s-1) == ' ') { + have_header |= HTTP_HEADER_USER_AGENT; + break; + } + s++; } - if ((s = strstr(t, "host:")) && - (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ')) { - have_header |= HTTP_HEADER_HOST; + + s = t; + while ((s = strstr(s, "host:"))) { + if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || + *(s-1) == '\t' || *(s-1) == ' ') { + have_header |= HTTP_HEADER_HOST; + break; + } + s++; } - if ((s = strstr(t, "from:")) && - (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ')) { - have_header |= HTTP_HEADER_FROM; + + s = t; + while ((s = strstr(s, "from:"))) { + if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || + *(s-1) == '\t' || *(s-1) == ' ') { + have_header |= HTTP_HEADER_FROM; + break; } - if ((s = strstr(t, "authorization:")) && - (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ')) { - have_header |= HTTP_HEADER_AUTH; + s++; } - if ((s = strstr(t, "content-length:")) && - (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ')) { - have_header |= HTTP_HEADER_CONTENT_LENGTH; + + s = t; + while ((s = strstr(s, "authorization:"))) { + if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || + *(s-1) == '\t' || *(s-1) == ' ') { + have_header |= HTTP_HEADER_AUTH; + break; + } + s++; } - if ((s = strstr(t, "content-type:")) && - (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ')) { - have_header |= HTTP_HEADER_TYPE; + + s = t; + while ((s = strstr(s, "content-length:"))) { + if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || + *(s-1) == '\t' || *(s-1) == ' ') { + have_header |= HTTP_HEADER_CONTENT_LENGTH; + break; + } + s++; } - if ((s = strstr(t, "connection:")) && - (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ')) { - have_header |= HTTP_HEADER_CONNECTION; + + s = t; + while ((s = strstr(s, "content-type:"))) { + if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || + *(s-1) == '\t' || *(s-1) == ' ') { + have_header |= HTTP_HEADER_TYPE; + break; + } + s++; } + + s = t; + while ((s = strstr(s, "connection:"))) { + if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || + *(s-1) == '\t' || *(s-1) == ' ') { + have_header |= HTTP_HEADER_CONNECTION; + break; + } + s++; + } + /* remove Proxy-Authorization header */ if (use_proxy && use_ssl && (s = strstr(t, "proxy-authorization:")) && (s == t || *(s-1) == '\r' || *(s-1) == '\n' || diff --git a/ext/standard/tests/http/bug79265.phpt b/ext/standard/tests/http/bug79265.phpt new file mode 100644 index 0000000000000..4848991bd0fbe --- /dev/null +++ b/ext/standard/tests/http/bug79265.phpt @@ -0,0 +1,39 @@ +--TEST-- +Bug #79265 (Improper injection of Host header when using fopen for http requests) +--INI-- +allow_url_fopen=1 +--SKIPIF-- + +--FILE-- +array( + 'method'=>"GET", + 'header'=>"RandomHeader: localhost:8080\r\n" . + "Cookie: foo=bar\r\n" . + "Host: userspecifiedvalue\r\n" + ) +); +$context = stream_context_create($opts); +$fd = fopen('http://127.0.0.1:12342/', 'rb', false, $context); +fseek($output, 0, SEEK_SET); +echo stream_get_contents($output); +fclose($fd); + +http_server_kill($pid); + +?> +--EXPECT-- +GET / HTTP/1.0 +Connection: close +RandomHeader: localhost:8080 +Cookie: foo=bar +Host: userspecifiedvalue From cc704f5bb6bfbb7b17595f7ff24af011d66374a9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 24 Feb 2020 09:58:29 +0100 Subject: [PATCH 071/201] Reduce code duplication in HTTP header checks --- ext/standard/http_fopen_wrapper.c | 87 +++++++++---------------------- 1 file changed, 25 insertions(+), 62 deletions(-) diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 1c756e68bb5a4..25af87ae28843 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -103,6 +103,17 @@ static inline void strip_header(char *header_bag, char *lc_header_bag, } } +static zend_bool check_has_header(const char *headers, const char *header) { + const char *s = headers; + while ((s = strstr(s, header))) { + if (s == headers || *(s-1) == '\r' || *(s-1) == '\n' || *(s-1) == '\t' || *(s-1) == ' ') { + return 1; + } + s++; + } + return 0; +} + static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context, int redirect_max, int flags, @@ -457,74 +468,26 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, strip_header(user_headers, t, "content-type:"); } - s = t; - while ((s = strstr(s, "user-agent:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_USER_AGENT; - break; - } - s++; + if (check_has_header(t, "user-agent:")) { + have_header |= HTTP_HEADER_USER_AGENT; } - - s = t; - while ((s = strstr(s, "host:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_HOST; - break; - } - s++; + if (check_has_header(t, "host:")) { + have_header |= HTTP_HEADER_HOST; } - - s = t; - while ((s = strstr(s, "from:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_FROM; - break; - } - s++; + if (check_has_header(t, "from:")) { + have_header |= HTTP_HEADER_FROM; } - - s = t; - while ((s = strstr(s, "authorization:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_AUTH; - break; - } - s++; + if (check_has_header(t, "authorization:")) { + have_header |= HTTP_HEADER_AUTH; } - - s = t; - while ((s = strstr(s, "content-length:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_CONTENT_LENGTH; - break; - } - s++; + if (check_has_header(t, "content-length:")) { + have_header |= HTTP_HEADER_CONTENT_LENGTH; } - - s = t; - while ((s = strstr(s, "content-type:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_TYPE; - break; - } - s++; + if (check_has_header(t, "content-type:")) { + have_header |= HTTP_HEADER_TYPE; } - - s = t; - while ((s = strstr(s, "connection:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_CONNECTION; - break; - } - s++; + if (check_has_header(t, "connection:")) { + have_header |= HTTP_HEADER_CONNECTION; } /* remove Proxy-Authorization header */ From 3d9c02364db62a6d8e27947ffe47dbfaad644efe Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 24 Feb 2020 09:58:29 +0100 Subject: [PATCH 072/201] Reduce code duplication in HTTP header checks --- ext/standard/http_fopen_wrapper.c | 87 +++++++++---------------------- 1 file changed, 25 insertions(+), 62 deletions(-) diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 18a3c1c11c3ed..1248fd97bd7b7 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -106,6 +106,17 @@ static inline void strip_header(char *header_bag, char *lc_header_bag, } } +static zend_bool check_has_header(const char *headers, const char *header) { + const char *s = headers; + while ((s = strstr(s, header))) { + if (s == headers || *(s-1) == '\r' || *(s-1) == '\n' || *(s-1) == '\t' || *(s-1) == ' ') { + return 1; + } + s++; + } + return 0; +} + static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context, int redirect_max, int flags, @@ -460,74 +471,26 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, strip_header(user_headers, t, "content-type:"); } - s = t; - while ((s = strstr(s, "user-agent:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_USER_AGENT; - break; - } - s++; + if (check_has_header(t, "user-agent:")) { + have_header |= HTTP_HEADER_USER_AGENT; } - - s = t; - while ((s = strstr(s, "host:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_HOST; - break; - } - s++; + if (check_has_header(t, "host:")) { + have_header |= HTTP_HEADER_HOST; } - - s = t; - while ((s = strstr(s, "from:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_FROM; - break; - } - s++; + if (check_has_header(t, "from:")) { + have_header |= HTTP_HEADER_FROM; } - - s = t; - while ((s = strstr(s, "authorization:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_AUTH; - break; - } - s++; + if (check_has_header(t, "authorization:")) { + have_header |= HTTP_HEADER_AUTH; } - - s = t; - while ((s = strstr(s, "content-length:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_CONTENT_LENGTH; - break; - } - s++; + if (check_has_header(t, "content-length:")) { + have_header |= HTTP_HEADER_CONTENT_LENGTH; } - - s = t; - while ((s = strstr(s, "content-type:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_TYPE; - break; - } - s++; + if (check_has_header(t, "content-type:")) { + have_header |= HTTP_HEADER_TYPE; } - - s = t; - while ((s = strstr(s, "connection:"))) { - if (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ') { - have_header |= HTTP_HEADER_CONNECTION; - break; - } - s++; + if (check_has_header(t, "connection:")) { + have_header |= HTTP_HEADER_CONNECTION; } /* remove Proxy-Authorization header */ From 56cdbe63c24b86c2f1d60bf2609fde113d12d235 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 24 Feb 2020 10:19:58 +0100 Subject: [PATCH 073/201] Don't treat any WS as start of header Check that the header occurs after \n, not other whitespace characters. --- ext/standard/http_fopen_wrapper.c | 5 ++-- ext/standard/tests/http/bug79265_2.phpt | 38 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 ext/standard/tests/http/bug79265_2.phpt diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 1248fd97bd7b7..5ac89d9ea282b 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -109,7 +109,7 @@ static inline void strip_header(char *header_bag, char *lc_header_bag, static zend_bool check_has_header(const char *headers, const char *header) { const char *s = headers; while ((s = strstr(s, header))) { - if (s == headers || *(s-1) == '\r' || *(s-1) == '\n' || *(s-1) == '\t' || *(s-1) == ' ') { + if (s == headers || *(s-1) == '\n') { return 1; } s++; @@ -495,8 +495,7 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, /* remove Proxy-Authorization header */ if (use_proxy && use_ssl && (s = strstr(t, "proxy-authorization:")) && - (s == t || *(s-1) == '\r' || *(s-1) == '\n' || - *(s-1) == '\t' || *(s-1) == ' ')) { + (s == t || *(s-1) == '\n')) { char *p = s + sizeof("proxy-authorization:") - 1; while (s > t && (*(s-1) == ' ' || *(s-1) == '\t')) s--; diff --git a/ext/standard/tests/http/bug79265_2.phpt b/ext/standard/tests/http/bug79265_2.phpt new file mode 100644 index 0000000000000..d2f5bc1e384cf --- /dev/null +++ b/ext/standard/tests/http/bug79265_2.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #79265 variation: "host:" not at start of header +--INI-- +allow_url_fopen=1 +--SKIPIF-- + +--FILE-- +array( + 'method'=>"GET", + 'header'=>"RandomHeader: host:8080\r\n" . + "Cookie: foo=bar\r\n" + ) +); +$context = stream_context_create($opts); +$fd = fopen('http://127.0.0.1:12342/', 'rb', false, $context); +fseek($output, 0, SEEK_SET); +echo stream_get_contents($output); +fclose($fd); + +http_server_kill($pid); + +?> +--EXPECT-- +GET / HTTP/1.0 +Host: 127.0.0.1:12342 +Connection: close +RandomHeader: host:8080 +Cookie: foo=bar From 6c0a33f2dc9b3580b4bf3d10d13eda81eaa43e2a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 24 Feb 2020 11:59:46 +0100 Subject: [PATCH 074/201] Add skipif for argon2id in test If argon2i is provided by libargon, then argon2id may not be available here. --- ext/sodium/tests/bug78516.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/sodium/tests/bug78516.phpt b/ext/sodium/tests/bug78516.phpt index 524b23351839f..0347d332730ef 100644 --- a/ext/sodium/tests/bug78516.phpt +++ b/ext/sodium/tests/bug78516.phpt @@ -3,6 +3,7 @@ Bug #78516 (password_hash(): Memory cost is not in allowed range) --SKIPIF-- --FILE-- Date: Mon, 24 Feb 2020 11:00:58 +0100 Subject: [PATCH 075/201] Enable ext/sodium in CI --- .travis.yml | 1 + azure/apt.yml | 1 + azure/configure.yml | 1 + azure/i386/apt.yml | 1 + azure/i386/job.yml | 1 + azure/macos/job.yml | 1 + travis/compile.sh | 1 + 7 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index c408d260cd118..d12e846f2b196 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ addons: - libpspell-dev - libsasl2-dev - libsqlite3-dev + - libsodium-dev - libtidy-dev - libwebp-dev - libxml2-dev diff --git a/azure/apt.yml b/azure/apt.yml index 3019d82379315..2beb625f620c0 100644 --- a/azure/apt.yml +++ b/azure/apt.yml @@ -30,6 +30,7 @@ steps: libreadline-dev \ libldap2-dev \ libsasl2-dev \ + libsodium-dev \ libargon2-0-dev \ postgresql \ postgresql-contrib \ diff --git a/azure/configure.yml b/azure/configure.yml index 9de67ae13f7d1..1d3374bfa044e 100644 --- a/azure/configure.yml +++ b/azure/configure.yml @@ -55,6 +55,7 @@ steps: --with-ldap-sasl \ --with-password-argon2 \ --with-mhash \ + --with-sodium \ --enable-werror \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d diff --git a/azure/i386/apt.yml b/azure/i386/apt.yml index 9342df35e40ea..022bf96f30184 100644 --- a/azure/i386/apt.yml +++ b/azure/i386/apt.yml @@ -40,6 +40,7 @@ steps: libreadline-dev:i386 \ libffi-dev:i386 \ libfreetype6-dev:i386 \ + libsodium-dev:i386 \ postgresql \ postgresql-contrib \ ${{ parameters.packages }} diff --git a/azure/i386/job.yml b/azure/i386/job.yml index 0806a246e987b..2b1e9847af315 100644 --- a/azure/i386/job.yml +++ b/azure/i386/job.yml @@ -62,6 +62,7 @@ jobs: --with-ffi \ --enable-zend-test \ --with-mhash \ + --with-sodium \ --enable-werror \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d diff --git a/azure/macos/job.yml b/azure/macos/job.yml index 1a6aefd63372e..4b979d41a8672 100644 --- a/azure/macos/job.yml +++ b/azure/macos/job.yml @@ -65,6 +65,7 @@ jobs: --enable-zend-test \ --enable-intl \ --with-mhash \ + --with-sodium \ --enable-werror \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d diff --git a/travis/compile.sh b/travis/compile.sh index d14309a0dd47c..2b2a4424c4e02 100755 --- a/travis/compile.sh +++ b/travis/compile.sh @@ -75,6 +75,7 @@ $TS \ --with-kerberos \ --enable-sysvmsg \ --with-ffi \ +--with-sodium \ --enable-zend-test=shared \ --enable-werror \ --with-pear From c3aa9132d67364d52e4da79081c3e9823be7ae45 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 24 Feb 2020 21:34:37 +0100 Subject: [PATCH 076/201] Fix argon2 test if provided by sodium --- ext/standard/tests/password/password_hash_error_argon2.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/standard/tests/password/password_hash_error_argon2.phpt b/ext/standard/tests/password/password_hash_error_argon2.phpt index 96f029aba93d6..0323057a7efc2 100644 --- a/ext/standard/tests/password/password_hash_error_argon2.phpt +++ b/ext/standard/tests/password/password_hash_error_argon2.phpt @@ -4,6 +4,7 @@ Test error operation of password_hash() with Argon2i and Argon2id --FILE-- Date: Wed, 12 Feb 2020 10:27:28 +0100 Subject: [PATCH 077/201] Use serialize_precision for var_dump() var_dump() is debugging functionality, so it should print floating-point numbers accurately. We do this by switching to serialize_precision, which (by default) will print with as much precision as necessary to preserve the exact value of the float. This also affects debug_zval_dump(). Closes GH-5172. --- UPGRADING | 4 + Zend/tests/add_005.phpt | 4 +- Zend/tests/binary-32bit.phpt | 44 +-- Zend/tests/binary.phpt | 12 +- Zend/tests/decrement_001_64bit.phpt | 4 +- Zend/tests/div_001.phpt | 6 +- Zend/tests/hex_overflow_32bit.phpt | 2 +- Zend/tests/numeric_string_errors.phpt | 4 +- Zend/tests/numeric_string_errors_assign.phpt | 4 +- .../scalar_return_basic_64bit.phpt | 2 +- .../scalar_strict_64bit.phpt | 2 +- Zend/tests/zend_signed_multiply-64bit-2.phpt | 24 +- Zend/tests/zend_signed_multiply-64bit.phpt | 2 +- Zend/tests/zend_strtod.phpt | 4 +- ext/exif/tests/float_cast_overflow.phpt | 2 +- ext/json/tests/008.phpt | 2 +- ext/json/tests/bug63737.phpt | 12 +- ext/mysqli/tests/010.phpt | 4 +- ext/standard/tests/array/001.phpt | 4 +- ext/standard/tests/array/002.phpt | 50 +-- ext/standard/tests/array/003.phpt | 6 +- .../tests/array/array_combine_variation5.phpt | 2 +- .../array/array_diff_assoc_variation6.phpt | 18 +- .../tests/array/array_diff_variation8.phpt | 2 +- .../tests/array/array_map_variation5.phpt | 2 +- .../array_merge_recursive_variation5.phpt | 4 +- .../tests/array/array_product_variation3.phpt | 2 +- .../tests/array/array_reverse_variation5.phpt | 12 +- .../tests/array/array_unique_variation4.phpt | 2 +- .../tests/array/array_unshift_variation5.phpt | 8 +- ext/standard/tests/array/bug35014.phpt | 6 +- ext/standard/tests/array/bug35014_64bit.phpt | 4 +- ext/standard/tests/array/range.phpt | 8 +- ext/standard/tests/array/range_variation.phpt | 52 +-- ext/standard/tests/general_functions/008.phpt | 4 +- .../gettype_settype_variation3.phpt | 10 +- .../tests/math/abs_basiclong_64bit.phpt | 6 +- ext/standard/tests/math/acos_variation.phpt | 4 +- .../tests/math/acosh_basiclong_64bit.phpt | 2 + ext/standard/tests/math/acosh_variation.phpt | 18 +- ext/standard/tests/math/asin_variation.phpt | 2 +- .../tests/math/asinh_basiclong_64bit.phpt | 2 + ext/standard/tests/math/asinh_variation.phpt | 2 +- ext/standard/tests/math/atan2_basic.phpt | 2 +- .../tests/math/atan2_basiclong_64bit.phpt | 330 ++++++++-------- .../tests/math/atan_basiclong_64bit.phpt | 30 +- ext/standard/tests/math/atan_variation.phpt | 24 +- .../tests/math/bindec_basiclong_64bit.phpt | 6 +- .../tests/math/ceil_basiclong_64bit.phpt | 16 +- ext/standard/tests/math/constants_basic.phpt | 34 +- .../tests/math/cos_basiclong_64bit.phpt | 2 + ext/standard/tests/math/cos_variation.phpt | 2 +- ext/standard/tests/math/cosh_variation.phpt | 2 +- .../tests/math/deg2rad_basiclong_64bit.phpt | 28 +- .../tests/math/deg2rad_variation.phpt | 24 +- ext/standard/tests/math/exp_basic.phpt | 2 +- ext/standard/tests/math/expm1_basic.phpt | 2 +- ext/standard/tests/math/fdiv.phpt | 4 +- .../tests/math/floor_basiclong_64bit.phpt | 16 +- ext/standard/tests/math/fmod_basic.phpt | 18 +- .../tests/math/fmod_basiclong_64bit.phpt | 8 +- .../tests/math/hexdec_basiclong_64bit.phpt | 6 +- ext/standard/tests/math/hypot_basic.phpt | 242 ++++++------ .../tests/math/hypot_basiclong_64bit.phpt | 254 ++++++------ .../tests/math/log10_basiclong_64bit.phpt | 18 +- ext/standard/tests/math/log10_variation.phpt | 14 +- ext/standard/tests/math/log1p_basic.phpt | 16 +- .../tests/math/log1p_basiclong_64bit.phpt | 18 +- ext/standard/tests/math/log_basic.phpt | 30 +- .../tests/math/log_basiclong_64bit.phpt | 18 +- .../tests/math/octdec_basiclong_64bit.phpt | 6 +- .../tests/math/pow_basiclong_64bit.phpt | 94 ++--- ext/standard/tests/math/pow_variation1.phpt | 2 +- .../tests/math/pow_variation1_64bit.phpt | 6 +- ext/standard/tests/math/pow_variation2.phpt | 2 +- .../tests/math/rad2deg_basiclong_64bit.phpt | 30 +- .../tests/math/rad2deg_variation.phpt | 24 +- .../tests/math/round_basiclong_64bit.phpt | 16 +- .../tests/math/sin_basiclong_64bit.phpt | 2 + ext/standard/tests/math/sin_variation.phpt | 2 +- ext/standard/tests/math/sinh_variation.phpt | 2 +- .../tests/math/sqrt_basiclong_64bit.phpt | 18 +- ext/standard/tests/math/sqrt_variation.phpt | 12 +- .../tests/math/tan_basiclong_64bit.phpt | 8 +- ext/standard/tests/math/tan_variation.phpt | 2 +- ext/standard/tests/math/tanh_variation.phpt | 2 +- ext/standard/tests/serialize/003.phpt | 6 +- .../serialize/serialization_arrays_001.phpt | 4 +- .../serialization_miscTypes_001.phpt | Bin 7606 -> 7641 bytes .../serialize/serialization_objects_001.phpt | Bin 2428 -> 2557 bytes .../serialize/serialization_objects_002.phpt | Bin 7233 -> 7568 bytes .../serialize/serialization_objects_003.phpt | 2 +- ext/standard/tests/strings/pack_float.phpt | 46 +-- .../tests/strings/similar_text_basic.phpt | 6 +- ext/standard/var.c | 4 +- run-tests.php | 1 + tests/lang/bug24640.phpt | 16 +- tests/lang/operators/add_basiclong_64bit.phpt | 148 +++---- tests/lang/operators/add_variationStr.phpt | 4 +- .../operators/divide_basiclong_64bit.phpt | 364 +++++++++--------- tests/lang/operators/divide_variationStr.phpt | 148 +++---- .../operators/multiply_basiclong_64bit.phpt | 240 ++++++------ .../lang/operators/multiply_variationStr.phpt | 12 +- .../operators/negate_basiclong_64bit.phpt | 6 +- .../operators/postdec_basiclong_64bit.phpt | 6 +- .../lang/operators/postdec_variationStr.phpt | 2 +- .../operators/postinc_basiclong_64bit.phpt | 6 +- .../operators/predec_basiclong_64bit.phpt | 6 +- tests/lang/operators/predec_variationStr.phpt | 2 +- .../operators/preinc_basiclong_64bit.phpt | 6 +- .../operators/subtract_basiclong_64bit.phpt | 138 +++---- 111 files changed, 1472 insertions(+), 1465 deletions(-) diff --git a/UPGRADING b/UPGRADING index 9275d20df9877..2696cf8376781 100644 --- a/UPGRADING +++ b/UPGRADING @@ -342,6 +342,10 @@ PHP 8.0 UPGRADE NOTES http://example.com/foo?# => query = "", fragment = "" Previously all cases resulted in query and fragment being null. + . var_dump() and debug_zval_dump() will now print floating-point numbers + using serialize_precision rather than precision. In a default configuration, + this means that floating-point numbers are now printed with full accuracy + by these debugging functions. - tidy: . The $use_include_path parameter, which was not used internally, has been diff --git a/Zend/tests/add_005.phpt b/Zend/tests/add_005.phpt index f5c20124cc75a..6981d7656f60a 100644 --- a/Zend/tests/add_005.phpt +++ b/Zend/tests/add_005.phpt @@ -17,6 +17,6 @@ var_dump($c); echo "Done\n"; ?> --EXPECT-- -float(2834756759.1231) -float(2834756759.1231) +float(2834756759.123123) +float(2834756759.123123) Done diff --git a/Zend/tests/binary-32bit.phpt b/Zend/tests/binary-32bit.phpt index 4b87aded4fc76..c66e863eb598a 100644 --- a/Zend/tests/binary-32bit.phpt +++ b/Zend/tests/binary-32bit.phpt @@ -1,7 +1,5 @@ --TEST-- testing binary literals ---INI-- -precision=14 --SKIPIF-- --FILE-- @@ -126,27 +124,27 @@ float(8796093022207) float(17592186044415) float(35184372088831) float(70368744177663) -float(1.4073748835533E+14) -float(2.8147497671066E+14) -float(5.6294995342131E+14) -float(1.1258999068426E+15) -float(2.2517998136852E+15) -float(4.5035996273705E+15) -float(9.007199254741E+15) -float(1.8014398509482E+16) -float(3.6028797018964E+16) -float(7.2057594037928E+16) -float(1.4411518807586E+17) -float(2.8823037615171E+17) -float(5.7646075230342E+17) -float(1.1529215046068E+18) -float(2.3058430092137E+18) -float(4.6116860184274E+18) -float(9.2233720368548E+18) -float(1.844674407371E+19) -float(-1.844674407371E+19) -float(-9.2233720368548E+18) -float(-4.6116860184274E+18) +float(140737488355327) +float(281474976710655) +float(562949953421311) +float(1125899906842623) +float(2251799813685247) +float(4503599627370495) +float(9007199254740992) +float(18014398509481984) +float(36028797018963970) +float(72057594037927940) +float(1.4411518807585587E+17) +float(2.8823037615171174E+17) +float(5.764607523034234E+17) +float(1.1529215046068468E+18) +float(2.3058430092136937E+18) +float(4.6116860184273874E+18) +float(9.223372036854775E+18) +float(1.844674407370955E+19) +float(-1.844674407370955E+19) +float(-9.223372036854775E+18) +float(-4.6116860184273874E+18) float(-8589934591) float(-4294967295) int(-2147483647) diff --git a/Zend/tests/binary.phpt b/Zend/tests/binary.phpt index 039cf80ce41e0..2dcbf184136d0 100644 --- a/Zend/tests/binary.phpt +++ b/Zend/tests/binary.phpt @@ -143,12 +143,12 @@ int(1152921504606846975) int(2305843009213693951) int(4611686018427387903) int(9223372036854775807) -float(9223372036854775808) -float(18446744073709549568) -float(18446744073709549568) -float(36893488147419099136) -float(36893488147419099136) -float(-18446744073709549568) +float(9.223372036854776E+18) +float(1.844674407370955E+19) +float(1.844674407370955E+19) +float(3.68934881474191E+19) +float(3.68934881474191E+19) +float(-1.844674407370955E+19) int(-9223372036854775807) int(-4611686018427387903) int(-1) diff --git a/Zend/tests/decrement_001_64bit.phpt b/Zend/tests/decrement_001_64bit.phpt index cce9875a785b5..2b2100932a3c1 100644 --- a/Zend/tests/decrement_001_64bit.phpt +++ b/Zend/tests/decrement_001_64bit.phpt @@ -55,6 +55,6 @@ object(stdClass)#%d (0) { } array(0) { } -float(-9.2233720368548E+18) -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) +float(-9.223372036854776E+18) Done diff --git a/Zend/tests/div_001.phpt b/Zend/tests/div_001.phpt index 051ed3f733995..11cf897541f74 100644 --- a/Zend/tests/div_001.phpt +++ b/Zend/tests/div_001.phpt @@ -26,7 +26,7 @@ var_dump($c); echo "Done\n"; ?> --EXPECT-- -float(394758.39454545) -float(394758.39454545) -float(394758.39454545) +float(394758.39454545453) +float(394758.39454545453) +float(394758.39454545453) Done diff --git a/Zend/tests/hex_overflow_32bit.phpt b/Zend/tests/hex_overflow_32bit.phpt index 4d4e95818c17c..71be6dc051529 100644 --- a/Zend/tests/hex_overflow_32bit.phpt +++ b/Zend/tests/hex_overflow_32bit.phpt @@ -1,7 +1,7 @@ --TEST-- testing integer overflow (32bit) --INI-- -precision=14 +serialize_precision=14 --SKIPIF-- --FILE-- diff --git a/Zend/tests/numeric_string_errors.phpt b/Zend/tests/numeric_string_errors.phpt index 15dcd04461481..83c948981b8bd 100644 --- a/Zend/tests/numeric_string_errors.phpt +++ b/Zend/tests/numeric_string_errors.phpt @@ -88,7 +88,7 @@ int(0) Notice: A non well formed numeric value encountered in %s on line %d Notice: A non well formed numeric value encountered in %s on line %d -float(0.89473684210526) +float(0.8947368421052632) Warning: A non-numeric value encountered in %s on line %d @@ -101,7 +101,7 @@ float(NAN) Notice: A non well formed numeric value encountered in %s on line %d Notice: A non well formed numeric value encountered in %s on line %d -float(3.0910586430935E+39) +float(3.0910586430935376E+39) Warning: A non-numeric value encountered in %s on line %d diff --git a/Zend/tests/numeric_string_errors_assign.phpt b/Zend/tests/numeric_string_errors_assign.phpt index b13a7ec717854..69be0c114dd84 100644 --- a/Zend/tests/numeric_string_errors_assign.phpt +++ b/Zend/tests/numeric_string_errors_assign.phpt @@ -143,7 +143,7 @@ int(0) Notice: A non well formed numeric value encountered in %s on line %d Notice: A non well formed numeric value encountered in %s on line %d -float(0.89473684210526) +float(0.8947368421052632) Warning: A non-numeric value encountered in %s on line %d @@ -156,7 +156,7 @@ float(NAN) Notice: A non well formed numeric value encountered in %s on line %d Notice: A non well formed numeric value encountered in %s on line %d -float(3.0910586430935E+39) +float(3.0910586430935376E+39) Warning: A non-numeric value encountered in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt index fa7aacdef3f49..ad987e58da596 100644 --- a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt @@ -117,7 +117,7 @@ float(1) *** Trying string(0) "" *** Caught Return value of {closure}() must be of type float, string returned in %s on line %d *** Trying int(9223372036854775807) -float(9.2233720368548E+18) +float(9.223372036854776E+18) *** Trying float(NAN) float(NAN) *** Trying bool(true) diff --git a/Zend/tests/type_declarations/scalar_strict_64bit.phpt b/Zend/tests/type_declarations/scalar_strict_64bit.phpt index 0f39700b7f326..2d00b6f23b1a2 100644 --- a/Zend/tests/type_declarations/scalar_strict_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_strict_64bit.phpt @@ -131,7 +131,7 @@ float(1.5) *** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d *** Trying int(9223372036854775807) -float(9.2233720368548E+18) +float(9.223372036854776E+18) *** Trying float(NAN) float(NAN) diff --git a/Zend/tests/zend_signed_multiply-64bit-2.phpt b/Zend/tests/zend_signed_multiply-64bit-2.phpt index ff0e88a78dc41..dab3050ed4ed3 100644 --- a/Zend/tests/zend_signed_multiply-64bit-2.phpt +++ b/Zend/tests/zend_signed_multiply-64bit-2.phpt @@ -16,27 +16,27 @@ for($c = 0; $c <= 16; $c++) { --EXPECT-- int(-16) int(-922337203685477580) -float(1.4757395258968E+19) +float(1.4757395258967642E+19) ----------- int(-15) int(-922337203685477580) -float(1.3835058055282E+19) +float(1.3835058055282164E+19) ----------- int(-14) int(-922337203685477580) -float(1.2912720851597E+19) +float(1.2912720851596687E+19) ----------- int(-13) int(-922337203685477580) -float(1.1990383647911E+19) +float(1.1990383647911209E+19) ----------- int(-12) int(-922337203685477580) -float(1.1068046444226E+19) +float(1.1068046444225733E+19) ----------- int(-11) int(-922337203685477580) -float(1.014570924054E+19) +float(1.0145709240540254E+19) ----------- int(-10) int(-922337203685477580) @@ -124,25 +124,25 @@ int(9223372036854775800) ----------- int(11) int(922337203685477580) -float(1.014570924054E+19) +float(1.0145709240540254E+19) ----------- int(12) int(922337203685477580) -float(1.1068046444226E+19) +float(1.1068046444225733E+19) ----------- int(13) int(922337203685477580) -float(1.1990383647911E+19) +float(1.1990383647911209E+19) ----------- int(14) int(922337203685477580) -float(1.2912720851597E+19) +float(1.2912720851596687E+19) ----------- int(15) int(922337203685477580) -float(1.3835058055282E+19) +float(1.3835058055282164E+19) ----------- int(16) int(922337203685477580) -float(1.4757395258968E+19) +float(1.4757395258967642E+19) ----------- diff --git a/Zend/tests/zend_signed_multiply-64bit.phpt b/Zend/tests/zend_signed_multiply-64bit.phpt index 20ef277770c16..615c67b9669a8 100644 --- a/Zend/tests/zend_signed_multiply-64bit.phpt +++ b/Zend/tests/zend_signed_multiply-64bit.phpt @@ -11,4 +11,4 @@ var_dump(0x80000001 * -0xffffffff); --EXPECT-- int(-9223372034707292160) int(9223372036854775806) -float(-9.2233720390023E+18) +float(-9.22337203900226E+18) diff --git a/Zend/tests/zend_strtod.phpt b/Zend/tests/zend_strtod.phpt index 4530ce2e8ce5c..af7b612844c84 100644 --- a/Zend/tests/zend_strtod.phpt +++ b/Zend/tests/zend_strtod.phpt @@ -14,6 +14,6 @@ echo "Done\n"; --EXPECT-- float(-100) float(808792757210) -float(-4.5646456464565E+27) -float(-1.1276204760067E+16) +float(-4.5646456464564635E+27) +float(-11276204760067310) Done diff --git a/ext/exif/tests/float_cast_overflow.phpt b/ext/exif/tests/float_cast_overflow.phpt index 112191437dcae..8f5893eb91052 100644 --- a/ext/exif/tests/float_cast_overflow.phpt +++ b/ext/exif/tests/float_cast_overflow.phpt @@ -38,6 +38,6 @@ array(8) { ["ImageWidth"]=> int(1) ["ImageLength"]=> - float(-2.5961487387524E+33) + float(-2.5961487387524236E+33) } } diff --git a/ext/json/tests/008.phpt b/ext/json/tests/008.phpt index f2354d381f7ed..6cfd91b89ce3c 100644 --- a/ext/json/tests/008.phpt +++ b/ext/json/tests/008.phpt @@ -12,6 +12,6 @@ var_dump($x->largenum); echo "Done\n"; ?> --EXPECT-- -float(1.2345678901235E+29) +float(1.2345678901234568E+29) string(30) "123456789012345678901234567890" Done diff --git a/ext/json/tests/bug63737.phpt b/ext/json/tests/bug63737.phpt index 1fb06d485e3fa..c7a60a28c4379 100644 --- a/ext/json/tests/bug63737.phpt +++ b/ext/json/tests/bug63737.phpt @@ -21,12 +21,12 @@ decode('-123456789012345678901234567890.1'); echo "Done\n"; ?> --EXPECT-- -float(1.2345678901235E+29) +float(1.2345678901234568E+29) string(30) "123456789012345678901234567890" -float(-1.2345678901235E+29) +float(-1.2345678901234568E+29) string(31) "-123456789012345678901234567890" -float(1.2345678901235E+29) -float(1.2345678901235E+29) -float(-1.2345678901235E+29) -float(-1.2345678901235E+29) +float(1.2345678901234568E+29) +float(1.2345678901234568E+29) +float(-1.2345678901234568E+29) +float(-1.2345678901234568E+29) Done diff --git a/ext/mysqli/tests/010.phpt b/ext/mysqli/tests/010.phpt index 3b55d0801c714..4da24b680add6 100644 --- a/ext/mysqli/tests/010.phpt +++ b/ext/mysqli/tests/010.phpt @@ -68,12 +68,12 @@ array(7) { [2]=> float(0) [3]=> - float(1.0E+12) + float(1000000000000) [4]=> float(0.564642) [5]=> float(1) [6]=> - float(8.88889E+14) + float(888889000000000) } done! diff --git a/ext/standard/tests/array/001.phpt b/ext/standard/tests/array/001.phpt index 3b9804655b8c8..c88aee367fad7 100644 --- a/ext/standard/tests/array/001.phpt +++ b/ext/standard/tests/array/001.phpt @@ -65,7 +65,7 @@ array(11) { [5]=> string(6) "monkey" [6]=> - float(-0.33333333333333) + float(-0.3333333333333333) [7]=> array(1) { [0]=> @@ -121,7 +121,7 @@ array(2) { int(5) string(6) "monkey" int(6) -float(-0.33333333333333) +float(-0.3333333333333333) int(7) array(1) { [0]=> diff --git a/ext/standard/tests/array/002.phpt b/ext/standard/tests/array/002.phpt index 589514ae03b2a..0f799f396c524 100644 --- a/ext/standard/tests/array/002.phpt +++ b/ext/standard/tests/array/002.phpt @@ -52,7 +52,7 @@ array(8) { [1001]=> string(6) "monkey" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) } -- Testing arsort() -- @@ -78,7 +78,7 @@ array(8) { [0]=> string(3) "PHP" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) } Using SORT_REGULAR: array(8) { @@ -102,7 +102,7 @@ array(8) { [0]=> string(3) "PHP" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) } Using SORT_NUMERIC: array(8) { @@ -126,7 +126,7 @@ array(8) { [0]=> string(3) "PHP" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) } Using SORT_STRING @@ -162,14 +162,14 @@ array(8) { ["test"]=> int(27) [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) } -- Testing asort() -- No second argument: array(8) { [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [0]=> string(3) "PHP" [17]=> @@ -193,7 +193,7 @@ array(8) { Using SORT_REGULAR: array(8) { [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [0]=> string(3) "PHP" [17]=> @@ -217,7 +217,7 @@ array(8) { Using SORT_NUMERIC: array(8) { [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [0]=> string(3) "PHP" [17]=> @@ -251,7 +251,7 @@ Warning: Array to string conversion in %s on line %d Warning: Array to string conversion in %s on line %d array(8) { [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) ["test"]=> int(27) [-1000]=> @@ -277,7 +277,7 @@ array(8) { No second argument: array(8) { [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [1001]=> string(6) "monkey" [1000]=> @@ -301,7 +301,7 @@ array(8) { Using SORT_REGULAR: array(8) { [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [1001]=> string(6) "monkey" [1000]=> @@ -325,7 +325,7 @@ array(8) { Using SORT_NUMERIC: array(8) { [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [1001]=> string(6) "monkey" [1000]=> @@ -355,7 +355,7 @@ array(8) { [17]=> string(27) "PHP: Hypertext Preprocessor" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [1001]=> string(6) "monkey" [1000]=> @@ -394,7 +394,7 @@ array(8) { [1001]=> string(6) "monkey" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) } Using SORT_REGULAR: array(8) { @@ -418,7 +418,7 @@ array(8) { [1001]=> string(6) "monkey" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) } Using SORT_NUMERIC: array(8) { @@ -442,7 +442,7 @@ array(8) { [1001]=> string(6) "monkey" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) } Using SORT_STRING array(8) { @@ -460,7 +460,7 @@ array(8) { [1001]=> string(6) "monkey" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [17]=> string(27) "PHP: Hypertext Preprocessor" [5]=> @@ -492,7 +492,7 @@ array(8) { [6]=> string(3) "PHP" [7]=> - float(-0.33333333333333) + float(-0.3333333333333333) } Using SORT_REGULAR: array(8) { @@ -516,7 +516,7 @@ array(8) { [6]=> string(3) "PHP" [7]=> - float(-0.33333333333333) + float(-0.3333333333333333) } Using SORT_NUMERIC: array(8) { @@ -540,7 +540,7 @@ array(8) { [6]=> string(3) "PHP" [7]=> - float(-0.33333333333333) + float(-0.3333333333333333) } Using SORT_STRING @@ -576,14 +576,14 @@ array(8) { [6]=> int(27) [7]=> - float(-0.33333333333333) + float(-0.3333333333333333) } -- Testing sort() -- No second argument: array(8) { [0]=> - float(-0.33333333333333) + float(-0.3333333333333333) [1]=> string(3) "PHP" [2]=> @@ -607,7 +607,7 @@ array(8) { Using SORT_REGULAR: array(8) { [0]=> - float(-0.33333333333333) + float(-0.3333333333333333) [1]=> string(3) "PHP" [2]=> @@ -631,7 +631,7 @@ array(8) { Using SORT_NUMERIC: array(8) { [0]=> - float(-0.33333333333333) + float(-0.3333333333333333) [1]=> string(3) "PHP" [2]=> @@ -665,7 +665,7 @@ Warning: Array to string conversion in %s on line %d Warning: Array to string conversion in %s on line %d array(8) { [0]=> - float(-0.33333333333333) + float(-0.3333333333333333) [1]=> int(27) [2]=> diff --git a/ext/standard/tests/array/003.phpt b/ext/standard/tests/array/003.phpt index cce2d4922c520..2cea8034bb10c 100644 --- a/ext/standard/tests/array/003.phpt +++ b/ext/standard/tests/array/003.phpt @@ -31,7 +31,7 @@ var_dump ($data); -- Testing uasort() -- array(8) { [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [-1000]=> array(2) { [0]=> @@ -69,7 +69,7 @@ array(8) { [1001]=> string(6) "monkey" [16777216]=> - float(-0.33333333333333) + float(-0.3333333333333333) [17]=> string(27) "PHP: Hypertext Preprocessor" [5]=> @@ -81,7 +81,7 @@ array(8) { -- Testing usort() -- array(8) { [0]=> - float(-0.33333333333333) + float(-0.3333333333333333) [1]=> array(2) { [0]=> diff --git a/ext/standard/tests/array/array_combine_variation5.phpt b/ext/standard/tests/array/array_combine_variation5.phpt index db5c90df34edb..cb399cbc56b68 100644 --- a/ext/standard/tests/array/array_combine_variation5.phpt +++ b/ext/standard/tests/array/array_combine_variation5.phpt @@ -117,7 +117,7 @@ array(4) { ["3.33"]=> float(3.33) ["4.8999992284"]=> - float(4.8999992284) + float(4.89999922839999) ["33333333.333"]=> float(33333333.333) } diff --git a/ext/standard/tests/array/array_diff_assoc_variation6.phpt b/ext/standard/tests/array/array_diff_assoc_variation6.phpt index b4ef6d2304cc3..f66dea6a83e24 100644 --- a/ext/standard/tests/array/array_diff_assoc_variation6.phpt +++ b/ext/standard/tests/array/array_diff_assoc_variation6.phpt @@ -83,7 +83,7 @@ array(2) { [0]=> string(4) "zero" ["two"]=> - float(2) + float(2.00000000000001) } array(3) { [0]=> @@ -97,7 +97,7 @@ array(3) { -- Iteration 2 -- array(1) { ["two"]=> - float(2) + float(2.00000000000001) } array(2) { [2]=> @@ -109,7 +109,7 @@ array(2) { -- Iteration 3 -- array(1) { ["two"]=> - float(2) + float(2.00000000000001) } array(2) { [2]=> @@ -123,7 +123,7 @@ array(2) { [0]=> string(4) "zero" ["two"]=> - float(2) + float(2.00000000000001) } array(2) { [0]=> @@ -137,7 +137,7 @@ array(2) { [0]=> string(4) "zero" ["two"]=> - float(2) + float(2.00000000000001) } array(2) { [2]=> @@ -161,11 +161,11 @@ array(2) { [0]=> string(4) "zero" ["two"]=> - float(2) + float(2.00000000000001) } array(2) { [0]=> - float(2) + float(2.00000000000001) [2]=> float(1.0E-11) } @@ -175,11 +175,11 @@ array(2) { [0]=> string(4) "zero" ["two"]=> - float(2) + float(2.00000000000001) } array(2) { [2]=> - float(2) + float(2.00000000000001) [0]=> float(1.0E-11) } diff --git a/ext/standard/tests/array/array_diff_variation8.phpt b/ext/standard/tests/array/array_diff_variation8.phpt index db06ee647359e..e1ebf548da4ff 100644 --- a/ext/standard/tests/array/array_diff_variation8.phpt +++ b/ext/standard/tests/array/array_diff_variation8.phpt @@ -122,7 +122,7 @@ array(4) { ["f2"]=> float(3.33) [3]=> - float(4.8999992284) + float(4.89999922839999) ["f4"]=> float(1.2) } diff --git a/ext/standard/tests/array/array_map_variation5.phpt b/ext/standard/tests/array/array_map_variation5.phpt index e286095576af9..a8ea43be6dba2 100644 --- a/ext/standard/tests/array/array_map_variation5.phpt +++ b/ext/standard/tests/array/array_map_variation5.phpt @@ -114,7 +114,7 @@ array(4) { ["f2"]=> float(3.33) [3]=> - float(4.8999992284) + float(4.89999922839999) ["f4"]=> float(33333333.3333) } diff --git a/ext/standard/tests/array/array_merge_recursive_variation5.phpt b/ext/standard/tests/array/array_merge_recursive_variation5.phpt index 34cdfe409fe93..6f6da8b58bd34 100644 --- a/ext/standard/tests/array/array_merge_recursive_variation5.phpt +++ b/ext/standard/tests/array/array_merge_recursive_variation5.phpt @@ -199,7 +199,7 @@ array(4) { ["f2"]=> float(3.33) [0]=> - float(4.8999992284) + float(4.89999922839999) ["f4"]=> array(2) { [0]=> @@ -215,7 +215,7 @@ array(8) { ["f2"]=> float(3.33) [0]=> - float(4.8999992284) + float(4.89999922839999) ["f4"]=> array(2) { [0]=> diff --git a/ext/standard/tests/array/array_product_variation3.phpt b/ext/standard/tests/array/array_product_variation3.phpt index 588e46249e748..fe7b64da721ce 100644 --- a/ext/standard/tests/array/array_product_variation3.phpt +++ b/ext/standard/tests/array/array_product_variation3.phpt @@ -43,4 +43,4 @@ int(-24) float(-1.5) -- Testing array_product() function with negative floats -- -float(-9.9999999E+15) +float(-9999999900000000) diff --git a/ext/standard/tests/array/array_reverse_variation5.phpt b/ext/standard/tests/array/array_reverse_variation5.phpt index dbd316ab8a2a2..66255e94c278b 100644 --- a/ext/standard/tests/array/array_reverse_variation5.phpt +++ b/ext/standard/tests/array/array_reverse_variation5.phpt @@ -181,9 +181,9 @@ array(1) { - default argument - array(4) { ["f4"]=> - float(33333333.3333) + float(33333333.333333) [0]=> - float(4.8999992284) + float(4.89999922839999) ["f2"]=> float(3.33) ["f1"]=> @@ -192,9 +192,9 @@ array(4) { - $preserve keys = true - array(4) { ["f4"]=> - float(33333333.3333) + float(33333333.333333) [3]=> - float(4.8999992284) + float(4.89999922839999) ["f2"]=> float(3.33) ["f1"]=> @@ -203,9 +203,9 @@ array(4) { - $preserve_keys = false - array(4) { ["f4"]=> - float(33333333.3333) + float(33333333.333333) [0]=> - float(4.8999992284) + float(4.89999922839999) ["f2"]=> float(3.33) ["f1"]=> diff --git a/ext/standard/tests/array/array_unique_variation4.phpt b/ext/standard/tests/array/array_unique_variation4.phpt index 752ebf54eaf1f..53e73083365b8 100644 --- a/ext/standard/tests/array/array_unique_variation4.phpt +++ b/ext/standard/tests/array/array_unique_variation4.phpt @@ -91,7 +91,7 @@ array(3) { ["f2"]=> float(3.33) [3]=> - float(4.8999992284) + float(4.89999922839999) } -- Iteration 5 -- array(3) { diff --git a/ext/standard/tests/array/array_unshift_variation5.phpt b/ext/standard/tests/array/array_unshift_variation5.phpt index 0cc30648642c9..022a39e5cc794 100644 --- a/ext/standard/tests/array/array_unshift_variation5.phpt +++ b/ext/standard/tests/array/array_unshift_variation5.phpt @@ -209,9 +209,9 @@ array(5) { ["f2"]=> float(3.33) [1]=> - float(4.8999992284) + float(4.89999922839999) ["f4"]=> - float(33333333.3333) + float(33333333.333333) } int(7) array(7) { @@ -226,9 +226,9 @@ array(7) { ["f2"]=> float(3.33) [3]=> - float(4.8999992284) + float(4.89999922839999) ["f4"]=> - float(33333333.3333) + float(33333333.333333) } -- Iteration 7 -- int(5) diff --git a/ext/standard/tests/array/bug35014.phpt b/ext/standard/tests/array/bug35014.phpt index 8980f00d80d88..f1f407081f52d 100644 --- a/ext/standard/tests/array/bug35014.phpt +++ b/ext/standard/tests/array/bug35014.phpt @@ -2,8 +2,6 @@ Bug #35014 (array_product() always returns 0) (32bit) --SKIPIF-- ---INI-- -precision=14 --FILE-- float(1.6) [7]=> - float(1.7) + float(1.7000000000000002) [8]=> float(1.8) [9]=> @@ -371,7 +371,7 @@ array(11) { [6]=> float(1.4) [7]=> - float(1.3) + float(1.2999999999999998) [8]=> float(1.2) [9]=> @@ -395,7 +395,7 @@ array(11) { [6]=> float(1.6) [7]=> - float(1.7) + float(1.7000000000000002) [8]=> float(1.8) [9]=> @@ -419,7 +419,7 @@ array(11) { [6]=> float(1.6) [7]=> - float(1.7) + float(1.7000000000000002) [8]=> float(1.8) [9]=> diff --git a/ext/standard/tests/array/range_variation.phpt b/ext/standard/tests/array/range_variation.phpt index a8c3fc1e0d4eb..e924a2784a040 100644 --- a/ext/standard/tests/array/range_variation.phpt +++ b/ext/standard/tests/array/range_variation.phpt @@ -111,13 +111,13 @@ array(11) { [6]=> float(-4.5555) [7]=> - float(-3.5555) + float(-3.5555000000000003) [8]=> - float(-2.5555) + float(-2.5555000000000003) [9]=> - float(-1.5555) + float(-1.5555000000000003) [10]=> - float(-0.5555) + float(-0.5555000000000003) } -- creating an array with low = '-10.5555' and high = '-10.5555' -- @@ -143,15 +143,15 @@ array(12) { [6]=> float(-4.5555) [7]=> - float(-3.5555) + float(-3.5555000000000003) [8]=> - float(-2.5555) + float(-2.5555000000000003) [9]=> - float(-1.5555) + float(-1.5555000000000003) [10]=> - float(-0.5555) + float(-0.5555000000000003) [11]=> - float(0.4445) + float(0.4444999999999997) } -- creating an array with low = '-10.5555' and high = '' -- @@ -171,13 +171,13 @@ array(11) { [6]=> float(-4.5555) [7]=> - float(-3.5555) + float(-3.5555000000000003) [8]=> - float(-2.5555) + float(-2.5555000000000003) [9]=> - float(-1.5555) + float(-1.5555000000000003) [10]=> - float(-0.5555) + float(-0.5555000000000003) } -- creating an array with low = '-10.5555' and high = '' -- @@ -197,13 +197,13 @@ array(11) { [6]=> float(-4.5555) [7]=> - float(-3.5555) + float(-3.5555000000000003) [8]=> - float(-2.5555) + float(-2.5555000000000003) [9]=> - float(-1.5555) + float(-1.5555000000000003) [10]=> - float(-0.5555) + float(-0.5555000000000003) } -- creating an array with low = '-10.5555' and high = '' -- @@ -223,13 +223,13 @@ array(11) { [6]=> float(-4.5555) [7]=> - float(-3.5555) + float(-3.5555000000000003) [8]=> - float(-2.5555) + float(-2.5555000000000003) [9]=> - float(-1.5555) + float(-1.5555000000000003) [10]=> - float(-0.5555) + float(-0.5555000000000003) } -- creating an array with low = '-10.5555' and high = 'Array' -- @@ -249,15 +249,15 @@ array(12) { [6]=> float(-4.5555) [7]=> - float(-3.5555) + float(-3.5555000000000003) [8]=> - float(-2.5555) + float(-2.5555000000000003) [9]=> - float(-1.5555) + float(-1.5555000000000003) [10]=> - float(-0.5555) + float(-0.5555000000000003) [11]=> - float(0.4445) + float(0.4444999999999997) } -- creating an array with low = '1' and high = 'ABCD' -- diff --git a/ext/standard/tests/general_functions/008.phpt b/ext/standard/tests/general_functions/008.phpt index 1148f777f410e..45ffacbffe06a 100644 --- a/ext/standard/tests/general_functions/008.phpt +++ b/ext/standard/tests/general_functions/008.phpt @@ -34,7 +34,7 @@ array(14) { [11]=> float(123456789012) [12]=> - float(1.23456789012E+12) + float(1234567890123) [13]=> - float(1.23456789012E+19) + float(1.2345678901234567E+19) } diff --git a/ext/standard/tests/general_functions/gettype_settype_variation3.phpt b/ext/standard/tests/general_functions/gettype_settype_variation3.phpt index f17b261437ab3..60c1d76cc6955 100644 --- a/ext/standard/tests/general_functions/gettype_settype_variation3.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_variation3.phpt @@ -4,8 +4,6 @@ Test gettype() & settype() functions : usage variations ---INI-- -precision=14 --FILE-- +--INI-- +serialize_precision=14 --FILE-- --EXPECTF-- -float(3.828168471) +float(3.8281684713331012) float(NAN) -float(3.847562739) +float(3.8475627390640357) float(NAN) -float(3.828168471) -float(3.828168471) -float(3.828168471) -float(3.847562739) -float(3.847562739) -float(7.60090221) +float(3.8281684713331012) +float(3.8281684713331012) +float(3.8281684713331012) +float(3.8475627390640357) +float(3.8475627390640357) +float(7.600902209541989) Notice: A non well formed numeric value encountered in %s on line %d -float(7.60090221) +float(7.600902209541989) float(NAN) float(0) float(NAN) diff --git a/ext/standard/tests/math/asin_variation.phpt b/ext/standard/tests/math/asin_variation.phpt index 7c0e5a37d63b6..c59e43323ef65 100644 --- a/ext/standard/tests/math/asin_variation.phpt +++ b/ext/standard/tests/math/asin_variation.phpt @@ -48,5 +48,5 @@ float(NAN) Notice: A non well formed numeric value encountered in %s on line %d float(NAN) float(0) -float(1.570796327) +float(1.5707963267948966) float(0) diff --git a/ext/standard/tests/math/asinh_basiclong_64bit.phpt b/ext/standard/tests/math/asinh_basiclong_64bit.phpt index db8b7ad03e8fb..dc507c9f50b17 100644 --- a/ext/standard/tests/math/asinh_basiclong_64bit.phpt +++ b/ext/standard/tests/math/asinh_basiclong_64bit.phpt @@ -4,6 +4,8 @@ Test asinh function : 64bit long tests +--INI-- +serialize_precision=14 --FILE-- --EXPECT-- --- testing: 9223372036854775807, 0 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775807, 1 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775807, -1 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775807, 7 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775807, 9 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775807, 65 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775807, -44 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775807, 2147483647 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 9223372036854775807, -2147483648 --- -float(1.5707963270277) +float(1.5707963270277272) --- testing: 9223372036854775807, 9223372036854775807 --- -float(0.78539816339745) +float(0.7853981633974483) --- testing: 9223372036854775807, -9223372036854775808 --- -float(2.3561944901923) +float(2.356194490192345) --- testing: -9223372036854775808, 0 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775808, 1 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775808, -1 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775808, 7 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775808, 9 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775808, 65 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775808, -44 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775808, 2147483647 --- -float(-1.5707963265621) +float(-1.570796326562066) --- testing: -9223372036854775808, -2147483648 --- -float(-1.5707963270277) +float(-1.5707963270277272) --- testing: -9223372036854775808, 9223372036854775807 --- -float(-0.78539816339745) +float(-0.7853981633974483) --- testing: -9223372036854775808, -9223372036854775808 --- -float(-2.3561944901923) +float(-2.356194490192345) --- testing: 2147483647, 0 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 2147483647, 1 --- -float(1.5707963263292) +float(1.5707963263292353) --- testing: 2147483647, -1 --- -float(1.5707963272606) +float(1.5707963272605578) --- testing: 2147483647, 7 --- -float(1.5707963235353) +float(1.5707963235352675) --- testing: 2147483647, 9 --- -float(1.5707963226039) +float(1.570796322603945) --- testing: 2147483647, 65 --- -float(1.5707962965269) +float(1.5707962965269129) --- testing: 2147483647, -44 --- -float(1.570796347284) +float(1.5707963472839932) --- testing: 2147483647, 2147483647 --- -float(0.78539816339745) +float(0.7853981633974483) --- testing: 2147483647, -2147483648 --- -float(2.3561944904252) +float(2.3561944904251755) --- testing: 2147483647, 9223372036854775807 --- -float(2.3283064354545E-10) +float(2.328306435454494E-10) --- testing: 2147483647, -9223372036854775808 --- -float(3.141592653357) +float(3.1415926533569625) --- testing: -2147483648, 0 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -2147483648, 1 --- -float(-1.5707963263292) +float(-1.5707963263292353) --- testing: -2147483648, -1 --- -float(-1.5707963272606) +float(-1.5707963272605578) --- testing: -2147483648, 7 --- -float(-1.5707963235353) +float(-1.5707963235352675) --- testing: -2147483648, 9 --- -float(-1.5707963226039) +float(-1.570796322603945) --- testing: -2147483648, 65 --- -float(-1.5707962965269) +float(-1.5707962965269129) --- testing: -2147483648, -44 --- -float(-1.570796347284) +float(-1.5707963472839932) --- testing: -2147483648, 2147483647 --- -float(-0.78539816363028) +float(-0.7853981636302789) --- testing: -2147483648, -2147483648 --- -float(-2.3561944901923) +float(-2.356194490192345) --- testing: -2147483648, 9223372036854775807 --- -float(-2.3283064365387E-10) +float(-2.3283064365386963E-10) --- testing: -2147483648, -9223372036854775808 --- -float(-3.141592653357) +float(-3.1415926533569625) --- testing: 9223372034707292160, 0 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372034707292160, 1 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372034707292160, -1 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372034707292160, 7 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372034707292160, 9 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372034707292160, 65 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372034707292160, -44 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372034707292160, 2147483647 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 9223372034707292160, -2147483648 --- -float(1.5707963270277) +float(1.5707963270277272) --- testing: 9223372034707292160, 9223372036854775807 --- -float(0.78539816328103) +float(0.785398163281033) --- testing: 9223372034707292160, -9223372036854775808 --- -float(2.3561944903088) +float(2.35619449030876) --- testing: -9223372034707292160, 0 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372034707292160, 1 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372034707292160, -1 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372034707292160, 7 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372034707292160, 9 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372034707292160, 65 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372034707292160, -44 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372034707292160, 2147483647 --- -float(-1.5707963265621) +float(-1.570796326562066) --- testing: -9223372034707292160, -2147483648 --- -float(-1.5707963270277) +float(-1.5707963270277272) --- testing: -9223372034707292160, 9223372036854775807 --- -float(-0.78539816328103) +float(-0.785398163281033) --- testing: -9223372034707292160, -9223372036854775808 --- -float(-2.3561944903088) +float(-2.35619449030876) --- testing: 2147483648, 0 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 2147483648, 1 --- -float(1.5707963263292) +float(1.5707963263292353) --- testing: 2147483648, -1 --- -float(1.5707963272606) +float(1.5707963272605578) --- testing: 2147483648, 7 --- -float(1.5707963235353) +float(1.5707963235352675) --- testing: 2147483648, 9 --- -float(1.5707963226039) +float(1.570796322603945) --- testing: 2147483648, 65 --- -float(1.5707962965269) +float(1.5707962965269129) --- testing: 2147483648, -44 --- -float(1.570796347284) +float(1.5707963472839932) --- testing: 2147483648, 2147483647 --- -float(0.78539816363028) +float(0.7853981636302789) --- testing: 2147483648, -2147483648 --- -float(2.3561944901923) +float(2.356194490192345) --- testing: 2147483648, 9223372036854775807 --- -float(2.3283064365387E-10) +float(2.3283064365386963E-10) --- testing: 2147483648, -9223372036854775808 --- -float(3.141592653357) +float(3.1415926533569625) --- testing: -2147483649, 0 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -2147483649, 1 --- -float(-1.5707963263292) +float(-1.5707963263292353) --- testing: -2147483649, -1 --- -float(-1.5707963272606) +float(-1.5707963272605578) --- testing: -2147483649, 7 --- -float(-1.5707963235353) +float(-1.5707963235352675) --- testing: -2147483649, 9 --- -float(-1.5707963226039) +float(-1.570796322603945) --- testing: -2147483649, 65 --- -float(-1.5707962965269) +float(-1.5707962965269129) --- testing: -2147483649, -44 --- -float(-1.570796347284) +float(-1.5707963472839932) --- testing: -2147483649, 2147483647 --- -float(-0.78539816386311) +float(-0.7853981638631096) --- testing: -2147483649, -2147483648 --- -float(-2.3561944899595) +float(-2.356194489959514) --- testing: -2147483649, 9223372036854775807 --- -float(-2.3283064376229E-10) +float(-2.3283064376228985E-10) --- testing: -2147483649, -9223372036854775808 --- -float(-3.141592653357) +float(-3.1415926533569625) --- testing: 4294967294, 0 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 4294967294, 1 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 4294967294, -1 --- -float(1.5707963270277) +float(1.5707963270277272) --- testing: 4294967294, 7 --- -float(1.5707963251651) +float(1.570796325165082) --- testing: 4294967294, 9 --- -float(1.5707963246994) +float(1.5707963246994208) --- testing: 4294967294, 65 --- -float(1.5707963116609) +float(1.5707963116609047) --- testing: 4294967294, -44 --- -float(1.5707963370394) +float(1.5707963370394449) --- testing: 4294967294, 2147483647 --- -float(1.1071487177941) +float(1.1071487177940904) --- testing: 4294967294, -2147483648 --- -float(2.034443935982) +float(2.034443935981967) --- testing: 4294967294, 9223372036854775807 --- -float(4.656612870909E-10) +float(4.656612870908988E-10) --- testing: 4294967294, -9223372036854775808 --- -float(3.1415926531241) +float(3.141592653124132) --- testing: 4294967295, 0 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 4294967295, 1 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 4294967295, -1 --- -float(1.5707963270277) +float(1.5707963270277272) --- testing: 4294967295, 7 --- -float(1.5707963251651) +float(1.570796325165082) --- testing: 4294967295, 9 --- -float(1.5707963246994) +float(1.5707963246994208) --- testing: 4294967295, 65 --- -float(1.5707963116609) +float(1.5707963116609047) --- testing: 4294967295, -44 --- -float(1.5707963370394) +float(1.5707963370394449) --- testing: 4294967295, 2147483647 --- -float(1.1071487178872) +float(1.1071487178872228) --- testing: 4294967295, -2147483648 --- -float(2.0344439358888) +float(2.034443935888835) --- testing: 4294967295, 9223372036854775807 --- -float(4.6566128719932E-10) +float(4.6566128719931904E-10) --- testing: 4294967295, -9223372036854775808 --- -float(3.1415926531241) +float(3.141592653124132) --- testing: 4294967293, 0 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 4294967293, 1 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 4294967293, -1 --- -float(1.5707963270277) +float(1.5707963270277272) --- testing: 4294967293, 7 --- -float(1.5707963251651) +float(1.570796325165082) --- testing: 4294967293, 9 --- -float(1.5707963246994) +float(1.5707963246994208) --- testing: 4294967293, 65 --- -float(1.5707963116609) +float(1.5707963116609047) --- testing: 4294967293, -44 --- -float(1.5707963370394) +float(1.5707963370394449) --- testing: 4294967293, 2147483647 --- -float(1.107148717701) +float(1.1071487177009582) --- testing: 4294967293, -2147483648 --- -float(2.0344439360751) +float(2.0344439360750997) --- testing: 4294967293, 9223372036854775807 --- -float(4.6566128698248E-10) +float(4.656612869824786E-10) --- testing: 4294967293, -9223372036854775808 --- -float(3.1415926531241) +float(3.141592653124132) --- testing: 9223372036854775806, 0 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775806, 1 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775806, -1 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775806, 7 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775806, 9 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775806, 65 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775806, -44 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9223372036854775806, 2147483647 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 9223372036854775806, -2147483648 --- -float(1.5707963270277) +float(1.5707963270277272) --- testing: 9223372036854775806, 9223372036854775807 --- -float(0.78539816339745) +float(0.7853981633974483) --- testing: 9223372036854775806, -9223372036854775808 --- -float(2.3561944901923) +float(2.356194490192345) --- testing: 9.2233720368548E+18, 0 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9.2233720368548E+18, 1 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9.2233720368548E+18, -1 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9.2233720368548E+18, 7 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9.2233720368548E+18, 9 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9.2233720368548E+18, 65 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9.2233720368548E+18, -44 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9.2233720368548E+18, 2147483647 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 9.2233720368548E+18, -2147483648 --- -float(1.5707963270277) +float(1.5707963270277272) --- testing: 9.2233720368548E+18, 9223372036854775807 --- -float(0.78539816339745) +float(0.7853981633974483) --- testing: 9.2233720368548E+18, -9223372036854775808 --- -float(2.3561944901923) +float(2.356194490192345) --- testing: -9223372036854775807, 0 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775807, 1 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775807, -1 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775807, 7 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775807, 9 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775807, 65 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775807, -44 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9223372036854775807, 2147483647 --- -float(-1.5707963265621) +float(-1.570796326562066) --- testing: -9223372036854775807, -2147483648 --- -float(-1.5707963270277) +float(-1.5707963270277272) --- testing: -9223372036854775807, 9223372036854775807 --- -float(-0.78539816339745) +float(-0.7853981633974483) --- testing: -9223372036854775807, -9223372036854775808 --- -float(-2.3561944901923) +float(-2.356194490192345) --- testing: -9.2233720368548E+18, 0 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9.2233720368548E+18, 1 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9.2233720368548E+18, -1 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9.2233720368548E+18, 7 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9.2233720368548E+18, 9 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9.2233720368548E+18, 65 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9.2233720368548E+18, -44 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9.2233720368548E+18, 2147483647 --- -float(-1.5707963265621) +float(-1.570796326562066) --- testing: -9.2233720368548E+18, -2147483648 --- -float(-1.5707963270277) +float(-1.5707963270277272) --- testing: -9.2233720368548E+18, 9223372036854775807 --- -float(-0.78539816339745) +float(-0.7853981633974483) --- testing: -9.2233720368548E+18, -9223372036854775808 --- -float(-2.3561944901923) +float(-2.356194490192345) diff --git a/ext/standard/tests/math/atan_basiclong_64bit.phpt b/ext/standard/tests/math/atan_basiclong_64bit.phpt index 2f5945dd2ff40..b7a3d20e8fdd5 100644 --- a/ext/standard/tests/math/atan_basiclong_64bit.phpt +++ b/ext/standard/tests/math/atan_basiclong_64bit.phpt @@ -27,32 +27,32 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: -9223372036854775808 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: 2147483647 --- -float(1.5707963263292) +float(1.5707963263292353) --- testing: -2147483648 --- -float(-1.5707963263292) +float(-1.5707963263292353) --- testing: 9223372034707292160 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: -9223372034707292160 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: 2147483648 --- -float(1.5707963263292) +float(1.5707963263292353) --- testing: -2147483649 --- -float(-1.5707963263292) +float(-1.5707963263292353) --- testing: 4294967294 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 4294967295 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 4294967293 --- -float(1.5707963265621) +float(1.570796326562066) --- testing: 9223372036854775806 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: 9.2233720368548E+18 --- -float(1.5707963267949) +float(1.5707963267948966) --- testing: -9223372036854775807 --- -float(-1.5707963267949) +float(-1.5707963267948966) --- testing: -9.2233720368548E+18 --- -float(-1.5707963267949) +float(-1.5707963267948966) diff --git a/ext/standard/tests/math/atan_variation.phpt b/ext/standard/tests/math/atan_variation.phpt index 409f0b1719af9..619f43248168b 100644 --- a/ext/standard/tests/math/atan_variation.phpt +++ b/ext/standard/tests/math/atan_variation.phpt @@ -34,19 +34,19 @@ for ($i = 0; $i < count($values); $i++) { ?> --EXPECTF-- -float(1.527345431) -float(-1.527345431) -float(1.528178225) -float(-1.528178225) -float(1.527345431) -float(1.527345431) -float(1.527345431) -float(1.528178225) -float(1.528178225) -float(1.569796327) +float(1.5273454314033659) +float(-1.5273454314033659) +float(1.528178224770569) +float(-1.528178224770569) +float(1.5273454314033659) +float(1.5273454314033659) +float(1.5273454314033659) +float(1.528178224770569) +float(1.528178224770569) +float(1.5697963271282298) Notice: A non well formed numeric value encountered in %s on line %d -float(1.569796327) +float(1.5697963271282298) float(0) -float(0.7853981634) +float(0.7853981633974483) float(0) diff --git a/ext/standard/tests/math/bindec_basiclong_64bit.phpt b/ext/standard/tests/math/bindec_basiclong_64bit.phpt index 8b69d6b4c3e56..b4f28a091dbb3 100644 --- a/ext/standard/tests/math/bindec_basiclong_64bit.phpt +++ b/ext/standard/tests/math/bindec_basiclong_64bit.phpt @@ -34,15 +34,15 @@ foreach ($binLongStrs as $strVal) { --- testing: 0111111111111111111111111111111111111111111111111111111111111111 --- int(9223372036854775807) --- testing: 1111111111111111111111111111111111111111111111111111111111111111 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 01111111111111111111111111111111 --- int(2147483647) --- testing: 11111111111111111111111111111111 --- int(4294967295) --- testing: 01111111111111111111111111111111111111111111111111111111111111111 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 11111111111111111111111111111111111111111111111111111111111111111 --- -float(3.6893488147419E+19) +float(3.6893488147419103E+19) --- testing: 011111111111111111111111111111111 --- int(4294967295) --- testing: 111111111111111111111111111111111 --- diff --git a/ext/standard/tests/math/ceil_basiclong_64bit.phpt b/ext/standard/tests/math/ceil_basiclong_64bit.phpt index e1cc4b4dc604f..7cd9511b033a3 100644 --- a/ext/standard/tests/math/ceil_basiclong_64bit.phpt +++ b/ext/standard/tests/math/ceil_basiclong_64bit.phpt @@ -27,17 +27,17 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 2147483647 --- float(2147483647) --- testing: -2147483648 --- float(-2147483648) --- testing: 9223372034707292160 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160 --- -float(-9.2233720347073E+18) +float(-9.223372034707292E+18) --- testing: 2147483648 --- float(2147483648) --- testing: -2147483649 --- @@ -49,10 +49,10 @@ float(4294967295) --- testing: 4294967293 --- float(4294967293) --- testing: 9223372036854775806 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) diff --git a/ext/standard/tests/math/constants_basic.phpt b/ext/standard/tests/math/constants_basic.phpt index f44c6de4ff38e..f08940b2333a9 100644 --- a/ext/standard/tests/math/constants_basic.phpt +++ b/ext/standard/tests/math/constants_basic.phpt @@ -44,22 +44,22 @@ echo "NAN= "; var_dump(NAN); ?> --EXPECT-- -M_E= float(2.718281828459) -M_LOG2E= float(1.442695040889) -M_LOG10E= float(0.43429448190325) -M_LN2= float(0.69314718055995) -M_LN10= float(2.302585092994) -M_PI= float(3.1415926535898) -M_PI_2= float(1.5707963267949) -M_PI_4= float(0.78539816339745) -M_1_PI= float(0.31830988618379) -M_2_PI= float(0.63661977236758) -M_SQRTPI= float(1.7724538509055) -M_2_SQRTPI= float(1.1283791670955) -M_LNPI= float(1.1447298858494) -M_EULER= float(0.57721566490153) -M_SQRT2= float(1.4142135623731) -M_SQRT1_2= float(0.70710678118655) -M_SQRT3= float(1.7320508075689) +M_E= float(2.718281828459045) +M_LOG2E= float(1.4426950408889634) +M_LOG10E= float(0.4342944819032518) +M_LN2= float(0.6931471805599453) +M_LN10= float(2.302585092994046) +M_PI= float(3.141592653589793) +M_PI_2= float(1.5707963267948966) +M_PI_4= float(0.7853981633974483) +M_1_PI= float(0.3183098861837907) +M_2_PI= float(0.6366197723675814) +M_SQRTPI= float(1.772453850905516) +M_2_SQRTPI= float(1.1283791670955126) +M_LNPI= float(1.1447298858494002) +M_EULER= float(0.5772156649015329) +M_SQRT2= float(1.4142135623730951) +M_SQRT1_2= float(0.7071067811865476) +M_SQRT3= float(1.7320508075688772) INF= float(INF) NAN= float(NAN) diff --git a/ext/standard/tests/math/cos_basiclong_64bit.phpt b/ext/standard/tests/math/cos_basiclong_64bit.phpt index c575bd7930519..b132bba7a8ea6 100644 --- a/ext/standard/tests/math/cos_basiclong_64bit.phpt +++ b/ext/standard/tests/math/cos_basiclong_64bit.phpt @@ -4,6 +4,8 @@ Test cos function : 64bit long tests +--INI-- +serialize_precision=14 --FILE-- --EXPECT-- --- testing: 9223372036854775807 --- -float(1.6097821017949E+17) +float(1.6097821017949162E+17) --- testing: -9223372036854775808 --- -float(-1.6097821017949E+17) +float(-1.6097821017949162E+17) --- testing: 2147483647 --- -float(37480660.272886) +float(37480660.27288565) --- testing: -2147483648 --- -float(-37480660.290339) +float(-37480660.29033894) --- testing: 9223372034707292160 --- -float(1.6097821014201E+17) +float(1.6097821014201098E+17) --- testing: -9223372034707292160 --- -float(-1.6097821014201E+17) +float(-1.6097821014201098E+17) --- testing: 2147483648 --- -float(37480660.290339) +float(37480660.29033894) --- testing: -2147483649 --- -float(-37480660.307792) +float(-37480660.30779223) --- testing: 4294967294 --- -float(74961320.545771) +float(74961320.5457713) --- testing: 4294967295 --- -float(74961320.563225) +float(74961320.5632246) --- testing: 4294967293 --- float(74961320.528318) --- testing: 9223372036854775806 --- -float(1.6097821017949E+17) +float(1.6097821017949162E+17) --- testing: 9.2233720368548E+18 --- -float(1.6097821017949E+17) +float(1.6097821017949162E+17) --- testing: -9223372036854775807 --- -float(-1.6097821017949E+17) +float(-1.6097821017949162E+17) --- testing: -9.2233720368548E+18 --- -float(-1.6097821017949E+17) +float(-1.6097821017949162E+17) diff --git a/ext/standard/tests/math/deg2rad_variation.phpt b/ext/standard/tests/math/deg2rad_variation.phpt index 3e344540a22de..8a9874f847e26 100644 --- a/ext/standard/tests/math/deg2rad_variation.phpt +++ b/ext/standard/tests/math/deg2rad_variation.phpt @@ -34,19 +34,19 @@ for ($i = 0; $i < count($values); $i++) { ?> --EXPECTF-- -float(0.401425728) -float(-0.401425728) -float(0.4092797096) -float(-0.4092797096) -float(0.401425728) -float(0.401425728) -float(0.401425728) -float(0.4092797096) -float(0.4092797096) -float(17.45329252) +float(0.40142572795869574) +float(-0.40142572795869574) +float(0.40927970959267024) +float(-0.40927970959267024) +float(0.40142572795869574) +float(0.40142572795869574) +float(0.40142572795869574) +float(0.40927970959267024) +float(0.40927970959267024) +float(17.453292519943293) Notice: A non well formed numeric value encountered in %s on line %d -float(17.45329252) +float(17.453292519943293) float(0) -float(0.01745329252) +float(0.017453292519943295) float(0) diff --git a/ext/standard/tests/math/exp_basic.phpt b/ext/standard/tests/math/exp_basic.phpt index b73889153f468..cf67db2c7a427 100644 --- a/ext/standard/tests/math/exp_basic.phpt +++ b/ext/standard/tests/math/exp_basic.phpt @@ -1,7 +1,7 @@ --TEST-- Test exp() - basic function test for exp() --INI-- -precision=14 +serialize_precision=14 --FILE-- --EXPECT-- -float(3.3333333333333) -float(3.3333333333333) +float(3.3333333333333335) +float(3.3333333333333335) float(-4) float(-4) diff --git a/ext/standard/tests/math/floor_basiclong_64bit.phpt b/ext/standard/tests/math/floor_basiclong_64bit.phpt index 3bc4e6393e331..70c0e9210f7b7 100644 --- a/ext/standard/tests/math/floor_basiclong_64bit.phpt +++ b/ext/standard/tests/math/floor_basiclong_64bit.phpt @@ -27,17 +27,17 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 2147483647 --- float(2147483647) --- testing: -2147483648 --- float(-2147483648) --- testing: 9223372034707292160 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160 --- -float(-9.2233720347073E+18) +float(-9.223372034707292E+18) --- testing: 2147483648 --- float(2147483648) --- testing: -2147483649 --- @@ -49,10 +49,10 @@ float(4294967295) --- testing: 4294967293 --- float(4294967293) --- testing: 9223372036854775806 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) diff --git a/ext/standard/tests/math/fmod_basic.phpt b/ext/standard/tests/math/fmod_basic.phpt index e7b204f54083a..731b76adab13e 100644 --- a/ext/standard/tests/math/fmod_basic.phpt +++ b/ext/standard/tests/math/fmod_basic.phpt @@ -47,7 +47,7 @@ float(4) float(0) float(0) float(0) -float(1.7) +float(1.700000000000018) float(4) float(NAN) float(0) @@ -61,7 +61,7 @@ float(-4) float(-0) float(-0) float(-0) -float(-1.7) +float(-1.700000000000018) float(-4) float(NAN) float(-0) @@ -75,7 +75,7 @@ float(4.5) float(0.5) float(0.5) float(0.5) -float(2.2) +float(2.200000000000018) float(4.5) float(NAN) float(0.5) @@ -89,7 +89,7 @@ float(-4.5) float(-0.5) float(-0.5) float(-0.5) -float(-2.2) +float(-2.200000000000018) float(-4.5) float(NAN) float(-0.5) @@ -103,7 +103,7 @@ float(4) float(0) float(0) float(0) -float(1.7) +float(1.700000000000018) float(4) float(NAN) float(0) @@ -117,7 +117,7 @@ float(4) float(0) float(0) float(0) -float(1.7) +float(1.700000000000018) float(4) float(NAN) float(0) @@ -131,7 +131,7 @@ float(4) float(0) float(0) float(0) -float(1.7) +float(1.700000000000018) float(4) float(NAN) float(0) @@ -145,7 +145,7 @@ float(4.5) float(0.5) float(0.5) float(0.5) -float(2.2) +float(2.200000000000018) float(4.5) float(NAN) float(0.5) @@ -159,7 +159,7 @@ float(4.5) float(0.5) float(0.5) float(0.5) -float(2.2) +float(2.200000000000018) float(4.5) float(NAN) float(0.5) diff --git a/ext/standard/tests/math/fmod_basiclong_64bit.phpt b/ext/standard/tests/math/fmod_basiclong_64bit.phpt index 5ef283689e7cf..a6b830014d66d 100644 --- a/ext/standard/tests/math/fmod_basiclong_64bit.phpt +++ b/ext/standard/tests/math/fmod_basiclong_64bit.phpt @@ -137,9 +137,9 @@ float(1) --- testing: 9223372034707292160, -2147483648 --- float(0) --- testing: 9223372034707292160, 9223372036854775807 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, -9223372036854775808 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, 0 --- float(NAN) --- testing: -9223372034707292160, 1 --- @@ -159,9 +159,9 @@ float(-1) --- testing: -9223372034707292160, -2147483648 --- float(-0) --- testing: -9223372034707292160, 9223372036854775807 --- -float(-9.2233720347073E+18) +float(-9.223372034707292E+18) --- testing: -9223372034707292160, -9223372036854775808 --- -float(-9.2233720347073E+18) +float(-9.223372034707292E+18) --- testing: 2147483648, 0 --- float(NAN) --- testing: 2147483648, 1 --- diff --git a/ext/standard/tests/math/hexdec_basiclong_64bit.phpt b/ext/standard/tests/math/hexdec_basiclong_64bit.phpt index b378b452eb424..af0b448cac019 100644 --- a/ext/standard/tests/math/hexdec_basiclong_64bit.phpt +++ b/ext/standard/tests/math/hexdec_basiclong_64bit.phpt @@ -34,15 +34,15 @@ foreach ($hexLongStrs as $strVal) { --- testing: 7fffffffffffffff --- int(9223372036854775807) --- testing: ffffffffffffffff --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 7fffffff --- int(2147483647) --- testing: ffffffff --- int(4294967295) --- testing: 7ffffffffffffffff --- -float(1.4757395258968E+20) +float(1.4757395258967641E+20) --- testing: ffffffffffffffffff --- -float(4.7223664828696E+21) +float(4.722366482869645E+21) --- testing: 7ffffffff --- int(34359738367) --- testing: fffffffff --- diff --git a/ext/standard/tests/math/hypot_basic.phpt b/ext/standard/tests/math/hypot_basic.phpt index f9e5787f406c3..cc2e73b3cda39 100644 --- a/ext/standard/tests/math/hypot_basic.phpt +++ b/ext/standard/tests/math/hypot_basic.phpt @@ -51,299 +51,299 @@ for ($i = 0; $i < count($valuesy); $i++) { --EXPECTF-- *** Testing hypot() : basic functionality *** -Y:23 X:33 float(40.224370722238) +Y:23 X:33 float(40.22437072223753) -Y:23 X:-33 float(40.224370722238) +Y:23 X:-33 float(40.22437072223753) -Y:23 X:33.45 float(40.594365372549) +Y:23 X:33.45 float(40.594365372548936) -Y:23 X:-33.45 float(40.594365372549) +Y:23 X:-33.45 float(40.594365372548936) -Y:23 X:39 float(45.276925690687) +Y:23 X:39 float(45.27692569068709) -Y:23 X:31 float(38.600518131238) +Y:23 X:31 float(38.600518131237564) -Y:23 X:33 float(40.224370722238) +Y:23 X:33 float(40.22437072223753) -Y:23 X:43.45 float(49.162002603637) +Y:23 X:43.45 float(49.162002603636886) -Y:23 X:1.345e1 float(26.643995571235) +Y:23 X:1.345e1 float(26.64399557123518) Y:23 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(40.224370722238) +float(40.22437072223753) Y:23 X: float(23) -Y:23 X:1 float(23.021728866443) +Y:23 X:1 float(23.021728866442675) Y:23 X: float(23) -Y:-23 X:33 float(40.224370722238) +Y:-23 X:33 float(40.22437072223753) -Y:-23 X:-33 float(40.224370722238) +Y:-23 X:-33 float(40.22437072223753) -Y:-23 X:33.45 float(40.594365372549) +Y:-23 X:33.45 float(40.594365372548936) -Y:-23 X:-33.45 float(40.594365372549) +Y:-23 X:-33.45 float(40.594365372548936) -Y:-23 X:39 float(45.276925690687) +Y:-23 X:39 float(45.27692569068709) -Y:-23 X:31 float(38.600518131238) +Y:-23 X:31 float(38.600518131237564) -Y:-23 X:33 float(40.224370722238) +Y:-23 X:33 float(40.22437072223753) -Y:-23 X:43.45 float(49.162002603637) +Y:-23 X:43.45 float(49.162002603636886) -Y:-23 X:1.345e1 float(26.643995571235) +Y:-23 X:1.345e1 float(26.64399557123518) Y:-23 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(40.224370722238) +float(40.22437072223753) Y:-23 X: float(23) -Y:-23 X:1 float(23.021728866443) +Y:-23 X:1 float(23.021728866442675) Y:-23 X: float(23) -Y:23.45 X:33 float(40.483360779461) +Y:23.45 X:33 float(40.48336077946099) -Y:23.45 X:-33 float(40.483360779461) +Y:23.45 X:-33 float(40.48336077946099) -Y:23.45 X:33.45 float(40.851009779441) +Y:23.45 X:33.45 float(40.85100977944119) -Y:23.45 X:-33.45 float(40.851009779441) +Y:23.45 X:-33.45 float(40.85100977944119) -Y:23.45 X:39 float(45.507169764774) +Y:23.45 X:39 float(45.50716976477443) -Y:23.45 X:31 float(38.870329301409) +Y:23.45 X:31 float(38.87032930140932) -Y:23.45 X:33 float(40.483360779461) +Y:23.45 X:33 float(40.48336077946099) -Y:23.45 X:43.45 float(49.374132903779) +Y:23.45 X:43.45 float(49.37413290377868) -Y:23.45 X:1.345e1 float(27.033405260899) +Y:23.45 X:1.345e1 float(27.033405260898967) Y:23.45 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(40.483360779461) +float(40.48336077946099) Y:23.45 X: float(23.45) -Y:23.45 X:1 float(23.471312276905) +Y:23.45 X:1 float(23.47131227690518) Y:23.45 X: float(23.45) -Y:-23.45 X:33 float(40.483360779461) +Y:-23.45 X:33 float(40.48336077946099) -Y:-23.45 X:-33 float(40.483360779461) +Y:-23.45 X:-33 float(40.48336077946099) -Y:-23.45 X:33.45 float(40.851009779441) +Y:-23.45 X:33.45 float(40.85100977944119) -Y:-23.45 X:-33.45 float(40.851009779441) +Y:-23.45 X:-33.45 float(40.85100977944119) -Y:-23.45 X:39 float(45.507169764774) +Y:-23.45 X:39 float(45.50716976477443) -Y:-23.45 X:31 float(38.870329301409) +Y:-23.45 X:31 float(38.87032930140932) -Y:-23.45 X:33 float(40.483360779461) +Y:-23.45 X:33 float(40.48336077946099) -Y:-23.45 X:43.45 float(49.374132903779) +Y:-23.45 X:43.45 float(49.37413290377868) -Y:-23.45 X:1.345e1 float(27.033405260899) +Y:-23.45 X:1.345e1 float(27.033405260898967) Y:-23.45 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(40.483360779461) +float(40.48336077946099) Y:-23.45 X: float(23.45) -Y:-23.45 X:1 float(23.471312276905) +Y:-23.45 X:1 float(23.47131227690518) Y:-23.45 X: float(23.45) -Y:23 X:33 float(40.224370722238) +Y:23 X:33 float(40.22437072223753) -Y:23 X:-33 float(40.224370722238) +Y:23 X:-33 float(40.22437072223753) -Y:23 X:33.45 float(40.594365372549) +Y:23 X:33.45 float(40.594365372548936) -Y:23 X:-33.45 float(40.594365372549) +Y:23 X:-33.45 float(40.594365372548936) -Y:23 X:39 float(45.276925690687) +Y:23 X:39 float(45.27692569068709) -Y:23 X:31 float(38.600518131238) +Y:23 X:31 float(38.600518131237564) -Y:23 X:33 float(40.224370722238) +Y:23 X:33 float(40.22437072223753) -Y:23 X:43.45 float(49.162002603637) +Y:23 X:43.45 float(49.162002603636886) -Y:23 X:1.345e1 float(26.643995571235) +Y:23 X:1.345e1 float(26.64399557123518) Y:23 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(40.224370722238) +float(40.22437072223753) Y:23 X: float(23) -Y:23 X:1 float(23.021728866443) +Y:23 X:1 float(23.021728866442675) Y:23 X: float(23) -Y:23 X:33 float(40.224370722238) +Y:23 X:33 float(40.22437072223753) -Y:23 X:-33 float(40.224370722238) +Y:23 X:-33 float(40.22437072223753) -Y:23 X:33.45 float(40.594365372549) +Y:23 X:33.45 float(40.594365372548936) -Y:23 X:-33.45 float(40.594365372549) +Y:23 X:-33.45 float(40.594365372548936) -Y:23 X:39 float(45.276925690687) +Y:23 X:39 float(45.27692569068709) -Y:23 X:31 float(38.600518131238) +Y:23 X:31 float(38.600518131237564) -Y:23 X:33 float(40.224370722238) +Y:23 X:33 float(40.22437072223753) -Y:23 X:43.45 float(49.162002603637) +Y:23 X:43.45 float(49.162002603636886) -Y:23 X:1.345e1 float(26.643995571235) +Y:23 X:1.345e1 float(26.64399557123518) Y:23 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(40.224370722238) +float(40.22437072223753) Y:23 X: float(23) -Y:23 X:1 float(23.021728866443) +Y:23 X:1 float(23.021728866442675) Y:23 X: float(23) -Y:23 X:33 float(40.224370722238) +Y:23 X:33 float(40.22437072223753) -Y:23 X:-33 float(40.224370722238) +Y:23 X:-33 float(40.22437072223753) -Y:23 X:33.45 float(40.594365372549) +Y:23 X:33.45 float(40.594365372548936) -Y:23 X:-33.45 float(40.594365372549) +Y:23 X:-33.45 float(40.594365372548936) -Y:23 X:39 float(45.276925690687) +Y:23 X:39 float(45.27692569068709) -Y:23 X:31 float(38.600518131238) +Y:23 X:31 float(38.600518131237564) -Y:23 X:33 float(40.224370722238) +Y:23 X:33 float(40.22437072223753) -Y:23 X:43.45 float(49.162002603637) +Y:23 X:43.45 float(49.162002603636886) -Y:23 X:1.345e1 float(26.643995571235) +Y:23 X:1.345e1 float(26.64399557123518) Y:23 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(40.224370722238) +float(40.22437072223753) Y:23 X: float(23) -Y:23 X:1 float(23.021728866443) +Y:23 X:1 float(23.021728866442675) Y:23 X: float(23) -Y:23.45 X:33 float(40.483360779461) +Y:23.45 X:33 float(40.48336077946099) -Y:23.45 X:-33 float(40.483360779461) +Y:23.45 X:-33 float(40.48336077946099) -Y:23.45 X:33.45 float(40.851009779441) +Y:23.45 X:33.45 float(40.85100977944119) -Y:23.45 X:-33.45 float(40.851009779441) +Y:23.45 X:-33.45 float(40.85100977944119) -Y:23.45 X:39 float(45.507169764774) +Y:23.45 X:39 float(45.50716976477443) -Y:23.45 X:31 float(38.870329301409) +Y:23.45 X:31 float(38.87032930140932) -Y:23.45 X:33 float(40.483360779461) +Y:23.45 X:33 float(40.48336077946099) -Y:23.45 X:43.45 float(49.374132903779) +Y:23.45 X:43.45 float(49.37413290377868) -Y:23.45 X:1.345e1 float(27.033405260899) +Y:23.45 X:1.345e1 float(27.033405260898967) Y:23.45 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(40.483360779461) +float(40.48336077946099) Y:23.45 X: float(23.45) -Y:23.45 X:1 float(23.471312276905) +Y:23.45 X:1 float(23.47131227690518) Y:23.45 X: float(23.45) -Y:2.345e1 X:33 float(40.483360779461) +Y:2.345e1 X:33 float(40.48336077946099) -Y:2.345e1 X:-33 float(40.483360779461) +Y:2.345e1 X:-33 float(40.48336077946099) -Y:2.345e1 X:33.45 float(40.851009779441) +Y:2.345e1 X:33.45 float(40.85100977944119) -Y:2.345e1 X:-33.45 float(40.851009779441) +Y:2.345e1 X:-33.45 float(40.85100977944119) -Y:2.345e1 X:39 float(45.507169764774) +Y:2.345e1 X:39 float(45.50716976477443) -Y:2.345e1 X:31 float(38.870329301409) +Y:2.345e1 X:31 float(38.87032930140932) -Y:2.345e1 X:33 float(40.483360779461) +Y:2.345e1 X:33 float(40.48336077946099) -Y:2.345e1 X:43.45 float(49.374132903779) +Y:2.345e1 X:43.45 float(49.37413290377868) -Y:2.345e1 X:1.345e1 float(27.033405260899) +Y:2.345e1 X:1.345e1 float(27.033405260898967) Y:2.345e1 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(40.483360779461) +float(40.48336077946099) Y:2.345e1 X: float(23.45) -Y:2.345e1 X:1 float(23.471312276905) +Y:2.345e1 X:1 float(23.47131227690518) Y:2.345e1 X: float(23.45) Y:23abc X:33 Notice: A non well formed numeric value encountered in %s on line %d -float(40.224370722238) +float(40.22437072223753) Y:23abc X:-33 Notice: A non well formed numeric value encountered in %s on line %d -float(40.224370722238) +float(40.22437072223753) Y:23abc X:33.45 Notice: A non well formed numeric value encountered in %s on line %d -float(40.594365372549) +float(40.594365372548936) Y:23abc X:-33.45 Notice: A non well formed numeric value encountered in %s on line %d -float(40.594365372549) +float(40.594365372548936) Y:23abc X:39 Notice: A non well formed numeric value encountered in %s on line %d -float(45.276925690687) +float(45.27692569068709) Y:23abc X:31 Notice: A non well formed numeric value encountered in %s on line %d -float(38.600518131238) +float(38.600518131237564) Y:23abc X:33 Notice: A non well formed numeric value encountered in %s on line %d -float(40.224370722238) +float(40.22437072223753) Y:23abc X:43.45 Notice: A non well formed numeric value encountered in %s on line %d -float(49.162002603637) +float(49.162002603636886) Y:23abc X:1.345e1 Notice: A non well formed numeric value encountered in %s on line %d -float(26.643995571235) +float(26.64399557123518) Y:23abc X:33abc Notice: A non well formed numeric value encountered in %s on line %d Notice: A non well formed numeric value encountered in %s on line %d -float(40.224370722238) +float(40.22437072223753) Y:23abc X: Notice: A non well formed numeric value encountered in %s on line %d @@ -351,7 +351,7 @@ float(23) Y:23abc X:1 Notice: A non well formed numeric value encountered in %s on line %d -float(23.021728866443) +float(23.021728866442675) Y:23abc X: Notice: A non well formed numeric value encountered in %s on line %d @@ -385,31 +385,31 @@ Y: X:1 float(1) Y: X: float(0) -Y:1 X:33 float(33.015148038438) +Y:1 X:33 float(33.015148038438355) -Y:1 X:-33 float(33.015148038438) +Y:1 X:-33 float(33.015148038438355) -Y:1 X:33.45 float(33.464944344792) +Y:1 X:33.45 float(33.46494434479161) -Y:1 X:-33.45 float(33.464944344792) +Y:1 X:-33.45 float(33.46494434479161) -Y:1 X:39 float(39.012818406262) +Y:1 X:39 float(39.01281840626232) -Y:1 X:31 float(31.016124838542) +Y:1 X:31 float(31.016124838541646) -Y:1 X:33 float(33.015148038438) +Y:1 X:33 float(33.015148038438355) -Y:1 X:43.45 float(43.461505956421) +Y:1 X:43.45 float(43.461505956420794) -Y:1 X:1.345e1 float(13.487123488721) +Y:1 X:1.345e1 float(13.48712348872064) Y:1 X:33abc Notice: A non well formed numeric value encountered in %s on line %d -float(33.015148038438) +float(33.015148038438355) Y:1 X: float(1) -Y:1 X:1 float(1.4142135623731) +Y:1 X:1 float(1.4142135623730951) Y:1 X: float(1) diff --git a/ext/standard/tests/math/hypot_basiclong_64bit.phpt b/ext/standard/tests/math/hypot_basiclong_64bit.phpt index 1e1ca60996ae5..00ce7226c2f6f 100644 --- a/ext/standard/tests/math/hypot_basiclong_64bit.phpt +++ b/ext/standard/tests/math/hypot_basiclong_64bit.phpt @@ -31,49 +31,49 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807, 0 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807, 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807, -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807, 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807, 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807, 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807, -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807, 2147483647 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807, -2147483648 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807, 9223372036854775807 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: 9223372036854775807, -9223372036854775808 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: -9223372036854775808, 0 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808, 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808, -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808, 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808, 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808, 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808, -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808, 2147483647 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808, -2147483648 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808, 9223372036854775807 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: -9223372036854775808, -9223372036854775808 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: 2147483647, 0 --- float(2147483647) --- testing: 2147483647, 1 --- @@ -85,17 +85,17 @@ float(2147483647) --- testing: 2147483647, 9 --- float(2147483647) --- testing: 2147483647, 65 --- -float(2147483647) +float(2147483647.000001) --- testing: 2147483647, -44 --- -float(2147483647) +float(2147483647.0000005) --- testing: 2147483647, 2147483647 --- -float(3037000498.5618) +float(3037000498.5618362) --- testing: 2147483647, -2147483648 --- -float(3037000499.2689) +float(3037000499.268943) --- testing: 2147483647, 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 2147483647, -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -2147483648, 0 --- float(2147483648) --- testing: -2147483648, 1 --- @@ -107,61 +107,61 @@ float(2147483648) --- testing: -2147483648, 9 --- float(2147483648) --- testing: -2147483648, 65 --- -float(2147483648) +float(2147483648.000001) --- testing: -2147483648, -44 --- -float(2147483648) +float(2147483648.0000005) --- testing: -2147483648, 2147483647 --- -float(3037000499.2689) +float(3037000499.268943) --- testing: -2147483648, -2147483648 --- -float(3037000499.976) +float(3037000499.97605) --- testing: -2147483648, 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -2147483648, -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372034707292160, 0 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, 1 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, -1 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, 7 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, 9 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, 65 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, -44 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, 2147483647 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, -2147483648 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9223372034707292160, 9223372036854775807 --- -float(1.3043817823814E+19) +float(1.3043817823814281E+19) --- testing: 9223372034707292160, -9223372036854775808 --- -float(1.3043817823814E+19) +float(1.3043817823814281E+19) --- testing: -9223372034707292160, 0 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, 1 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, -1 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, 7 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, 9 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, 65 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, -44 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, 2147483647 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, -2147483648 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160, 9223372036854775807 --- -float(1.3043817823814E+19) +float(1.3043817823814281E+19) --- testing: -9223372034707292160, -9223372036854775808 --- -float(1.3043817823814E+19) +float(1.3043817823814281E+19) --- testing: 2147483648, 0 --- float(2147483648) --- testing: 2147483648, 1 --- @@ -173,17 +173,17 @@ float(2147483648) --- testing: 2147483648, 9 --- float(2147483648) --- testing: 2147483648, 65 --- -float(2147483648) +float(2147483648.000001) --- testing: 2147483648, -44 --- -float(2147483648) +float(2147483648.0000005) --- testing: 2147483648, 2147483647 --- -float(3037000499.2689) +float(3037000499.268943) --- testing: 2147483648, -2147483648 --- -float(3037000499.976) +float(3037000499.97605) --- testing: 2147483648, 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 2147483648, -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -2147483649, 0 --- float(2147483649) --- testing: -2147483649, 1 --- @@ -195,17 +195,17 @@ float(2147483649) --- testing: -2147483649, 9 --- float(2147483649) --- testing: -2147483649, 65 --- -float(2147483649) +float(2147483649.000001) --- testing: -2147483649, -44 --- -float(2147483649) +float(2147483649.0000005) --- testing: -2147483649, 2147483647 --- -float(3037000499.976) +float(3037000499.97605) --- testing: -2147483649, -2147483648 --- -float(3037000500.6832) +float(3037000500.6831565) --- testing: -2147483649, 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -2147483649, -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 4294967294, 0 --- float(4294967294) --- testing: 4294967294, 1 --- @@ -217,17 +217,17 @@ float(4294967294) --- testing: 4294967294, 9 --- float(4294967294) --- testing: 4294967294, 65 --- -float(4294967294) +float(4294967294.0000005) --- testing: 4294967294, -44 --- float(4294967294) --- testing: 4294967294, 2147483647 --- -float(4801919415.2612) +float(4801919415.261163) --- testing: 4294967294, -2147483648 --- -float(4801919415.7084) +float(4801919415.708376) --- testing: 4294967294, 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 4294967294, -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 4294967295, 0 --- float(4294967295) --- testing: 4294967295, 1 --- @@ -239,17 +239,17 @@ float(4294967295) --- testing: 4294967295, 9 --- float(4294967295) --- testing: 4294967295, 65 --- -float(4294967295) +float(4294967295.0000005) --- testing: 4294967295, -44 --- float(4294967295) --- testing: 4294967295, 2147483647 --- -float(4801919416.1556) +float(4801919416.155589) --- testing: 4294967295, -2147483648 --- -float(4801919416.6028) +float(4801919416.602803) --- testing: 4294967295, 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 4294967295, -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 4294967293, 0 --- float(4294967293) --- testing: 4294967293, 1 --- @@ -261,102 +261,102 @@ float(4294967293) --- testing: 4294967293, 9 --- float(4294967293) --- testing: 4294967293, 65 --- -float(4294967293) +float(4294967293.0000005) --- testing: 4294967293, -44 --- float(4294967293) --- testing: 4294967293, 2147483647 --- -float(4801919414.3667) +float(4801919414.366735) --- testing: 4294967293, -2147483648 --- -float(4801919414.8139) +float(4801919414.813949) --- testing: 4294967293, 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 4294967293, -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, 0 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, 2147483647 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, -2147483648 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806, 9223372036854775807 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: 9223372036854775806, -9223372036854775808 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: 9.2233720368548E+18, 0 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, 2147483647 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, -2147483648 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, 9223372036854775807 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: 9.2233720368548E+18, -9223372036854775808 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: -9223372036854775807, 0 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807, 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807, -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807, 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807, 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807, 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807, -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807, 2147483647 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807, -2147483648 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807, 9223372036854775807 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: -9223372036854775807, -9223372036854775808 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: -9.2233720368548E+18, 0 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18, 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18, -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18, 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18, 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18, 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18, -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18, 2147483647 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18, -2147483648 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18, 9223372036854775807 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) --- testing: -9.2233720368548E+18, -9223372036854775808 --- -float(1.3043817825333E+19) +float(1.3043817825332783E+19) diff --git a/ext/standard/tests/math/log10_basiclong_64bit.phpt b/ext/standard/tests/math/log10_basiclong_64bit.phpt index ef00d37d02290..eb679a2340fd1 100644 --- a/ext/standard/tests/math/log10_basiclong_64bit.phpt +++ b/ext/standard/tests/math/log10_basiclong_64bit.phpt @@ -27,31 +27,31 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807 --- -float(18.964889726831) +float(18.964889726830815) --- testing: -9223372036854775808 --- float(NAN) --- testing: 2147483647 --- -float(9.3319298653812) +float(9.331929865381182) --- testing: -2147483648 --- float(NAN) --- testing: 9223372034707292160 --- -float(18.96488972673) +float(18.964889726729698) --- testing: -9223372034707292160 --- float(NAN) --- testing: 2147483648 --- -float(9.3319298655834) +float(9.331929865583417) --- testing: -2147483649 --- float(NAN) --- testing: 4294967294 --- -float(9.6329598610452) +float(9.632959861045164) --- testing: 4294967295 --- -float(9.6329598611463) +float(9.632959861146281) --- testing: 4294967293 --- -float(9.632959860944) +float(9.632959860944046) --- testing: 9223372036854775806 --- -float(18.964889726831) +float(18.964889726830815) --- testing: 9.2233720368548E+18 --- -float(18.964889726831) +float(18.964889726830815) --- testing: -9223372036854775807 --- float(NAN) --- testing: -9.2233720368548E+18 --- diff --git a/ext/standard/tests/math/log10_variation.phpt b/ext/standard/tests/math/log10_variation.phpt index e852d82ea916b..e6af00ec2d9c7 100644 --- a/ext/standard/tests/math/log10_variation.phpt +++ b/ext/standard/tests/math/log10_variation.phpt @@ -34,15 +34,15 @@ for ($i = 0; $i < count($values); $i++) { ?> --EXPECTF-- -float(1.361727836) +float(1.3617278360175928) float(NAN) -float(1.370142847) +float(1.3701428470511021) float(NAN) -float(1.361727836) -float(1.361727836) -float(1.361727836) -float(1.370142847) -float(1.370142847) +float(1.3617278360175928) +float(1.3617278360175928) +float(1.3617278360175928) +float(1.3701428470511021) +float(1.3701428470511021) float(3) Notice: A non well formed numeric value encountered in %s on line %d diff --git a/ext/standard/tests/math/log1p_basic.phpt b/ext/standard/tests/math/log1p_basic.phpt index 115deec1d9eb2..9dce971f78cfc 100644 --- a/ext/standard/tests/math/log1p_basic.phpt +++ b/ext/standard/tests/math/log1p_basic.phpt @@ -40,37 +40,37 @@ foreach($values as $value) { LOG1p tests -- log1p 23 -- -float(3.1780538303479) +float(3.1780538303479458) -- log1p -23 -- float(NAN) -- log1p 23.45 -- -float(3.1966302159209) +float(3.196630215920881) -- log1p -23.45 -- float(NAN) -- log1p 23 -- -float(3.1780538303479) +float(3.1780538303479458) -- log1p 23 -- -float(3.1780538303479) +float(3.1780538303479458) -- log1p 23 -- -float(3.1780538303479) +float(3.1780538303479458) -- log1p 23.45 -- -float(3.1966302159209) +float(3.196630215920881) -- log1p 2.345e1 -- -float(3.1966302159209) +float(3.196630215920881) -- log1p -- float(0) -- log1p 1 -- -float(0.69314718055995) +float(0.6931471805599453) -- log1p -- float(0) diff --git a/ext/standard/tests/math/log1p_basiclong_64bit.phpt b/ext/standard/tests/math/log1p_basiclong_64bit.phpt index be6f8aa3a27a3..760b44b19dcf8 100644 --- a/ext/standard/tests/math/log1p_basiclong_64bit.phpt +++ b/ext/standard/tests/math/log1p_basiclong_64bit.phpt @@ -27,31 +27,31 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807 --- -float(43.668272375277) +float(43.66827237527655) --- testing: -9223372036854775808 --- float(NAN) --- testing: 2147483647 --- -float(21.487562597358) +float(21.487562597358306) --- testing: -2147483648 --- float(NAN) --- testing: 9223372034707292160 --- -float(43.668272375044) +float(43.66827237504372) --- testing: -9223372034707292160 --- float(NAN) --- testing: 2147483648 --- -float(21.487562597824) +float(21.487562597823967) --- testing: -2147483649 --- float(NAN) --- testing: 4294967294 --- -float(22.180709777685) +float(22.18070977768542) --- testing: 4294967295 --- -float(22.180709777918) +float(22.18070977791825) --- testing: 4294967293 --- -float(22.180709777453) +float(22.180709777452588) --- testing: 9223372036854775806 --- -float(43.668272375277) +float(43.66827237527655) --- testing: 9.2233720368548E+18 --- -float(43.668272375277) +float(43.66827237527655) --- testing: -9223372036854775807 --- float(NAN) --- testing: -9.2233720368548E+18 --- diff --git a/ext/standard/tests/math/log_basic.phpt b/ext/standard/tests/math/log_basic.phpt index 8ff1c88ccfc3d..84e72bb14d7fc 100644 --- a/ext/standard/tests/math/log_basic.phpt +++ b/ext/standard/tests/math/log_basic.phpt @@ -30,30 +30,30 @@ for ($i = 0; $i < count($values); $i++) { } ?> --EXPECT-- - LOG tests...no base -float(3.1354942159291) +LOG tests...no base +float(3.1354942159291497) float(NAN) -float(3.1548704948923) +float(3.1548704948922883) float(NAN) -float(3.1354942159291) -float(3.1354942159291) -float(3.1354942159291) -float(3.1548704948923) -float(3.1548704948923) +float(3.1354942159291497) +float(3.1354942159291497) +float(3.1354942159291497) +float(3.1548704948922883) +float(3.1548704948922883) float(-INF) float(0) float(-INF) LOG tests...base -float(2.2617809780285) +float(2.2617809780285065) float(NAN) -float(2.275758008814) +float(2.275758008814007) float(NAN) -float(2.2617809780285) -float(2.2617809780285) -float(2.2617809780285) -float(2.275758008814) -float(2.275758008814) +float(2.2617809780285065) +float(2.2617809780285065) +float(2.2617809780285065) +float(2.275758008814007) +float(2.275758008814007) float(-INF) float(0) float(-INF) diff --git a/ext/standard/tests/math/log_basiclong_64bit.phpt b/ext/standard/tests/math/log_basiclong_64bit.phpt index c0598fed8be6b..a26e1ce619b6c 100644 --- a/ext/standard/tests/math/log_basiclong_64bit.phpt +++ b/ext/standard/tests/math/log_basiclong_64bit.phpt @@ -27,31 +27,31 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807 --- -float(43.668272375277) +float(43.66827237527655) --- testing: -9223372036854775808 --- float(NAN) --- testing: 2147483647 --- -float(21.487562596893) +float(21.487562596892644) --- testing: -2147483648 --- float(NAN) --- testing: 9223372034707292160 --- -float(43.668272375044) +float(43.66827237504372) --- testing: -9223372034707292160 --- float(NAN) --- testing: 2147483648 --- -float(21.487562597358) +float(21.487562597358306) --- testing: -2147483649 --- float(NAN) --- testing: 4294967294 --- -float(22.180709777453) +float(22.180709777452588) --- testing: 4294967295 --- -float(22.180709777685) +float(22.18070977768542) --- testing: 4294967293 --- -float(22.18070977722) +float(22.180709777219757) --- testing: 9223372036854775806 --- -float(43.668272375277) +float(43.66827237527655) --- testing: 9.2233720368548E+18 --- -float(43.668272375277) +float(43.66827237527655) --- testing: -9223372036854775807 --- float(NAN) --- testing: -9.2233720368548E+18 --- diff --git a/ext/standard/tests/math/octdec_basiclong_64bit.phpt b/ext/standard/tests/math/octdec_basiclong_64bit.phpt index 4e9d88def652d..06e0dd3929d29 100644 --- a/ext/standard/tests/math/octdec_basiclong_64bit.phpt +++ b/ext/standard/tests/math/octdec_basiclong_64bit.phpt @@ -34,15 +34,15 @@ foreach ($octLongStrs as $strVal) { --- testing: 777777777777777777777 --- int(9223372036854775807) --- testing: 1777777777777777777777 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 17777777777 --- int(2147483647) --- testing: 37777777777 --- int(4294967295) --- testing: 377777777777777777777777 --- -float(2.3611832414348E+21) +float(2.3611832414348226E+21) --- testing: 17777777777777777777777777 --- -float(7.5557863725914E+22) +float(7.555786372591432E+22) --- testing: 377777777777 --- int(34359738367) --- testing: 777777777777 --- diff --git a/ext/standard/tests/math/pow_basiclong_64bit.phpt b/ext/standard/tests/math/pow_basiclong_64bit.phpt index d955edfcf33f0..942a91a2ec3fe 100644 --- a/ext/standard/tests/math/pow_basiclong_64bit.phpt +++ b/ext/standard/tests/math/pow_basiclong_64bit.phpt @@ -35,11 +35,11 @@ int(1) --- testing: 9223372036854775807, 1 --- int(9223372036854775807) --- testing: 9223372036854775807, -1 --- -float(1.0842021724855E-19) +float(1.0842021724855044E-19) --- testing: 9223372036854775807, 7 --- -float(5.6784275335594E+132) +float(5.678427533559429E+132) --- testing: 9223372036854775807, 9 --- -float(4.8306719037716E+170) +float(4.830671903771573E+170) --- testing: 9223372036854775807, 65 --- float(INF) --- testing: 9223372036854775807, -44 --- @@ -57,11 +57,11 @@ int(1) --- testing: -9223372036854775808, 1 --- int(-9223372036854775808) --- testing: -9223372036854775808, -1 --- -float(-1.0842021724855E-19) +float(-1.0842021724855044E-19) --- testing: -9223372036854775808, 7 --- -float(-5.6784275335594E+132) +float(-5.678427533559429E+132) --- testing: -9223372036854775808, 9 --- -float(-4.8306719037716E+170) +float(-4.830671903771573E+170) --- testing: -9223372036854775808, 65 --- float(-INF) --- testing: -9223372036854775808, -44 --- @@ -79,11 +79,11 @@ int(1) --- testing: 2147483647, 1 --- int(2147483647) --- testing: 2147483647, -1 --- -float(4.6566128752458E-10) +float(4.656612875245797E-10) --- testing: 2147483647, 7 --- -float(2.1062458265056E+65) +float(2.1062458265055637E+65) --- testing: 2147483647, 9 --- -float(9.7133444204205E+83) +float(9.713344420420489E+83) --- testing: 2147483647, 65 --- float(INF) --- testing: 2147483647, -44 --- @@ -101,11 +101,11 @@ int(1) --- testing: -2147483648, 1 --- int(-2147483648) --- testing: -2147483648, -1 --- -float(-4.6566128730774E-10) +float(-4.656612873077393E-10) --- testing: -2147483648, 7 --- -float(-2.1062458333711E+65) +float(-2.1062458333711437E+65) --- testing: -2147483648, 9 --- -float(-9.7133444611286E+83) +float(-9.713344461128645E+83) --- testing: -2147483648, 65 --- float(-INF) --- testing: -2147483648, -44 --- @@ -123,11 +123,11 @@ int(1) --- testing: 9223372034707292160, 1 --- int(9223372034707292160) --- testing: 9223372034707292160, -1 --- -float(1.0842021727379E-19) +float(1.08420217273794E-19) --- testing: 9223372034707292160, 7 --- -float(5.6784275243046E+132) +float(5.678427524304645E+132) --- testing: 9223372034707292160, 9 --- -float(4.830671893649E+170) +float(4.830671893649017E+170) --- testing: 9223372034707292160, 65 --- float(INF) --- testing: 9223372034707292160, -44 --- @@ -145,11 +145,11 @@ int(1) --- testing: -9223372034707292160, 1 --- int(-9223372034707292160) --- testing: -9223372034707292160, -1 --- -float(-1.0842021727379E-19) +float(-1.08420217273794E-19) --- testing: -9223372034707292160, 7 --- -float(-5.6784275243046E+132) +float(-5.678427524304645E+132) --- testing: -9223372034707292160, 9 --- -float(-4.830671893649E+170) +float(-4.830671893649017E+170) --- testing: -9223372034707292160, 65 --- float(-INF) --- testing: -9223372034707292160, -44 --- @@ -167,11 +167,11 @@ int(1) --- testing: 2147483648, 1 --- int(2147483648) --- testing: 2147483648, -1 --- -float(4.6566128730774E-10) +float(4.656612873077393E-10) --- testing: 2147483648, 7 --- -float(2.1062458333711E+65) +float(2.1062458333711437E+65) --- testing: 2147483648, 9 --- -float(9.7133444611286E+83) +float(9.713344461128645E+83) --- testing: 2147483648, 65 --- float(INF) --- testing: 2147483648, -44 --- @@ -189,11 +189,11 @@ int(1) --- testing: -2147483649, 1 --- int(-2147483649) --- testing: -2147483649, -1 --- -float(-4.656612870909E-10) +float(-4.656612870908988E-10) --- testing: -2147483649, 7 --- -float(-2.1062458402367E+65) +float(-2.1062458402367238E+65) --- testing: -2147483649, 9 --- -float(-9.7133445018368E+83) +float(-9.713344501836802E+83) --- testing: -2147483649, 65 --- float(-INF) --- testing: -2147483649, -44 --- @@ -211,11 +211,11 @@ int(1) --- testing: 4294967294, 1 --- int(4294967294) --- testing: 4294967294, -1 --- -float(2.3283064376229E-10) +float(2.3283064376228985E-10) --- testing: 4294967294, 7 --- -float(2.6959946579271E+67) +float(2.6959946579271215E+67) --- testing: 4294967294, 9 --- -float(4.9732323432553E+86) +float(4.9732323432552904E+86) --- testing: 4294967294, 65 --- float(INF) --- testing: 4294967294, -44 --- @@ -233,11 +233,11 @@ int(1) --- testing: 4294967295, 1 --- int(4294967295) --- testing: 4294967295, -1 --- -float(2.3283064370808E-10) +float(2.3283064370807974E-10) --- testing: 4294967295, 7 --- -float(2.6959946623211E+67) +float(2.6959946623210928E+67) --- testing: 4294967295, 9 --- -float(4.9732323536766E+86) +float(4.9732323536765784E+86) --- testing: 4294967295, 65 --- float(INF) --- testing: 4294967295, -44 --- @@ -255,11 +255,11 @@ int(1) --- testing: 4294967293, 1 --- int(4294967293) --- testing: 4294967293, -1 --- -float(2.328306438165E-10) +float(2.3283064381649995E-10) --- testing: 4294967293, 7 --- -float(2.6959946535332E+67) +float(2.6959946535331503E+67) --- testing: 4294967293, 9 --- -float(4.973232332834E+86) +float(4.9732323328340023E+86) --- testing: 4294967293, 65 --- float(INF) --- testing: 4294967293, -44 --- @@ -277,11 +277,11 @@ int(1) --- testing: 9223372036854775806, 1 --- int(9223372036854775806) --- testing: 9223372036854775806, -1 --- -float(1.0842021724855E-19) +float(1.0842021724855044E-19) --- testing: 9223372036854775806, 7 --- -float(5.6784275335594E+132) +float(5.678427533559429E+132) --- testing: 9223372036854775806, 9 --- -float(4.8306719037716E+170) +float(4.830671903771573E+170) --- testing: 9223372036854775806, 65 --- float(INF) --- testing: 9223372036854775806, -44 --- @@ -297,13 +297,13 @@ float(0) --- testing: 9.2233720368548E+18, 0 --- float(1) --- testing: 9.2233720368548E+18, 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18, -1 --- -float(1.0842021724855E-19) +float(1.0842021724855044E-19) --- testing: 9.2233720368548E+18, 7 --- -float(5.6784275335594E+132) +float(5.678427533559429E+132) --- testing: 9.2233720368548E+18, 9 --- -float(4.8306719037716E+170) +float(4.830671903771573E+170) --- testing: 9.2233720368548E+18, 65 --- float(INF) --- testing: 9.2233720368548E+18, -44 --- @@ -321,11 +321,11 @@ int(1) --- testing: -9223372036854775807, 1 --- int(-9223372036854775807) --- testing: -9223372036854775807, -1 --- -float(-1.0842021724855E-19) +float(-1.0842021724855044E-19) --- testing: -9223372036854775807, 7 --- -float(-5.6784275335594E+132) +float(-5.678427533559429E+132) --- testing: -9223372036854775807, 9 --- -float(-4.8306719037716E+170) +float(-4.830671903771573E+170) --- testing: -9223372036854775807, 65 --- float(-INF) --- testing: -9223372036854775807, -44 --- @@ -341,13 +341,13 @@ float(0) --- testing: -9.2233720368548E+18, 0 --- float(1) --- testing: -9.2233720368548E+18, 1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18, -1 --- -float(-1.0842021724855E-19) +float(-1.0842021724855044E-19) --- testing: -9.2233720368548E+18, 7 --- -float(-5.6784275335594E+132) +float(-5.678427533559429E+132) --- testing: -9.2233720368548E+18, 9 --- -float(-4.8306719037716E+170) +float(-4.830671903771573E+170) --- testing: -9.2233720368548E+18, 65 --- float(-INF) --- testing: -9.2233720368548E+18, -44 --- diff --git a/ext/standard/tests/math/pow_variation1.phpt b/ext/standard/tests/math/pow_variation1.phpt index e005ced5609be..9c5bd062722ae 100644 --- a/ext/standard/tests/math/pow_variation1.phpt +++ b/ext/standard/tests/math/pow_variation1.phpt @@ -1,7 +1,7 @@ --TEST-- Test pow() function : usage variations - different data types as $base argument --INI-- -precision = 14 +serialize_precision = 14 --SKIPIF-- --EXPECT-- --- testing: 9223372036854775807 --- -float(5.2846029059076E+20) +float(5.2846029059076024E+20) --- testing: -9223372036854775808 --- -float(-5.2846029059076E+20) +float(-5.2846029059076024E+20) --- testing: 2147483647 --- -float(123041749546.46) +float(123041749546.46191) --- testing: -2147483648 --- -float(-123041749603.76) +float(-123041749603.75769) --- testing: 9223372034707292160 --- -float(5.2846029046772E+20) +float(5.284602904677184E+20) --- testing: -9223372034707292160 --- -float(-5.2846029046772E+20) +float(-5.284602904677184E+20) --- testing: 2147483648 --- -float(123041749603.76) +float(123041749603.75769) --- testing: -2147483649 --- -float(-123041749661.05) +float(-123041749661.05348) --- testing: 4294967294 --- -float(246083499092.92) +float(246083499092.92383) --- testing: 4294967295 --- -float(246083499150.22) +float(246083499150.21957) --- testing: 4294967293 --- -float(246083499035.63) +float(246083499035.62805) --- testing: 9223372036854775806 --- -float(5.2846029059076E+20) +float(5.2846029059076024E+20) --- testing: 9.2233720368548E+18 --- -float(5.2846029059076E+20) +float(5.2846029059076024E+20) --- testing: -9223372036854775807 --- -float(-5.2846029059076E+20) +float(-5.2846029059076024E+20) --- testing: -9.2233720368548E+18 --- -float(-5.2846029059076E+20) +float(-5.2846029059076024E+20) diff --git a/ext/standard/tests/math/rad2deg_variation.phpt b/ext/standard/tests/math/rad2deg_variation.phpt index 7144f18b61796..aa2eb325b66f6 100644 --- a/ext/standard/tests/math/rad2deg_variation.phpt +++ b/ext/standard/tests/math/rad2deg_variation.phpt @@ -34,19 +34,19 @@ for ($i = 0; $i < count($values); $i++) { ?> --EXPECTF-- -float(1317.802929) -float(-1317.802929) -float(1343.58603) -float(-1343.58603) -float(1317.802929) -float(1317.802929) -float(1317.802929) -float(1343.58603) -float(1343.58603) -float(57295.77951) +float(1317.8029288008934) +float(-1317.8029288008934) +float(1343.5860295817804) +float(-1343.5860295817804) +float(1317.8029288008934) +float(1317.8029288008934) +float(1317.8029288008934) +float(1343.5860295817804) +float(1343.5860295817804) +float(57295.77951308232) Notice: A non well formed numeric value encountered in %s on line %d -float(57295.77951) +float(57295.77951308232) float(0) -float(57.29577951) +float(57.29577951308232) float(0) diff --git a/ext/standard/tests/math/round_basiclong_64bit.phpt b/ext/standard/tests/math/round_basiclong_64bit.phpt index ee666844949dd..c4ff1faf26261 100644 --- a/ext/standard/tests/math/round_basiclong_64bit.phpt +++ b/ext/standard/tests/math/round_basiclong_64bit.phpt @@ -27,17 +27,17 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 2147483647 --- float(2147483647) --- testing: -2147483648 --- float(-2147483648) --- testing: 9223372034707292160 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: -9223372034707292160 --- -float(-9.2233720347073E+18) +float(-9.223372034707292E+18) --- testing: 2147483648 --- float(2147483648) --- testing: -2147483649 --- @@ -49,10 +49,10 @@ float(4294967295) --- testing: 4294967293 --- float(4294967293) --- testing: 9223372036854775806 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) diff --git a/ext/standard/tests/math/sin_basiclong_64bit.phpt b/ext/standard/tests/math/sin_basiclong_64bit.phpt index 35775d2f0bf58..6eddd1aa8b00c 100644 --- a/ext/standard/tests/math/sin_basiclong_64bit.phpt +++ b/ext/standard/tests/math/sin_basiclong_64bit.phpt @@ -4,6 +4,8 @@ Test sin function : 64bit long tests +--INI-- +serialize_precision=14 --FILE-- --EXPECT-- --- testing: 9223372036854775807 --- -float(3037000499.976) +float(3037000499.97605) --- testing: -9223372036854775808 --- float(NAN) --- testing: 2147483647 --- -float(46340.950001052) +float(46340.950001051984) --- testing: -2147483648 --- float(NAN) --- testing: 9223372034707292160 --- -float(3037000499.6225) +float(3037000499.622496) --- testing: -9223372034707292160 --- float(NAN) --- testing: 2147483648 --- -float(46340.950011842) +float(46340.95001184158) --- testing: -2147483649 --- float(NAN) --- testing: 4294967294 --- -float(65535.999984741) +float(65535.99998474121) --- testing: 4294967295 --- -float(65535.999992371) +float(65535.999992370605) --- testing: 4294967293 --- -float(65535.999977112) +float(65535.99997711182) --- testing: 9223372036854775806 --- -float(3037000499.976) +float(3037000499.97605) --- testing: 9.2233720368548E+18 --- -float(3037000499.976) +float(3037000499.97605) --- testing: -9223372036854775807 --- float(NAN) --- testing: -9.2233720368548E+18 --- diff --git a/ext/standard/tests/math/sqrt_variation.phpt b/ext/standard/tests/math/sqrt_variation.phpt index 75c460db7af42..6166de905c773 100644 --- a/ext/standard/tests/math/sqrt_variation.phpt +++ b/ext/standard/tests/math/sqrt_variation.phpt @@ -36,19 +36,19 @@ for ($i = 0; $i < count($values); $i++) { ?> --EXPECTF-- *** Testing sqrt() : usage variations *** -float(4.7958315233127) +float(4.795831523312719) float(NAN) float(4.8425200051213) float(NAN) -float(4.7958315233127) -float(4.7958315233127) -float(4.7958315233127) +float(4.795831523312719) +float(4.795831523312719) +float(4.795831523312719) float(4.8425200051213) float(4.8425200051213) -float(31.622776601684) +float(31.622776601683793) Notice: A non well formed numeric value encountered in %s on line %d -float(31.622776601684) +float(31.622776601683793) float(0) float(1) float(0) diff --git a/ext/standard/tests/math/tan_basiclong_64bit.phpt b/ext/standard/tests/math/tan_basiclong_64bit.phpt index 29c057ce69350..744185d14bccd 100644 --- a/ext/standard/tests/math/tan_basiclong_64bit.phpt +++ b/ext/standard/tests/math/tan_basiclong_64bit.phpt @@ -1,11 +1,11 @@ --TEST-- Test tan function : 64bit long tests ---INI-- -precision=5 --SKIPIF-- +--INI-- +serialize_precision=5 --FILE-- int(-2) [3]=> - float(3.333333) + float(3.333333000000000101437080957111902534961700439453125) [4]=> string(1) "a" [5]=> @@ -62,7 +62,7 @@ array(7) { [2]=> int(-2) [3]=> - float(3.333333) + float(3.333333000000000101437080957111902534961700439453125) [4]=> string(1) "a" [5]=> diff --git a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt index e9215cf5619a5349ed1c413680508b2a13696fcf..ed9af46097cf0fa89d2226bbcbad0f42da09e6c4 100644 GIT binary patch delta 64 ucmdmHebahE=f*Ax0bTg@>jX3zO*cOk2w>W5FFcD20Gt#F-T(jq diff --git a/ext/standard/tests/serialize/serialization_objects_001.phpt b/ext/standard/tests/serialize/serialization_objects_001.phpt index cb50d5174b95b58aa96a8043404dccab7d5a4f67..7142a290495ca82955f3128e0fafa36ba2d06f15 100644 GIT binary patch delta 43 scmew(^jCO8G3#VQ4(-W~>`t4vvi2~7IGY{WKZ6-SQD;_{{Jc~y08%gw{6}a*G3(}etmhaf&trAke3N}6n8C*7lAo8#1pwun3_$<@ diff --git a/ext/standard/tests/serialize/serialization_objects_002.phpt b/ext/standard/tests/serialize/serialization_objects_002.phpt index 920fd35310704abdd7a18cb4f1232fbeb3dbd2a3..fd71292e8990e2849eb0d4dea4c9cce8baa758b1 100644 GIT binary patch delta 71 zcmX?TF~NGnT<*!4oO+Yza=T65&S|*$F}E}0GMY|q int(10) ["b"]=> - float(12.222) + float(12.2219999999999995310417943983338773250579833984375) ["c"]=> string(6) "string" } diff --git a/ext/standard/tests/strings/pack_float.phpt b/ext/standard/tests/strings/pack_float.phpt index b86c5992990da..11a228d748949 100644 --- a/ext/standard/tests/strings/pack_float.phpt +++ b/ext/standard/tests/strings/pack_float.phpt @@ -189,11 +189,11 @@ array(1) { } array(1) { [1]=> - float(1.0E+16) + float(10000000000000000) } array(1) { [1]=> - float(0.59123470982315) + float(0.591234709823149) } array(1) { [1]=> @@ -201,15 +201,15 @@ array(1) { } array(1) { [1]=> - float(-1.0E+16) + float(-10000000000000000) } array(1) { [1]=> - float(-0.59123470982315) + float(-0.591234709823149) } array(1) { [1]=> - float(-1.2345678901235E+19) + float(-1.2345678901234567E+19) } string(8) "unpack E" array(1) { @@ -218,15 +218,15 @@ array(1) { } array(1) { [1]=> - float(1.0E+16) + float(10000000000000000) } array(1) { [1]=> - float(0.59123470982315) + float(0.591234709823149) } array(1) { [1]=> - float(1.2345678901235E+19) + float(1.2345678901234567E+19) } array(1) { [1]=> @@ -234,15 +234,15 @@ array(1) { } array(1) { [1]=> - float(-1.0E+16) + float(-10000000000000000) } array(1) { [1]=> - float(-0.59123470982315) + float(-0.591234709823149) } array(1) { [1]=> - float(-1.2345678901235E+19) + float(-1.2345678901234567E+19) } string(8) "unpack g" array(1) { @@ -251,15 +251,15 @@ array(1) { } array(1) { [1]=> - float(1.0000000272564E+16) + float(10000000272564224) } array(1) { [1]=> - float(0.59123468399048) + float(0.5912346839904785) } array(1) { [1]=> - float(1.2345679395506E+19) + float(1.2345679395506094E+19) } array(1) { [1]=> @@ -267,15 +267,15 @@ array(1) { } array(1) { [1]=> - float(-1.0000000272564E+16) + float(-10000000272564224) } array(1) { [1]=> - float(-0.59123468399048) + float(-0.5912346839904785) } array(1) { [1]=> - float(-1.2345679395506E+19) + float(-1.2345679395506094E+19) } string(8) "unpack G" array(1) { @@ -284,15 +284,15 @@ array(1) { } array(1) { [1]=> - float(1.0000000272564E+16) + float(10000000272564224) } array(1) { [1]=> - float(0.59123468399048) + float(0.5912346839904785) } array(1) { [1]=> - float(1.2345679395506E+19) + float(1.2345679395506094E+19) } array(1) { [1]=> @@ -300,13 +300,13 @@ array(1) { } array(1) { [1]=> - float(-1.0000000272564E+16) + float(-10000000272564224) } array(1) { [1]=> - float(-0.59123468399048) + float(-0.5912346839904785) } array(1) { [1]=> - float(-1.2345679395506E+19) + float(-1.2345679395506094E+19) } diff --git a/ext/standard/tests/strings/similar_text_basic.phpt b/ext/standard/tests/strings/similar_text_basic.phpt index 20ae4854cea16..1a0b30f891676 100644 --- a/ext/standard/tests/strings/similar_text_basic.phpt +++ b/ext/standard/tests/strings/similar_text_basic.phpt @@ -31,7 +31,7 @@ int(3) int(0) int(1) int(7) -float(54.545454545455) +float(54.54545454545455) float(0) -float(18.181818181818) -float(51.851851851852) +float(18.181818181818183) +float(51.851851851851855) diff --git a/ext/standard/var.c b/ext/standard/var.c index 3f7db8faafd66..dc133dd5ce5eb 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -114,7 +114,7 @@ PHPAPI void php_var_dump(zval *struc, int level) /* {{{ */ php_printf("%sint(" ZEND_LONG_FMT ")\n", COMMON, Z_LVAL_P(struc)); break; case IS_DOUBLE: - php_printf("%sfloat(%.*G)\n", COMMON, (int) EG(precision), Z_DVAL_P(struc)); + php_printf("%sfloat(%.*G)\n", COMMON, (int) PG(serialize_precision), Z_DVAL_P(struc)); break; case IS_STRING: php_printf("%sstring(%zd) \"", COMMON, Z_STRLEN_P(struc)); @@ -295,7 +295,7 @@ PHPAPI void php_debug_zval_dump(zval *struc, int level) /* {{{ */ php_printf("%sint(" ZEND_LONG_FMT ")\n", COMMON, Z_LVAL_P(struc)); break; case IS_DOUBLE: - php_printf("%sfloat(%.*G)\n", COMMON, (int) EG(precision), Z_DVAL_P(struc)); + php_printf("%sfloat(%.*G)\n", COMMON, (int) PG(serialize_precision), Z_DVAL_P(struc)); break; case IS_STRING: php_printf("%sstring(%zd) \"", COMMON, Z_STRLEN_P(struc)); diff --git a/run-tests.php b/run-tests.php index 85252e644eee9..ebcaabba02a5a 100755 --- a/run-tests.php +++ b/run-tests.php @@ -254,6 +254,7 @@ function main() 'auto_append_file=', 'ignore_repeated_errors=0', 'precision=14', + 'serialize_precision=-1', 'memory_limit=128M', 'log_errors_max_len=0', 'opcache.fast_shutdown=0', diff --git a/tests/lang/bug24640.phpt b/tests/lang/bug24640.phpt index 7095fed1fe91e..a8cb438fca711 100644 --- a/tests/lang/bug24640.phpt +++ b/tests/lang/bug24640.phpt @@ -36,22 +36,22 @@ test(1.7e-1000); ?> --EXPECTF-- 1.7000000000000001E+300 -float(1.7E+300) +float(1.7000000000000001E+300) 1.7E+300 1.7E+300 ------ 1.7000000000000001E-300 -float(1.7E-300) +float(1.7000000000000001E-300) 1.7E-300 1.7E-300 ------ 1.7000000000000002E+79 -float(1.7E+79) +float(1.7000000000000002E+79) 1.7E+79 1.7E+79 ------ 1.6999999999999999E-79 -float(1.7E-79) +float(1.6999999999999999E-79) 1.7E-79 1.7E-79 ------ @@ -71,7 +71,7 @@ float(1.7E+81) 1.7E+81 ------ 1.6999999999999999E-81 -float(1.7E-81) +float(1.6999999999999999E-81) 1.7E-81 1.7E-81 ------ @@ -81,7 +81,7 @@ I%s I%s ------ 1.6999810742105611E-319 -float(1.69998107421E-319) +float(1.6999810742105611E-319) 1.69998107421E-319 1.69998107421E-319 ------ @@ -91,7 +91,7 @@ I%s I%s ------ 1.7000798873397294E-320 -float(1.70007988734E-320) +float(1.7000798873397294E-320) 1.70007988734E-320 1.70007988734E-320 ------ @@ -101,7 +101,7 @@ I%s I%s ------ 1.6995858216938881E-321 -float(1.69958582169E-321) +float(1.6995858216938881E-321) 1.69958582169E-321 1.69958582169E-321 ------ diff --git a/tests/lang/operators/add_basiclong_64bit.phpt b/tests/lang/operators/add_basiclong_64bit.phpt index 6e09f49eb9413..2e7a4122436d5 100644 --- a/tests/lang/operators/add_basiclong_64bit.phpt +++ b/tests/lang/operators/add_basiclong_64bit.phpt @@ -41,27 +41,27 @@ foreach ($otherVals as $otherVal) { --- testing: 9223372036854775807 + 0 --- int(9223372036854775807) --- testing: 9223372036854775807 + 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807 + -1 --- int(9223372036854775806) --- testing: 9223372036854775807 + 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807 + 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807 + 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807 + -44 --- int(9223372036854775763) --- testing: 9223372036854775807 + 2147483647 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 9223372036854775807 + 9223372036854775807 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: -9223372036854775808 + 0 --- int(-9223372036854775808) --- testing: -9223372036854775808 + 1 --- int(-9223372036854775807) --- testing: -9223372036854775808 + -1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775808 + 7 --- int(-9223372036854775801) --- testing: -9223372036854775808 + 9 --- @@ -69,7 +69,7 @@ int(-9223372036854775799) --- testing: -9223372036854775808 + 65 --- int(-9223372036854775743) --- testing: -9223372036854775808 + -44 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775808 + 2147483647 --- int(-9223372034707292161) --- testing: -9223372036854775808 + 9223372036854775807 --- @@ -91,7 +91,7 @@ int(2147483603) --- testing: 2147483647 + 2147483647 --- int(4294967294) --- testing: 2147483647 + 9223372036854775807 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: -2147483648 + 0 --- int(-2147483648) --- testing: -2147483648 + 1 --- @@ -127,7 +127,7 @@ int(9223372034707292116) --- testing: 9223372034707292160 + 2147483647 --- int(9223372036854775807) --- testing: 9223372034707292160 + 9223372036854775807 --- -float(1.8446744071562E+19) +float(1.8446744071562068E+19) --- testing: -9223372034707292160 + 0 --- int(-9223372034707292160) --- testing: -9223372034707292160 + 1 --- @@ -163,7 +163,7 @@ int(2147483604) --- testing: 2147483648 + 2147483647 --- int(4294967295) --- testing: 2147483648 + 9223372036854775807 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: -2147483649 + 0 --- int(-2147483649) --- testing: -2147483649 + 1 --- @@ -199,7 +199,7 @@ int(4294967250) --- testing: 4294967294 + 2147483647 --- int(6442450941) --- testing: 4294967294 + 9223372036854775807 --- -float(9.2233720411497E+18) +float(9.223372041149743E+18) --- testing: 4294967295 + 0 --- int(4294967295) --- testing: 4294967295 + 1 --- @@ -217,7 +217,7 @@ int(4294967251) --- testing: 4294967295 + 2147483647 --- int(6442450942) --- testing: 4294967295 + 9223372036854775807 --- -float(9.2233720411497E+18) +float(9.223372041149743E+18) --- testing: 4294967293 + 0 --- int(4294967293) --- testing: 4294967293 + 1 --- @@ -235,7 +235,7 @@ int(4294967249) --- testing: 4294967293 + 2147483647 --- int(6442450940) --- testing: 4294967293 + 9223372036854775807 --- -float(9.2233720411497E+18) +float(9.223372041149743E+18) --- testing: 9223372036854775806 + 0 --- int(9223372036854775806) --- testing: 9223372036854775806 + 1 --- @@ -243,35 +243,35 @@ int(9223372036854775807) --- testing: 9223372036854775806 + -1 --- int(9223372036854775805) --- testing: 9223372036854775806 + 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806 + 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806 + 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806 + -44 --- int(9223372036854775762) --- testing: 9223372036854775806 + 2147483647 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 9223372036854775806 + 9223372036854775807 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 9.2233720368548E+18 + 0 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 + 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 + -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 + 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 + 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 + 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 + -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 + 2147483647 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 9.2233720368548E+18 + 9223372036854775807 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: -9223372036854775807 + 0 --- int(-9223372036854775807) --- testing: -9223372036854775807 + 1 --- @@ -285,27 +285,27 @@ int(-9223372036854775798) --- testing: -9223372036854775807 + 65 --- int(-9223372036854775742) --- testing: -9223372036854775807 + -44 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775807 + 2147483647 --- int(-9223372034707292160) --- testing: -9223372036854775807 + 9223372036854775807 --- int(0) --- testing: -9.2233720368548E+18 + 0 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 + 1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 + -1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 + 7 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 + 9 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 + 65 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 + -44 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 + 2147483647 --- -float(-9.2233720347073E+18) +float(-9.223372034707292E+18) --- testing: -9.2233720368548E+18 + 9223372036854775807 --- float(0) --- testing: 0 + 9223372036854775807 --- @@ -333,13 +333,13 @@ int(4294967293) --- testing: 0 + 9223372036854775806 --- int(9223372036854775806) --- testing: 0 + 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 0 + -9223372036854775807 --- int(-9223372036854775807) --- testing: 0 + -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 1 + 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 1 + -9223372036854775808 --- int(-9223372036854775807) --- testing: 1 + 2147483647 --- @@ -363,15 +363,15 @@ int(4294967294) --- testing: 1 + 9223372036854775806 --- int(9223372036854775807) --- testing: 1 + 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 1 + -9223372036854775807 --- int(-9223372036854775806) --- testing: 1 + -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -1 + 9223372036854775807 --- int(9223372036854775806) --- testing: -1 + -9223372036854775808 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -1 + 2147483647 --- int(2147483646) --- testing: -1 + -2147483648 --- @@ -393,13 +393,13 @@ int(4294967292) --- testing: -1 + 9223372036854775806 --- int(9223372036854775805) --- testing: -1 + 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -1 + -9223372036854775807 --- int(-9223372036854775808) --- testing: -1 + -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 7 + 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 7 + -9223372036854775808 --- int(-9223372036854775801) --- testing: 7 + 2147483647 --- @@ -421,15 +421,15 @@ int(4294967302) --- testing: 7 + 4294967293 --- int(4294967300) --- testing: 7 + 9223372036854775806 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 7 + 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 7 + -9223372036854775807 --- int(-9223372036854775800) --- testing: 7 + -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 9 + 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9 + -9223372036854775808 --- int(-9223372036854775799) --- testing: 9 + 2147483647 --- @@ -451,15 +451,15 @@ int(4294967304) --- testing: 9 + 4294967293 --- int(4294967302) --- testing: 9 + 9223372036854775806 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9 + 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9 + -9223372036854775807 --- int(-9223372036854775798) --- testing: 9 + -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 65 + 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 65 + -9223372036854775808 --- int(-9223372036854775743) --- testing: 65 + 2147483647 --- @@ -481,17 +481,17 @@ int(4294967360) --- testing: 65 + 4294967293 --- int(4294967358) --- testing: 65 + 9223372036854775806 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 65 + 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 65 + -9223372036854775807 --- int(-9223372036854775742) --- testing: 65 + -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -44 + 9223372036854775807 --- int(9223372036854775763) --- testing: -44 + -9223372036854775808 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -44 + 2147483647 --- int(2147483603) --- testing: -44 + -2147483648 --- @@ -513,13 +513,13 @@ int(4294967249) --- testing: -44 + 9223372036854775806 --- int(9223372036854775762) --- testing: -44 + 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -44 + -9223372036854775807 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -44 + -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 2147483647 + 9223372036854775807 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 2147483647 + -9223372036854775808 --- int(-9223372034707292161) --- testing: 2147483647 + 2147483647 --- @@ -541,39 +541,39 @@ int(6442450942) --- testing: 2147483647 + 4294967293 --- int(6442450940) --- testing: 2147483647 + 9223372036854775806 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 2147483647 + 9.2233720368548E+18 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 2147483647 + -9223372036854775807 --- int(-9223372034707292160) --- testing: 2147483647 + -9.2233720368548E+18 --- -float(-9.2233720347073E+18) +float(-9.223372034707292E+18) --- testing: 9223372036854775807 + 9223372036854775807 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 9223372036854775807 + -9223372036854775808 --- int(-1) --- testing: 9223372036854775807 + 2147483647 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 9223372036854775807 + -2147483648 --- int(9223372034707292159) --- testing: 9223372036854775807 + 9223372034707292160 --- -float(1.8446744071562E+19) +float(1.8446744071562068E+19) --- testing: 9223372036854775807 + -9223372034707292160 --- int(2147483647) --- testing: 9223372036854775807 + 2147483648 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 9223372036854775807 + -2147483649 --- int(9223372034707292158) --- testing: 9223372036854775807 + 4294967294 --- -float(9.2233720411497E+18) +float(9.223372041149743E+18) --- testing: 9223372036854775807 + 4294967295 --- -float(9.2233720411497E+18) +float(9.223372041149743E+18) --- testing: 9223372036854775807 + 4294967293 --- -float(9.2233720411497E+18) +float(9.223372041149743E+18) --- testing: 9223372036854775807 + 9223372036854775806 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 9223372036854775807 + 9.2233720368548E+18 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 9223372036854775807 + -9223372036854775807 --- int(0) --- testing: 9223372036854775807 + -9.2233720368548E+18 --- diff --git a/tests/lang/operators/add_variationStr.phpt b/tests/lang/operators/add_variationStr.phpt index cea37a0a26d30..69dd870dcc360 100644 --- a/tests/lang/operators/add_variationStr.phpt +++ b/tests/lang/operators/add_variationStr.phpt @@ -157,7 +157,7 @@ float(115.3) --- testing: '-7.7' + '123abc ' --- float(115.3) --- testing: '-7.7' + '3.4a' --- -float(-4.3) +float(-4.300000000000001) --- testing: '-7.7' + 'a5.9' --- float(-7.7) --- testing: 'abc' + '0' --- @@ -365,7 +365,7 @@ float(-40.6) --- testing: '3.4a' + '1.2' --- float(4.6) --- testing: '3.4a' + '-7.7' --- -float(-4.3) +float(-4.300000000000001) --- testing: '3.4a' + 'abc' --- float(3.4) --- testing: '3.4a' + '123abc' --- diff --git a/tests/lang/operators/divide_basiclong_64bit.phpt b/tests/lang/operators/divide_basiclong_64bit.phpt index d8c0e60dedc0d..358d068843f11 100644 --- a/tests/lang/operators/divide_basiclong_64bit.phpt +++ b/tests/lang/operators/divide_basiclong_64bit.phpt @@ -47,11 +47,11 @@ int(-9223372036854775807) --- testing: 9223372036854775807 / 7 --- int(1317624576693539401) --- testing: 9223372036854775807 / 9 --- -float(1.0248191152061E+18) +float(1.0248191152060861E+18) --- testing: 9223372036854775807 / 65 --- -float(1.4189803133623E+17) +float(1.4189803133622733E+17) --- testing: 9223372036854775807 / -44 --- -float(-2.096220917467E+17) +float(-2.0962209174669946E+17) --- testing: 9223372036854775807 / 2147483647 --- float(4294967298) --- testing: 9223372036854775807 / 9223372036854775807 --- @@ -61,15 +61,15 @@ float(-INF) --- testing: -9223372036854775808 / 1 --- int(-9223372036854775808) --- testing: -9223372036854775808 / -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808 / 7 --- -float(-1.3176245766935E+18) +float(-1.3176245766935393E+18) --- testing: -9223372036854775808 / 9 --- -float(-1.0248191152061E+18) +float(-1.0248191152060861E+18) --- testing: -9223372036854775808 / 65 --- -float(-1.4189803133623E+17) +float(-1.4189803133622733E+17) --- testing: -9223372036854775808 / -44 --- -float(2.096220917467E+17) +float(2.0962209174669946E+17) --- testing: -9223372036854775808 / 2147483647 --- float(-4294967298) --- testing: -9223372036854775808 / 9223372036854775807 --- @@ -81,17 +81,17 @@ int(2147483647) --- testing: 2147483647 / -1 --- int(-2147483647) --- testing: 2147483647 / 7 --- -float(306783378.14286) +float(306783378.14285713) --- testing: 2147483647 / 9 --- -float(238609294.11111) +float(238609294.1111111) --- testing: 2147483647 / 65 --- -float(33038209.953846) +float(33038209.953846153) --- testing: 2147483647 / -44 --- -float(-48806446.522727) +float(-48806446.52272727) --- testing: 2147483647 / 2147483647 --- int(1) --- testing: 2147483647 / 9223372036854775807 --- -float(2.3283064354545E-10) +float(2.328306435454494E-10) --- testing: -2147483648 / 0 --- float(-INF) --- testing: -2147483648 / 1 --- @@ -99,17 +99,17 @@ int(-2147483648) --- testing: -2147483648 / -1 --- int(2147483648) --- testing: -2147483648 / 7 --- -float(-306783378.28571) +float(-306783378.28571427) --- testing: -2147483648 / 9 --- -float(-238609294.22222) +float(-238609294.2222222) --- testing: -2147483648 / 65 --- -float(-33038209.969231) +float(-33038209.96923077) --- testing: -2147483648 / -44 --- -float(48806446.545455) +float(48806446.54545455) --- testing: -2147483648 / 2147483647 --- -float(-1.0000000004657) +float(-1.0000000004656613) --- testing: -2147483648 / 9223372036854775807 --- -float(-2.3283064365387E-10) +float(-2.3283064365386963E-10) --- testing: 9223372034707292160 / 0 --- float(INF) --- testing: 9223372034707292160 / 1 --- @@ -117,17 +117,17 @@ int(9223372034707292160) --- testing: 9223372034707292160 / -1 --- int(-9223372034707292160) --- testing: 9223372034707292160 / 7 --- -float(1.3176245763868E+18) +float(1.317624576386756E+18) --- testing: 9223372034707292160 / 9 --- -float(1.0248191149675E+18) +float(1.0248191149674769E+18) --- testing: 9223372034707292160 / 65 --- -float(1.4189803130319E+17) +float(1.418980313031891E+17) --- testing: 9223372034707292160 / -44 --- -float(-2.0962209169789E+17) +float(-2.09622091697893E+17) --- testing: 9223372034707292160 / 2147483647 --- float(4294967297) --- testing: 9223372034707292160 / 9223372036854775807 --- -float(0.99999999976717) +float(0.9999999997671694) --- testing: -9223372034707292160 / 0 --- float(-INF) --- testing: -9223372034707292160 / 1 --- @@ -135,17 +135,17 @@ int(-9223372034707292160) --- testing: -9223372034707292160 / -1 --- int(9223372034707292160) --- testing: -9223372034707292160 / 7 --- -float(-1.3176245763868E+18) +float(-1.317624576386756E+18) --- testing: -9223372034707292160 / 9 --- -float(-1.0248191149675E+18) +float(-1.0248191149674769E+18) --- testing: -9223372034707292160 / 65 --- -float(-1.4189803130319E+17) +float(-1.418980313031891E+17) --- testing: -9223372034707292160 / -44 --- -float(2.0962209169789E+17) +float(2.09622091697893E+17) --- testing: -9223372034707292160 / 2147483647 --- float(-4294967297) --- testing: -9223372034707292160 / 9223372036854775807 --- -float(-0.99999999976717) +float(-0.9999999997671694) --- testing: 2147483648 / 0 --- float(INF) --- testing: 2147483648 / 1 --- @@ -153,17 +153,17 @@ int(2147483648) --- testing: 2147483648 / -1 --- int(-2147483648) --- testing: 2147483648 / 7 --- -float(306783378.28571) +float(306783378.28571427) --- testing: 2147483648 / 9 --- -float(238609294.22222) +float(238609294.2222222) --- testing: 2147483648 / 65 --- -float(33038209.969231) +float(33038209.96923077) --- testing: 2147483648 / -44 --- -float(-48806446.545455) +float(-48806446.54545455) --- testing: 2147483648 / 2147483647 --- -float(1.0000000004657) +float(1.0000000004656613) --- testing: 2147483648 / 9223372036854775807 --- -float(2.3283064365387E-10) +float(2.3283064365386963E-10) --- testing: -2147483649 / 0 --- float(-INF) --- testing: -2147483649 / 1 --- @@ -171,17 +171,17 @@ int(-2147483649) --- testing: -2147483649 / -1 --- int(2147483649) --- testing: -2147483649 / 7 --- -float(-306783378.42857) +float(-306783378.4285714) --- testing: -2147483649 / 9 --- -float(-238609294.33333) +float(-238609294.33333334) --- testing: -2147483649 / 65 --- -float(-33038209.984615) +float(-33038209.984615386) --- testing: -2147483649 / -44 --- -float(48806446.568182) +float(48806446.56818182) --- testing: -2147483649 / 2147483647 --- -float(-1.0000000009313) +float(-1.0000000009313226) --- testing: -2147483649 / 9223372036854775807 --- -float(-2.3283064376229E-10) +float(-2.3283064376228985E-10) --- testing: 4294967294 / 0 --- float(INF) --- testing: 4294967294 / 1 --- @@ -189,17 +189,17 @@ int(4294967294) --- testing: 4294967294 / -1 --- int(-4294967294) --- testing: 4294967294 / 7 --- -float(613566756.28571) +float(613566756.2857143) --- testing: 4294967294 / 9 --- -float(477218588.22222) +float(477218588.2222222) --- testing: 4294967294 / 65 --- -float(66076419.907692) +float(66076419.907692306) --- testing: 4294967294 / -44 --- -float(-97612893.045455) +float(-97612893.04545455) --- testing: 4294967294 / 2147483647 --- int(2) --- testing: 4294967294 / 9223372036854775807 --- -float(4.656612870909E-10) +float(4.656612870908988E-10) --- testing: 4294967295 / 0 --- float(INF) --- testing: 4294967295 / 1 --- @@ -207,17 +207,17 @@ int(4294967295) --- testing: 4294967295 / -1 --- int(-4294967295) --- testing: 4294967295 / 7 --- -float(613566756.42857) +float(613566756.4285715) --- testing: 4294967295 / 9 --- -float(477218588.33333) +float(477218588.3333333) --- testing: 4294967295 / 65 --- -float(66076419.923077) +float(66076419.92307692) --- testing: 4294967295 / -44 --- -float(-97612893.068182) +float(-97612893.06818181) --- testing: 4294967295 / 2147483647 --- -float(2.0000000004657) +float(2.0000000004656613) --- testing: 4294967295 / 9223372036854775807 --- -float(4.6566128719932E-10) +float(4.6566128719931904E-10) --- testing: 4294967293 / 0 --- float(INF) --- testing: 4294967293 / 1 --- @@ -225,17 +225,17 @@ int(4294967293) --- testing: 4294967293 / -1 --- int(-4294967293) --- testing: 4294967293 / 7 --- -float(613566756.14286) +float(613566756.1428572) --- testing: 4294967293 / 9 --- -float(477218588.11111) +float(477218588.1111111) --- testing: 4294967293 / 65 --- -float(66076419.892308) +float(66076419.89230769) --- testing: 4294967293 / -44 --- -float(-97612893.022727) +float(-97612893.02272727) --- testing: 4294967293 / 2147483647 --- -float(1.9999999995343) +float(1.9999999995343387) --- testing: 4294967293 / 9223372036854775807 --- -float(4.6566128698248E-10) +float(4.656612869824786E-10) --- testing: 9223372036854775806 / 0 --- float(INF) --- testing: 9223372036854775806 / 1 --- @@ -243,13 +243,13 @@ int(9223372036854775806) --- testing: 9223372036854775806 / -1 --- int(-9223372036854775806) --- testing: 9223372036854775806 / 7 --- -float(1.3176245766935E+18) +float(1.3176245766935393E+18) --- testing: 9223372036854775806 / 9 --- -float(1.0248191152061E+18) +float(1.0248191152060861E+18) --- testing: 9223372036854775806 / 65 --- -float(1.4189803133623E+17) +float(1.4189803133622733E+17) --- testing: 9223372036854775806 / -44 --- -float(-2.096220917467E+17) +float(-2.0962209174669946E+17) --- testing: 9223372036854775806 / 2147483647 --- int(4294967298) --- testing: 9223372036854775806 / 9223372036854775807 --- @@ -257,17 +257,17 @@ float(1) --- testing: 9.2233720368548E+18 / 0 --- float(INF) --- testing: 9.2233720368548E+18 / 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 / -1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 9.2233720368548E+18 / 7 --- -float(1.3176245766935E+18) +float(1.3176245766935393E+18) --- testing: 9.2233720368548E+18 / 9 --- -float(1.0248191152061E+18) +float(1.0248191152060861E+18) --- testing: 9.2233720368548E+18 / 65 --- -float(1.4189803133623E+17) +float(1.4189803133622733E+17) --- testing: 9.2233720368548E+18 / -44 --- -float(-2.096220917467E+17) +float(-2.0962209174669946E+17) --- testing: 9.2233720368548E+18 / 2147483647 --- float(4294967298) --- testing: 9.2233720368548E+18 / 9223372036854775807 --- @@ -281,11 +281,11 @@ int(9223372036854775807) --- testing: -9223372036854775807 / 7 --- int(-1317624576693539401) --- testing: -9223372036854775807 / 9 --- -float(-1.0248191152061E+18) +float(-1.0248191152060861E+18) --- testing: -9223372036854775807 / 65 --- -float(-1.4189803133623E+17) +float(-1.4189803133622733E+17) --- testing: -9223372036854775807 / -44 --- -float(2.096220917467E+17) +float(2.0962209174669946E+17) --- testing: -9223372036854775807 / 2147483647 --- float(-4294967298) --- testing: -9223372036854775807 / 9223372036854775807 --- @@ -293,17 +293,17 @@ int(-1) --- testing: -9.2233720368548E+18 / 0 --- float(-INF) --- testing: -9.2233720368548E+18 / 1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 / -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18 / 7 --- -float(-1.3176245766935E+18) +float(-1.3176245766935393E+18) --- testing: -9.2233720368548E+18 / 9 --- -float(-1.0248191152061E+18) +float(-1.0248191152060861E+18) --- testing: -9.2233720368548E+18 / 65 --- -float(-1.4189803133623E+17) +float(-1.4189803133622733E+17) --- testing: -9.2233720368548E+18 / -44 --- -float(2.096220917467E+17) +float(2.0962209174669946E+17) --- testing: -9.2233720368548E+18 / 2147483647 --- float(-4294967298) --- testing: -9.2233720368548E+18 / 9223372036854775807 --- @@ -339,215 +339,215 @@ int(0) --- testing: 0 / -9.2233720368548E+18 --- float(-0) --- testing: 1 / 9223372036854775807 --- -float(1.0842021724855E-19) +float(1.0842021724855044E-19) --- testing: 1 / -9223372036854775808 --- -float(-1.0842021724855E-19) +float(-1.0842021724855044E-19) --- testing: 1 / 2147483647 --- -float(4.6566128752458E-10) +float(4.656612875245797E-10) --- testing: 1 / -2147483648 --- -float(-4.6566128730774E-10) +float(-4.656612873077393E-10) --- testing: 1 / 9223372034707292160 --- -float(1.0842021727379E-19) +float(1.08420217273794E-19) --- testing: 1 / -9223372034707292160 --- -float(-1.0842021727379E-19) +float(-1.08420217273794E-19) --- testing: 1 / 2147483648 --- -float(4.6566128730774E-10) +float(4.656612873077393E-10) --- testing: 1 / -2147483649 --- -float(-4.656612870909E-10) +float(-4.656612870908988E-10) --- testing: 1 / 4294967294 --- -float(2.3283064376229E-10) +float(2.3283064376228985E-10) --- testing: 1 / 4294967295 --- -float(2.3283064370808E-10) +float(2.3283064370807974E-10) --- testing: 1 / 4294967293 --- -float(2.328306438165E-10) +float(2.3283064381649995E-10) --- testing: 1 / 9223372036854775806 --- -float(1.0842021724855E-19) +float(1.0842021724855044E-19) --- testing: 1 / 9.2233720368548E+18 --- -float(1.0842021724855E-19) +float(1.0842021724855044E-19) --- testing: 1 / -9223372036854775807 --- -float(-1.0842021724855E-19) +float(-1.0842021724855044E-19) --- testing: 1 / -9.2233720368548E+18 --- -float(-1.0842021724855E-19) +float(-1.0842021724855044E-19) --- testing: -1 / 9223372036854775807 --- -float(-1.0842021724855E-19) +float(-1.0842021724855044E-19) --- testing: -1 / -9223372036854775808 --- -float(1.0842021724855E-19) +float(1.0842021724855044E-19) --- testing: -1 / 2147483647 --- -float(-4.6566128752458E-10) +float(-4.656612875245797E-10) --- testing: -1 / -2147483648 --- -float(4.6566128730774E-10) +float(4.656612873077393E-10) --- testing: -1 / 9223372034707292160 --- -float(-1.0842021727379E-19) +float(-1.08420217273794E-19) --- testing: -1 / -9223372034707292160 --- -float(1.0842021727379E-19) +float(1.08420217273794E-19) --- testing: -1 / 2147483648 --- -float(-4.6566128730774E-10) +float(-4.656612873077393E-10) --- testing: -1 / -2147483649 --- -float(4.656612870909E-10) +float(4.656612870908988E-10) --- testing: -1 / 4294967294 --- -float(-2.3283064376229E-10) +float(-2.3283064376228985E-10) --- testing: -1 / 4294967295 --- -float(-2.3283064370808E-10) +float(-2.3283064370807974E-10) --- testing: -1 / 4294967293 --- -float(-2.328306438165E-10) +float(-2.3283064381649995E-10) --- testing: -1 / 9223372036854775806 --- -float(-1.0842021724855E-19) +float(-1.0842021724855044E-19) --- testing: -1 / 9.2233720368548E+18 --- -float(-1.0842021724855E-19) +float(-1.0842021724855044E-19) --- testing: -1 / -9223372036854775807 --- -float(1.0842021724855E-19) +float(1.0842021724855044E-19) --- testing: -1 / -9.2233720368548E+18 --- -float(1.0842021724855E-19) +float(1.0842021724855044E-19) --- testing: 7 / 9223372036854775807 --- -float(7.5894152073985E-19) +float(7.589415207398531E-19) --- testing: 7 / -9223372036854775808 --- -float(-7.5894152073985E-19) +float(-7.589415207398531E-19) --- testing: 7 / 2147483647 --- -float(3.2596290126721E-9) +float(3.259629012672058E-9) --- testing: 7 / -2147483648 --- -float(-3.2596290111542E-9) +float(-3.259629011154175E-9) --- testing: 7 / 9223372034707292160 --- -float(7.5894152091656E-19) +float(7.589415209165579E-19) --- testing: 7 / -9223372034707292160 --- -float(-7.5894152091656E-19) +float(-7.589415209165579E-19) --- testing: 7 / 2147483648 --- -float(3.2596290111542E-9) +float(3.259629011154175E-9) --- testing: 7 / -2147483649 --- -float(-3.2596290096363E-9) +float(-3.2596290096362918E-9) --- testing: 7 / 4294967294 --- -float(1.629814506336E-9) +float(1.629814506336029E-9) --- testing: 7 / 4294967295 --- -float(1.6298145059566E-9) +float(1.6298145059565582E-9) --- testing: 7 / 4294967293 --- -float(1.6298145067155E-9) +float(1.6298145067154997E-9) --- testing: 7 / 9223372036854775806 --- -float(7.5894152073985E-19) +float(7.589415207398531E-19) --- testing: 7 / 9.2233720368548E+18 --- -float(7.5894152073985E-19) +float(7.589415207398531E-19) --- testing: 7 / -9223372036854775807 --- -float(-7.5894152073985E-19) +float(-7.589415207398531E-19) --- testing: 7 / -9.2233720368548E+18 --- -float(-7.5894152073985E-19) +float(-7.589415207398531E-19) --- testing: 9 / 9223372036854775807 --- -float(9.7578195523695E-19) +float(9.75781955236954E-19) --- testing: 9 / -9223372036854775808 --- -float(-9.7578195523695E-19) +float(-9.75781955236954E-19) --- testing: 9 / 2147483647 --- -float(4.1909515877212E-9) +float(4.190951587721217E-9) --- testing: 9 / -2147483648 --- -float(-4.1909515857697E-9) +float(-4.190951585769653E-9) --- testing: 9 / 9223372034707292160 --- -float(9.7578195546415E-19) +float(9.75781955464146E-19) --- testing: 9 / -9223372034707292160 --- -float(-9.7578195546415E-19) +float(-9.75781955464146E-19) --- testing: 9 / 2147483648 --- -float(4.1909515857697E-9) +float(4.190951585769653E-9) --- testing: 9 / -2147483649 --- -float(-4.1909515838181E-9) +float(-4.190951583818089E-9) --- testing: 9 / 4294967294 --- -float(2.0954757938606E-9) +float(2.0954757938606086E-9) --- testing: 9 / 4294967295 --- -float(2.0954757933727E-9) +float(2.0954757933727176E-9) --- testing: 9 / 4294967293 --- -float(2.0954757943485E-9) +float(2.0954757943484996E-9) --- testing: 9 / 9223372036854775806 --- -float(9.7578195523695E-19) +float(9.75781955236954E-19) --- testing: 9 / 9.2233720368548E+18 --- -float(9.7578195523695E-19) +float(9.75781955236954E-19) --- testing: 9 / -9223372036854775807 --- -float(-9.7578195523695E-19) +float(-9.75781955236954E-19) --- testing: 9 / -9.2233720368548E+18 --- -float(-9.7578195523695E-19) +float(-9.75781955236954E-19) --- testing: 65 / 9223372036854775807 --- -float(7.0473141211558E-18) +float(7.047314121155779E-18) --- testing: 65 / -9223372036854775808 --- -float(-7.0473141211558E-18) +float(-7.047314121155779E-18) --- testing: 65 / 2147483647 --- -float(3.0267983689098E-8) +float(3.026798368909768E-8) --- testing: 65 / -2147483648 --- -float(-3.0267983675003E-8) +float(-3.026798367500305E-8) --- testing: 65 / 9223372034707292160 --- -float(7.0473141227966E-18) +float(7.04731412279661E-18) --- testing: 65 / -9223372034707292160 --- -float(-7.0473141227966E-18) +float(-7.04731412279661E-18) --- testing: 65 / 2147483648 --- -float(3.0267983675003E-8) +float(3.026798367500305E-8) --- testing: 65 / -2147483649 --- -float(-3.0267983660908E-8) +float(-3.0267983660908424E-8) --- testing: 65 / 4294967294 --- -float(1.5133991844549E-8) +float(1.513399184454884E-8) --- testing: 65 / 4294967295 --- -float(1.5133991841025E-8) +float(1.5133991841025183E-8) --- testing: 65 / 4294967293 --- -float(1.5133991848072E-8) +float(1.5133991848072497E-8) --- testing: 65 / 9223372036854775806 --- -float(7.0473141211558E-18) +float(7.047314121155779E-18) --- testing: 65 / 9.2233720368548E+18 --- -float(7.0473141211558E-18) +float(7.047314121155779E-18) --- testing: 65 / -9223372036854775807 --- -float(-7.0473141211558E-18) +float(-7.047314121155779E-18) --- testing: 65 / -9.2233720368548E+18 --- -float(-7.0473141211558E-18) +float(-7.047314121155779E-18) --- testing: -44 / 9223372036854775807 --- -float(-4.7704895589362E-18) +float(-4.7704895589362195E-18) --- testing: -44 / -9223372036854775808 --- -float(4.7704895589362E-18) +float(4.7704895589362195E-18) --- testing: -44 / 2147483647 --- -float(-2.0489096651082E-8) +float(-2.0489096651081506E-8) --- testing: -44 / -2147483648 --- -float(2.0489096641541E-8) +float(2.0489096641540527E-8) --- testing: -44 / 9223372034707292160 --- -float(-4.7704895600469E-18) +float(-4.770489560046936E-18) --- testing: -44 / -9223372034707292160 --- -float(4.7704895600469E-18) +float(4.770489560046936E-18) --- testing: -44 / 2147483648 --- -float(-2.0489096641541E-8) +float(-2.0489096641540527E-8) --- testing: -44 / -2147483649 --- -float(2.0489096632E-8) +float(2.0489096631999548E-8) --- testing: -44 / 4294967294 --- -float(-1.0244548325541E-8) +float(-1.0244548325540753E-8) --- testing: -44 / 4294967295 --- -float(-1.0244548323156E-8) +float(-1.0244548323155508E-8) --- testing: -44 / 4294967293 --- -float(-1.0244548327926E-8) +float(-1.0244548327925998E-8) --- testing: -44 / 9223372036854775806 --- -float(-4.7704895589362E-18) +float(-4.7704895589362195E-18) --- testing: -44 / 9.2233720368548E+18 --- -float(-4.7704895589362E-18) +float(-4.7704895589362195E-18) --- testing: -44 / -9223372036854775807 --- -float(4.7704895589362E-18) +float(4.7704895589362195E-18) --- testing: -44 / -9.2233720368548E+18 --- -float(4.7704895589362E-18) +float(4.7704895589362195E-18) --- testing: 2147483647 / 9223372036854775807 --- -float(2.3283064354545E-10) +float(2.328306435454494E-10) --- testing: 2147483647 / -9223372036854775808 --- -float(-2.3283064354545E-10) +float(-2.328306435454494E-10) --- testing: 2147483647 / 2147483647 --- int(1) --- testing: 2147483647 / -2147483648 --- -float(-0.99999999953434) +float(-0.9999999995343387) --- testing: 2147483647 / 9223372034707292160 --- -float(2.3283064359966E-10) +float(2.3283064359965952E-10) --- testing: 2147483647 / -9223372034707292160 --- -float(-2.3283064359966E-10) +float(-2.3283064359965952E-10) --- testing: 2147483647 / 2147483648 --- -float(0.99999999953434) +float(0.9999999995343387) --- testing: 2147483647 / -2147483649 --- -float(-0.99999999906868) +float(-0.9999999990686774) --- testing: 2147483647 / 4294967294 --- float(0.5) --- testing: 2147483647 / 4294967295 --- -float(0.49999999988358) +float(0.4999999998835847) --- testing: 2147483647 / 4294967293 --- -float(0.50000000011642) +float(0.5000000001164153) --- testing: 2147483647 / 9223372036854775806 --- -float(2.3283064354545E-10) +float(2.328306435454494E-10) --- testing: 2147483647 / 9.2233720368548E+18 --- -float(2.3283064354545E-10) +float(2.328306435454494E-10) --- testing: 2147483647 / -9223372036854775807 --- -float(-2.3283064354545E-10) +float(-2.328306435454494E-10) --- testing: 2147483647 / -9.2233720368548E+18 --- -float(-2.3283064354545E-10) +float(-2.328306435454494E-10) --- testing: 9223372036854775807 / 9223372036854775807 --- int(1) --- testing: 9223372036854775807 / -9223372036854775808 --- @@ -557,9 +557,9 @@ float(4294967298) --- testing: 9223372036854775807 / -2147483648 --- float(-4294967296) --- testing: 9223372036854775807 / 9223372034707292160 --- -float(1.0000000002328) +float(1.0000000002328306) --- testing: 9223372036854775807 / -9223372034707292160 --- -float(-1.0000000002328) +float(-1.0000000002328306) --- testing: 9223372036854775807 / 2147483648 --- float(4294967296) --- testing: 9223372036854775807 / -2147483649 --- diff --git a/tests/lang/operators/divide_variationStr.phpt b/tests/lang/operators/divide_variationStr.phpt index 3db09e4e95c1d..b3a11591eddef 100644 --- a/tests/lang/operators/divide_variationStr.phpt +++ b/tests/lang/operators/divide_variationStr.phpt @@ -53,111 +53,111 @@ float(INF) --- testing: '65' / '65' --- int(1) --- testing: '65' / '-44' --- -float(-1.4772727272727) +float(-1.4772727272727273) --- testing: '65' / '1.2' --- -float(54.166666666667) +float(54.16666666666667) --- testing: '65' / '-7.7' --- -float(-8.4415584415584) +float(-8.441558441558442) --- testing: '65' / 'abc' --- float(INF) --- testing: '65' / '123abc' --- -float(0.52845528455285) +float(0.5284552845528455) --- testing: '65' / '123e5' --- -float(5.2845528455285E-6) +float(5.2845528455284555E-6) --- testing: '65' / '123e5xyz' --- -float(5.2845528455285E-6) +float(5.2845528455284555E-6) --- testing: '65' / ' 123abc' --- -float(0.52845528455285) +float(0.5284552845528455) --- testing: '65' / '123 abc' --- -float(0.52845528455285) +float(0.5284552845528455) --- testing: '65' / '123abc ' --- -float(0.52845528455285) +float(0.5284552845528455) --- testing: '65' / '3.4a' --- -float(19.117647058824) +float(19.11764705882353) --- testing: '65' / 'a5.9' --- float(INF) --- testing: '-44' / '0' --- float(-INF) --- testing: '-44' / '65' --- -float(-0.67692307692308) +float(-0.676923076923077) --- testing: '-44' / '-44' --- int(1) --- testing: '-44' / '1.2' --- -float(-36.666666666667) +float(-36.66666666666667) --- testing: '-44' / '-7.7' --- -float(5.7142857142857) +float(5.714285714285714) --- testing: '-44' / 'abc' --- float(-INF) --- testing: '-44' / '123abc' --- -float(-0.35772357723577) +float(-0.35772357723577236) --- testing: '-44' / '123e5' --- -float(-3.5772357723577E-6) +float(-3.5772357723577236E-6) --- testing: '-44' / '123e5xyz' --- -float(-3.5772357723577E-6) +float(-3.5772357723577236E-6) --- testing: '-44' / ' 123abc' --- -float(-0.35772357723577) +float(-0.35772357723577236) --- testing: '-44' / '123 abc' --- -float(-0.35772357723577) +float(-0.35772357723577236) --- testing: '-44' / '123abc ' --- -float(-0.35772357723577) +float(-0.35772357723577236) --- testing: '-44' / '3.4a' --- -float(-12.941176470588) +float(-12.941176470588236) --- testing: '-44' / 'a5.9' --- float(-INF) --- testing: '1.2' / '0' --- float(INF) --- testing: '1.2' / '65' --- -float(0.018461538461538) +float(0.01846153846153846) --- testing: '1.2' / '-44' --- -float(-0.027272727272727) +float(-0.02727272727272727) --- testing: '1.2' / '1.2' --- float(1) --- testing: '1.2' / '-7.7' --- -float(-0.15584415584416) +float(-0.15584415584415584) --- testing: '1.2' / 'abc' --- float(INF) --- testing: '1.2' / '123abc' --- -float(0.0097560975609756) +float(0.00975609756097561) --- testing: '1.2' / '123e5' --- -float(9.7560975609756E-8) +float(9.75609756097561E-8) --- testing: '1.2' / '123e5xyz' --- -float(9.7560975609756E-8) +float(9.75609756097561E-8) --- testing: '1.2' / ' 123abc' --- -float(0.0097560975609756) +float(0.00975609756097561) --- testing: '1.2' / '123 abc' --- -float(0.0097560975609756) +float(0.00975609756097561) --- testing: '1.2' / '123abc ' --- -float(0.0097560975609756) +float(0.00975609756097561) --- testing: '1.2' / '3.4a' --- -float(0.35294117647059) +float(0.35294117647058826) --- testing: '1.2' / 'a5.9' --- float(INF) --- testing: '-7.7' / '0' --- float(-INF) --- testing: '-7.7' / '65' --- -float(-0.11846153846154) +float(-0.11846153846153847) --- testing: '-7.7' / '-44' --- -float(0.175) +float(0.17500000000000002) --- testing: '-7.7' / '1.2' --- -float(-6.4166666666667) +float(-6.416666666666667) --- testing: '-7.7' / '-7.7' --- float(1) --- testing: '-7.7' / 'abc' --- float(-INF) --- testing: '-7.7' / '123abc' --- -float(-0.06260162601626) +float(-0.06260162601626017) --- testing: '-7.7' / '123e5' --- -float(-6.260162601626E-7) +float(-6.260162601626017E-7) --- testing: '-7.7' / '123e5xyz' --- -float(-6.260162601626E-7) +float(-6.260162601626017E-7) --- testing: '-7.7' / ' 123abc' --- -float(-0.06260162601626) +float(-0.06260162601626017) --- testing: '-7.7' / '123 abc' --- -float(-0.06260162601626) +float(-0.06260162601626017) --- testing: '-7.7' / '123abc ' --- -float(-0.06260162601626) +float(-0.06260162601626017) --- testing: '-7.7' / '3.4a' --- -float(-2.2647058823529) +float(-2.264705882352941) --- testing: '-7.7' / 'a5.9' --- float(-INF) --- testing: 'abc' / '0' --- @@ -191,13 +191,13 @@ float(NAN) --- testing: '123abc' / '0' --- float(INF) --- testing: '123abc' / '65' --- -float(1.8923076923077) +float(1.8923076923076922) --- testing: '123abc' / '-44' --- -float(-2.7954545454545) +float(-2.7954545454545454) --- testing: '123abc' / '1.2' --- float(102.5) --- testing: '123abc' / '-7.7' --- -float(-15.974025974026) +float(-15.974025974025974) --- testing: '123abc' / 'abc' --- float(INF) --- testing: '123abc' / '123abc' --- @@ -213,19 +213,19 @@ int(1) --- testing: '123abc' / '123abc ' --- int(1) --- testing: '123abc' / '3.4a' --- -float(36.176470588235) +float(36.1764705882353) --- testing: '123abc' / 'a5.9' --- float(INF) --- testing: '123e5' / '0' --- float(INF) --- testing: '123e5' / '65' --- -float(189230.76923077) +float(189230.76923076922) --- testing: '123e5' / '-44' --- -float(-279545.45454545) +float(-279545.45454545453) --- testing: '123e5' / '1.2' --- float(10250000) --- testing: '123e5' / '-7.7' --- -float(-1597402.5974026) +float(-1597402.5974025973) --- testing: '123e5' / 'abc' --- float(INF) --- testing: '123e5' / '123abc' --- @@ -241,19 +241,19 @@ float(100000) --- testing: '123e5' / '123abc ' --- float(100000) --- testing: '123e5' / '3.4a' --- -float(3617647.0588235) +float(3617647.0588235296) --- testing: '123e5' / 'a5.9' --- float(INF) --- testing: '123e5xyz' / '0' --- float(INF) --- testing: '123e5xyz' / '65' --- -float(189230.76923077) +float(189230.76923076922) --- testing: '123e5xyz' / '-44' --- -float(-279545.45454545) +float(-279545.45454545453) --- testing: '123e5xyz' / '1.2' --- float(10250000) --- testing: '123e5xyz' / '-7.7' --- -float(-1597402.5974026) +float(-1597402.5974025973) --- testing: '123e5xyz' / 'abc' --- float(INF) --- testing: '123e5xyz' / '123abc' --- @@ -269,19 +269,19 @@ float(100000) --- testing: '123e5xyz' / '123abc ' --- float(100000) --- testing: '123e5xyz' / '3.4a' --- -float(3617647.0588235) +float(3617647.0588235296) --- testing: '123e5xyz' / 'a5.9' --- float(INF) --- testing: ' 123abc' / '0' --- float(INF) --- testing: ' 123abc' / '65' --- -float(1.8923076923077) +float(1.8923076923076922) --- testing: ' 123abc' / '-44' --- -float(-2.7954545454545) +float(-2.7954545454545454) --- testing: ' 123abc' / '1.2' --- float(102.5) --- testing: ' 123abc' / '-7.7' --- -float(-15.974025974026) +float(-15.974025974025974) --- testing: ' 123abc' / 'abc' --- float(INF) --- testing: ' 123abc' / '123abc' --- @@ -297,19 +297,19 @@ int(1) --- testing: ' 123abc' / '123abc ' --- int(1) --- testing: ' 123abc' / '3.4a' --- -float(36.176470588235) +float(36.1764705882353) --- testing: ' 123abc' / 'a5.9' --- float(INF) --- testing: '123 abc' / '0' --- float(INF) --- testing: '123 abc' / '65' --- -float(1.8923076923077) +float(1.8923076923076922) --- testing: '123 abc' / '-44' --- -float(-2.7954545454545) +float(-2.7954545454545454) --- testing: '123 abc' / '1.2' --- float(102.5) --- testing: '123 abc' / '-7.7' --- -float(-15.974025974026) +float(-15.974025974025974) --- testing: '123 abc' / 'abc' --- float(INF) --- testing: '123 abc' / '123abc' --- @@ -325,19 +325,19 @@ int(1) --- testing: '123 abc' / '123abc ' --- int(1) --- testing: '123 abc' / '3.4a' --- -float(36.176470588235) +float(36.1764705882353) --- testing: '123 abc' / 'a5.9' --- float(INF) --- testing: '123abc ' / '0' --- float(INF) --- testing: '123abc ' / '65' --- -float(1.8923076923077) +float(1.8923076923076922) --- testing: '123abc ' / '-44' --- -float(-2.7954545454545) +float(-2.7954545454545454) --- testing: '123abc ' / '1.2' --- float(102.5) --- testing: '123abc ' / '-7.7' --- -float(-15.974025974026) +float(-15.974025974025974) --- testing: '123abc ' / 'abc' --- float(INF) --- testing: '123abc ' / '123abc' --- @@ -353,33 +353,33 @@ int(1) --- testing: '123abc ' / '123abc ' --- int(1) --- testing: '123abc ' / '3.4a' --- -float(36.176470588235) +float(36.1764705882353) --- testing: '123abc ' / 'a5.9' --- float(INF) --- testing: '3.4a' / '0' --- float(INF) --- testing: '3.4a' / '65' --- -float(0.052307692307692) +float(0.052307692307692305) --- testing: '3.4a' / '-44' --- -float(-0.077272727272727) +float(-0.07727272727272727) --- testing: '3.4a' / '1.2' --- -float(2.8333333333333) +float(2.8333333333333335) --- testing: '3.4a' / '-7.7' --- -float(-0.44155844155844) +float(-0.44155844155844154) --- testing: '3.4a' / 'abc' --- float(INF) --- testing: '3.4a' / '123abc' --- -float(0.027642276422764) +float(0.027642276422764227) --- testing: '3.4a' / '123e5' --- -float(2.7642276422764E-7) +float(2.764227642276423E-7) --- testing: '3.4a' / '123e5xyz' --- -float(2.7642276422764E-7) +float(2.764227642276423E-7) --- testing: '3.4a' / ' 123abc' --- -float(0.027642276422764) +float(0.027642276422764227) --- testing: '3.4a' / '123 abc' --- -float(0.027642276422764) +float(0.027642276422764227) --- testing: '3.4a' / '123abc ' --- -float(0.027642276422764) +float(0.027642276422764227) --- testing: '3.4a' / '3.4a' --- float(1) --- testing: '3.4a' / 'a5.9' --- diff --git a/tests/lang/operators/multiply_basiclong_64bit.phpt b/tests/lang/operators/multiply_basiclong_64bit.phpt index 2fbe530bdc8cc..d57ec28ef12fb 100644 --- a/tests/lang/operators/multiply_basiclong_64bit.phpt +++ b/tests/lang/operators/multiply_basiclong_64bit.phpt @@ -45,35 +45,35 @@ int(9223372036854775807) --- testing: 9223372036854775807 * -1 --- int(-9223372036854775807) --- testing: 9223372036854775807 * 7 --- -float(6.4563604257983E+19) +float(6.456360425798343E+19) --- testing: 9223372036854775807 * 9 --- -float(8.3010348331693E+19) +float(8.301034833169298E+19) --- testing: 9223372036854775807 * 65 --- -float(5.9951918239556E+20) +float(5.995191823955604E+20) --- testing: 9223372036854775807 * -44 --- -float(-4.0582836962161E+20) +float(-4.0582836962161014E+20) --- testing: 9223372036854775807 * 2147483647 --- -float(1.9807040619343E+28) +float(1.9807040619342712E+28) --- testing: 9223372036854775807 * 9223372036854775807 --- -float(8.5070591730235E+37) +float(8.507059173023462E+37) --- testing: -9223372036854775808 * 0 --- int(0) --- testing: -9223372036854775808 * 1 --- int(-9223372036854775808) --- testing: -9223372036854775808 * -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808 * 7 --- -float(-6.4563604257983E+19) +float(-6.456360425798343E+19) --- testing: -9223372036854775808 * 9 --- -float(-8.3010348331693E+19) +float(-8.301034833169298E+19) --- testing: -9223372036854775808 * 65 --- -float(-5.9951918239556E+20) +float(-5.995191823955604E+20) --- testing: -9223372036854775808 * -44 --- -float(4.0582836962161E+20) +float(4.0582836962161014E+20) --- testing: -9223372036854775808 * 2147483647 --- -float(-1.9807040619343E+28) +float(-1.9807040619342712E+28) --- testing: -9223372036854775808 * 9223372036854775807 --- -float(-8.5070591730235E+37) +float(-8.507059173023462E+37) --- testing: 2147483647 * 0 --- int(0) --- testing: 2147483647 * 1 --- @@ -91,7 +91,7 @@ int(-94489280468) --- testing: 2147483647 * 2147483647 --- int(4611686014132420609) --- testing: 2147483647 * 9223372036854775807 --- -float(1.9807040619343E+28) +float(1.9807040619342712E+28) --- testing: -2147483648 * 0 --- int(0) --- testing: -2147483648 * 1 --- @@ -109,7 +109,7 @@ int(94489280512) --- testing: -2147483648 * 2147483647 --- int(-4611686016279904256) --- testing: -2147483648 * 9223372036854775807 --- -float(-1.9807040628566E+28) +float(-1.9807040628566084E+28) --- testing: 9223372034707292160 * 0 --- int(0) --- testing: 9223372034707292160 * 1 --- @@ -117,17 +117,17 @@ int(9223372034707292160) --- testing: 9223372034707292160 * -1 --- int(-9223372034707292160) --- testing: 9223372034707292160 * 7 --- -float(6.4563604242951E+19) +float(6.4563604242951045E+19) --- testing: 9223372034707292160 * 9 --- -float(8.3010348312366E+19) +float(8.301034831236563E+19) --- testing: 9223372034707292160 * 65 --- -float(5.9951918225597E+20) +float(5.99519182255974E+20) --- testing: 9223372034707292160 * -44 --- -float(-4.0582836952712E+20) +float(-4.0582836952712086E+20) --- testing: 9223372034707292160 * 2147483647 --- -float(1.9807040614731E+28) +float(1.9807040614731026E+28) --- testing: 9223372034707292160 * 9223372036854775807 --- -float(8.5070591710428E+37) +float(8.5070591710427575E+37) --- testing: -9223372034707292160 * 0 --- int(0) --- testing: -9223372034707292160 * 1 --- @@ -135,17 +135,17 @@ int(-9223372034707292160) --- testing: -9223372034707292160 * -1 --- int(9223372034707292160) --- testing: -9223372034707292160 * 7 --- -float(-6.4563604242951E+19) +float(-6.4563604242951045E+19) --- testing: -9223372034707292160 * 9 --- -float(-8.3010348312366E+19) +float(-8.301034831236563E+19) --- testing: -9223372034707292160 * 65 --- -float(-5.9951918225597E+20) +float(-5.99519182255974E+20) --- testing: -9223372034707292160 * -44 --- -float(4.0582836952712E+20) +float(4.0582836952712086E+20) --- testing: -9223372034707292160 * 2147483647 --- -float(-1.9807040614731E+28) +float(-1.9807040614731026E+28) --- testing: -9223372034707292160 * 9223372036854775807 --- -float(-8.5070591710428E+37) +float(-8.5070591710427575E+37) --- testing: 2147483648 * 0 --- int(0) --- testing: 2147483648 * 1 --- @@ -163,7 +163,7 @@ int(-94489280512) --- testing: 2147483648 * 2147483647 --- int(4611686016279904256) --- testing: 2147483648 * 9223372036854775807 --- -float(1.9807040628566E+28) +float(1.9807040628566084E+28) --- testing: -2147483649 * 0 --- int(0) --- testing: -2147483649 * 1 --- @@ -181,7 +181,7 @@ int(94489280556) --- testing: -2147483649 * 2147483647 --- int(-4611686018427387903) --- testing: -2147483649 * 9223372036854775807 --- -float(-1.9807040637789E+28) +float(-1.9807040637789456E+28) --- testing: 4294967294 * 0 --- int(0) --- testing: 4294967294 * 1 --- @@ -199,7 +199,7 @@ int(-188978560936) --- testing: 4294967294 * 2147483647 --- int(9223372028264841218) --- testing: 4294967294 * 9223372036854775807 --- -float(3.9614081238685E+28) +float(3.9614081238685425E+28) --- testing: 4294967295 * 0 --- int(0) --- testing: 4294967295 * 1 --- @@ -217,7 +217,7 @@ int(-188978560980) --- testing: 4294967295 * 2147483647 --- int(9223372030412324865) --- testing: 4294967295 * 9223372036854775807 --- -float(3.9614081247909E+28) +float(3.9614081247908797E+28) --- testing: 4294967293 * 0 --- int(0) --- testing: 4294967293 * 1 --- @@ -235,7 +235,7 @@ int(-188978560892) --- testing: 4294967293 * 2147483647 --- int(9223372026117357571) --- testing: 4294967293 * 9223372036854775807 --- -float(3.9614081229462E+28) +float(3.9614081229462053E+28) --- testing: 9223372036854775806 * 0 --- int(0) --- testing: 9223372036854775806 * 1 --- @@ -243,35 +243,35 @@ int(9223372036854775806) --- testing: 9223372036854775806 * -1 --- int(-9223372036854775806) --- testing: 9223372036854775806 * 7 --- -float(6.4563604257983E+19) +float(6.456360425798343E+19) --- testing: 9223372036854775806 * 9 --- -float(8.3010348331693E+19) +float(8.301034833169298E+19) --- testing: 9223372036854775806 * 65 --- -float(5.9951918239556E+20) +float(5.995191823955604E+20) --- testing: 9223372036854775806 * -44 --- -float(-4.0582836962161E+20) +float(-4.0582836962161014E+20) --- testing: 9223372036854775806 * 2147483647 --- -float(1.9807040619343E+28) +float(1.9807040619342712E+28) --- testing: 9223372036854775806 * 9223372036854775807 --- -float(8.5070591730235E+37) +float(8.507059173023462E+37) --- testing: 9.2233720368548E+18 * 0 --- float(0) --- testing: 9.2233720368548E+18 * 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 * -1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 9.2233720368548E+18 * 7 --- -float(6.4563604257983E+19) +float(6.456360425798343E+19) --- testing: 9.2233720368548E+18 * 9 --- -float(8.3010348331693E+19) +float(8.301034833169298E+19) --- testing: 9.2233720368548E+18 * 65 --- -float(5.9951918239556E+20) +float(5.995191823955604E+20) --- testing: 9.2233720368548E+18 * -44 --- -float(-4.0582836962161E+20) +float(-4.0582836962161014E+20) --- testing: 9.2233720368548E+18 * 2147483647 --- -float(1.9807040619343E+28) +float(1.9807040619342712E+28) --- testing: 9.2233720368548E+18 * 9223372036854775807 --- -float(8.5070591730235E+37) +float(8.507059173023462E+37) --- testing: -9223372036854775807 * 0 --- int(0) --- testing: -9223372036854775807 * 1 --- @@ -279,35 +279,35 @@ int(-9223372036854775807) --- testing: -9223372036854775807 * -1 --- int(9223372036854775807) --- testing: -9223372036854775807 * 7 --- -float(-6.4563604257983E+19) +float(-6.456360425798343E+19) --- testing: -9223372036854775807 * 9 --- -float(-8.3010348331693E+19) +float(-8.301034833169298E+19) --- testing: -9223372036854775807 * 65 --- -float(-5.9951918239556E+20) +float(-5.995191823955604E+20) --- testing: -9223372036854775807 * -44 --- -float(4.0582836962161E+20) +float(4.0582836962161014E+20) --- testing: -9223372036854775807 * 2147483647 --- -float(-1.9807040619343E+28) +float(-1.9807040619342712E+28) --- testing: -9223372036854775807 * 9223372036854775807 --- -float(-8.5070591730235E+37) +float(-8.507059173023462E+37) --- testing: -9.2233720368548E+18 * 0 --- float(-0) --- testing: -9.2233720368548E+18 * 1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 * -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9.2233720368548E+18 * 7 --- -float(-6.4563604257983E+19) +float(-6.456360425798343E+19) --- testing: -9.2233720368548E+18 * 9 --- -float(-8.3010348331693E+19) +float(-8.301034833169298E+19) --- testing: -9.2233720368548E+18 * 65 --- -float(-5.9951918239556E+20) +float(-5.995191823955604E+20) --- testing: -9.2233720368548E+18 * -44 --- -float(4.0582836962161E+20) +float(4.0582836962161014E+20) --- testing: -9.2233720368548E+18 * 2147483647 --- -float(-1.9807040619343E+28) +float(-1.9807040619342712E+28) --- testing: -9.2233720368548E+18 * 9223372036854775807 --- -float(-8.5070591730235E+37) +float(-8.507059173023462E+37) --- testing: 0 * 9223372036854775807 --- int(0) --- testing: 0 * -9223372036854775808 --- @@ -363,15 +363,15 @@ int(4294967293) --- testing: 1 * 9223372036854775806 --- int(9223372036854775806) --- testing: 1 * 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 1 * -9223372036854775807 --- int(-9223372036854775807) --- testing: 1 * -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -1 * 9223372036854775807 --- int(-9223372036854775807) --- testing: -1 * -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -1 * 2147483647 --- int(-2147483647) --- testing: -1 * -2147483648 --- @@ -393,23 +393,23 @@ int(-4294967293) --- testing: -1 * 9223372036854775806 --- int(-9223372036854775806) --- testing: -1 * 9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -1 * -9223372036854775807 --- int(9223372036854775807) --- testing: -1 * -9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 7 * 9223372036854775807 --- -float(6.4563604257983E+19) +float(6.456360425798343E+19) --- testing: 7 * -9223372036854775808 --- -float(-6.4563604257983E+19) +float(-6.456360425798343E+19) --- testing: 7 * 2147483647 --- int(15032385529) --- testing: 7 * -2147483648 --- int(-15032385536) --- testing: 7 * 9223372034707292160 --- -float(6.4563604242951E+19) +float(6.4563604242951045E+19) --- testing: 7 * -9223372034707292160 --- -float(-6.4563604242951E+19) +float(-6.4563604242951045E+19) --- testing: 7 * 2147483648 --- int(15032385536) --- testing: 7 * -2147483649 --- @@ -421,25 +421,25 @@ int(30064771065) --- testing: 7 * 4294967293 --- int(30064771051) --- testing: 7 * 9223372036854775806 --- -float(6.4563604257983E+19) +float(6.456360425798343E+19) --- testing: 7 * 9.2233720368548E+18 --- -float(6.4563604257983E+19) +float(6.456360425798343E+19) --- testing: 7 * -9223372036854775807 --- -float(-6.4563604257983E+19) +float(-6.456360425798343E+19) --- testing: 7 * -9.2233720368548E+18 --- -float(-6.4563604257983E+19) +float(-6.456360425798343E+19) --- testing: 9 * 9223372036854775807 --- -float(8.3010348331693E+19) +float(8.301034833169298E+19) --- testing: 9 * -9223372036854775808 --- -float(-8.3010348331693E+19) +float(-8.301034833169298E+19) --- testing: 9 * 2147483647 --- int(19327352823) --- testing: 9 * -2147483648 --- int(-19327352832) --- testing: 9 * 9223372034707292160 --- -float(8.3010348312366E+19) +float(8.301034831236563E+19) --- testing: 9 * -9223372034707292160 --- -float(-8.3010348312366E+19) +float(-8.301034831236563E+19) --- testing: 9 * 2147483648 --- int(19327352832) --- testing: 9 * -2147483649 --- @@ -451,25 +451,25 @@ int(38654705655) --- testing: 9 * 4294967293 --- int(38654705637) --- testing: 9 * 9223372036854775806 --- -float(8.3010348331693E+19) +float(8.301034833169298E+19) --- testing: 9 * 9.2233720368548E+18 --- -float(8.3010348331693E+19) +float(8.301034833169298E+19) --- testing: 9 * -9223372036854775807 --- -float(-8.3010348331693E+19) +float(-8.301034833169298E+19) --- testing: 9 * -9.2233720368548E+18 --- -float(-8.3010348331693E+19) +float(-8.301034833169298E+19) --- testing: 65 * 9223372036854775807 --- -float(5.9951918239556E+20) +float(5.995191823955604E+20) --- testing: 65 * -9223372036854775808 --- -float(-5.9951918239556E+20) +float(-5.995191823955604E+20) --- testing: 65 * 2147483647 --- int(139586437055) --- testing: 65 * -2147483648 --- int(-139586437120) --- testing: 65 * 9223372034707292160 --- -float(5.9951918225597E+20) +float(5.99519182255974E+20) --- testing: 65 * -9223372034707292160 --- -float(-5.9951918225597E+20) +float(-5.99519182255974E+20) --- testing: 65 * 2147483648 --- int(139586437120) --- testing: 65 * -2147483649 --- @@ -481,25 +481,25 @@ int(279172874175) --- testing: 65 * 4294967293 --- int(279172874045) --- testing: 65 * 9223372036854775806 --- -float(5.9951918239556E+20) +float(5.995191823955604E+20) --- testing: 65 * 9.2233720368548E+18 --- -float(5.9951918239556E+20) +float(5.995191823955604E+20) --- testing: 65 * -9223372036854775807 --- -float(-5.9951918239556E+20) +float(-5.995191823955604E+20) --- testing: 65 * -9.2233720368548E+18 --- -float(-5.9951918239556E+20) +float(-5.995191823955604E+20) --- testing: -44 * 9223372036854775807 --- -float(-4.0582836962161E+20) +float(-4.0582836962161014E+20) --- testing: -44 * -9223372036854775808 --- -float(4.0582836962161E+20) +float(4.0582836962161014E+20) --- testing: -44 * 2147483647 --- int(-94489280468) --- testing: -44 * -2147483648 --- int(94489280512) --- testing: -44 * 9223372034707292160 --- -float(-4.0582836952712E+20) +float(-4.0582836952712086E+20) --- testing: -44 * -9223372034707292160 --- -float(4.0582836952712E+20) +float(4.0582836952712086E+20) --- testing: -44 * 2147483648 --- int(-94489280512) --- testing: -44 * -2147483649 --- @@ -511,25 +511,25 @@ int(-188978560980) --- testing: -44 * 4294967293 --- int(-188978560892) --- testing: -44 * 9223372036854775806 --- -float(-4.0582836962161E+20) +float(-4.0582836962161014E+20) --- testing: -44 * 9.2233720368548E+18 --- -float(-4.0582836962161E+20) +float(-4.0582836962161014E+20) --- testing: -44 * -9223372036854775807 --- -float(4.0582836962161E+20) +float(4.0582836962161014E+20) --- testing: -44 * -9.2233720368548E+18 --- -float(4.0582836962161E+20) +float(4.0582836962161014E+20) --- testing: 2147483647 * 9223372036854775807 --- -float(1.9807040619343E+28) +float(1.9807040619342712E+28) --- testing: 2147483647 * -9223372036854775808 --- -float(-1.9807040619343E+28) +float(-1.9807040619342712E+28) --- testing: 2147483647 * 2147483647 --- int(4611686014132420609) --- testing: 2147483647 * -2147483648 --- int(-4611686016279904256) --- testing: 2147483647 * 9223372034707292160 --- -float(1.9807040614731E+28) +float(1.9807040614731026E+28) --- testing: 2147483647 * -9223372034707292160 --- -float(-1.9807040614731E+28) +float(-1.9807040614731026E+28) --- testing: 2147483647 * 2147483648 --- int(4611686016279904256) --- testing: 2147483647 * -2147483649 --- @@ -541,40 +541,40 @@ int(9223372030412324865) --- testing: 2147483647 * 4294967293 --- int(9223372026117357571) --- testing: 2147483647 * 9223372036854775806 --- -float(1.9807040619343E+28) +float(1.9807040619342712E+28) --- testing: 2147483647 * 9.2233720368548E+18 --- -float(1.9807040619343E+28) +float(1.9807040619342712E+28) --- testing: 2147483647 * -9223372036854775807 --- -float(-1.9807040619343E+28) +float(-1.9807040619342712E+28) --- testing: 2147483647 * -9.2233720368548E+18 --- -float(-1.9807040619343E+28) +float(-1.9807040619342712E+28) --- testing: 9223372036854775807 * 9223372036854775807 --- -float(8.5070591730235E+37) +float(8.507059173023462E+37) --- testing: 9223372036854775807 * -9223372036854775808 --- -float(-8.5070591730235E+37) +float(-8.507059173023462E+37) --- testing: 9223372036854775807 * 2147483647 --- -float(1.9807040619343E+28) +float(1.9807040619342712E+28) --- testing: 9223372036854775807 * -2147483648 --- -float(-1.9807040628566E+28) +float(-1.9807040628566084E+28) --- testing: 9223372036854775807 * 9223372034707292160 --- -float(8.5070591710428E+37) +float(8.5070591710427575E+37) --- testing: 9223372036854775807 * -9223372034707292160 --- -float(-8.5070591710428E+37) +float(-8.5070591710427575E+37) --- testing: 9223372036854775807 * 2147483648 --- -float(1.9807040628566E+28) +float(1.9807040628566084E+28) --- testing: 9223372036854775807 * -2147483649 --- -float(-1.9807040637789E+28) +float(-1.9807040637789456E+28) --- testing: 9223372036854775807 * 4294967294 --- -float(3.9614081238685E+28) +float(3.9614081238685425E+28) --- testing: 9223372036854775807 * 4294967295 --- -float(3.9614081247909E+28) +float(3.9614081247908797E+28) --- testing: 9223372036854775807 * 4294967293 --- -float(3.9614081229462E+28) +float(3.9614081229462053E+28) --- testing: 9223372036854775807 * 9223372036854775806 --- -float(8.5070591730235E+37) +float(8.507059173023462E+37) --- testing: 9223372036854775807 * 9.2233720368548E+18 --- -float(8.5070591730235E+37) +float(8.507059173023462E+37) --- testing: 9223372036854775807 * -9223372036854775807 --- -float(-8.5070591730235E+37) +float(-8.507059173023462E+37) --- testing: 9223372036854775807 * -9.2233720368548E+18 --- -float(-8.5070591730235E+37) +float(-8.507059173023462E+37) diff --git a/tests/lang/operators/multiply_variationStr.phpt b/tests/lang/operators/multiply_variationStr.phpt index 8f33aa2f0007f..a9f73c6bda5df 100644 --- a/tests/lang/operators/multiply_variationStr.phpt +++ b/tests/lang/operators/multiply_variationStr.phpt @@ -141,7 +141,7 @@ float(338.8) --- testing: '-7.7' * '1.2' --- float(-9.24) --- testing: '-7.7' * '-7.7' --- -float(59.29) +float(59.290000000000006) --- testing: '-7.7' * 'abc' --- float(-0) --- testing: '-7.7' * '123abc' --- @@ -231,9 +231,9 @@ float(0) --- testing: '123e5' * '123abc' --- float(1512900000) --- testing: '123e5' * '123e5' --- -float(1.5129E+14) +float(151290000000000) --- testing: '123e5' * '123e5xyz' --- -float(1.5129E+14) +float(151290000000000) --- testing: '123e5' * ' 123abc' --- float(1512900000) --- testing: '123e5' * '123 abc' --- @@ -259,9 +259,9 @@ float(0) --- testing: '123e5xyz' * '123abc' --- float(1512900000) --- testing: '123e5xyz' * '123e5' --- -float(1.5129E+14) +float(151290000000000) --- testing: '123e5xyz' * '123e5xyz' --- -float(1.5129E+14) +float(151290000000000) --- testing: '123e5xyz' * ' 123abc' --- float(1512900000) --- testing: '123e5xyz' * '123 abc' --- @@ -381,7 +381,7 @@ float(418.2) --- testing: '3.4a' * '123abc ' --- float(418.2) --- testing: '3.4a' * '3.4a' --- -float(11.56) +float(11.559999999999999) --- testing: '3.4a' * 'a5.9' --- float(0) --- testing: 'a5.9' * '0' --- diff --git a/tests/lang/operators/negate_basiclong_64bit.phpt b/tests/lang/operators/negate_basiclong_64bit.phpt index 4f60cbbd09a0d..66e7248e0fbfe 100644 --- a/tests/lang/operators/negate_basiclong_64bit.phpt +++ b/tests/lang/operators/negate_basiclong_64bit.phpt @@ -29,7 +29,7 @@ foreach ($longVals as $longVal) { --- testing: 9223372036854775807 --- int(-9223372036854775807) --- testing: -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 2147483647 --- int(-2147483647) --- testing: -2147483648 --- @@ -51,8 +51,8 @@ int(-4294967293) --- testing: 9223372036854775806 --- int(-9223372036854775806) --- testing: 9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775807 --- int(9223372036854775807) --- testing: -9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) diff --git a/tests/lang/operators/postdec_basiclong_64bit.phpt b/tests/lang/operators/postdec_basiclong_64bit.phpt index 066b7eb2f320a..a372739134f62 100644 --- a/tests/lang/operators/postdec_basiclong_64bit.phpt +++ b/tests/lang/operators/postdec_basiclong_64bit.phpt @@ -30,7 +30,7 @@ foreach ($longVals as $longVal) { --- testing: 9223372036854775807 --- int(9223372036854775806) --- testing: -9223372036854775808 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 2147483647 --- int(2147483646) --- testing: -2147483648 --- @@ -52,8 +52,8 @@ int(4294967292) --- testing: 9223372036854775806 --- int(9223372036854775805) --- testing: 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807 --- int(-9223372036854775808) --- testing: -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) diff --git a/tests/lang/operators/postdec_variationStr.phpt b/tests/lang/operators/postdec_variationStr.phpt index 5d7e8c62464c7..cb452ccba9e66 100644 --- a/tests/lang/operators/postdec_variationStr.phpt +++ b/tests/lang/operators/postdec_variationStr.phpt @@ -24,7 +24,7 @@ int(64) --- testing: '-44' --- int(-45) --- testing: '1.2' --- -float(0.2) +float(0.19999999999999996) --- testing: '-7.7' --- float(-8.7) --- testing: 'abc' --- diff --git a/tests/lang/operators/postinc_basiclong_64bit.phpt b/tests/lang/operators/postinc_basiclong_64bit.phpt index 78a803de17f7d..8c1446b7ef16d 100644 --- a/tests/lang/operators/postinc_basiclong_64bit.phpt +++ b/tests/lang/operators/postinc_basiclong_64bit.phpt @@ -28,7 +28,7 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808 --- int(-9223372036854775807) --- testing: 2147483647 --- @@ -52,8 +52,8 @@ int(4294967294) --- testing: 9223372036854775806 --- int(9223372036854775807) --- testing: 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807 --- int(-9223372036854775806) --- testing: -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) diff --git a/tests/lang/operators/predec_basiclong_64bit.phpt b/tests/lang/operators/predec_basiclong_64bit.phpt index 353755b3d4767..5e74f71566bd0 100644 --- a/tests/lang/operators/predec_basiclong_64bit.phpt +++ b/tests/lang/operators/predec_basiclong_64bit.phpt @@ -29,7 +29,7 @@ foreach ($longVals as $longVal) { --- testing: 9223372036854775807 --- int(9223372036854775806) --- testing: -9223372036854775808 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 2147483647 --- int(2147483646) --- testing: -2147483648 --- @@ -51,8 +51,8 @@ int(4294967292) --- testing: 9223372036854775806 --- int(9223372036854775805) --- testing: 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807 --- int(-9223372036854775808) --- testing: -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) diff --git a/tests/lang/operators/predec_variationStr.phpt b/tests/lang/operators/predec_variationStr.phpt index aa4b2dcc85196..ebbb6c9de3499 100644 --- a/tests/lang/operators/predec_variationStr.phpt +++ b/tests/lang/operators/predec_variationStr.phpt @@ -23,7 +23,7 @@ int(64) --- testing: '-44' --- int(-45) --- testing: '1.2' --- -float(0.2) +float(0.19999999999999996) --- testing: '-7.7' --- float(-8.7) --- testing: 'abc' --- diff --git a/tests/lang/operators/preinc_basiclong_64bit.phpt b/tests/lang/operators/preinc_basiclong_64bit.phpt index ca562a64f67f4..ff2190c06f9ca 100644 --- a/tests/lang/operators/preinc_basiclong_64bit.phpt +++ b/tests/lang/operators/preinc_basiclong_64bit.phpt @@ -27,7 +27,7 @@ foreach ($longVals as $longVal) { ?> --EXPECT-- --- testing: 9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775808 --- int(-9223372036854775807) --- testing: 2147483647 --- @@ -51,8 +51,8 @@ int(4294967294) --- testing: 9223372036854775806 --- int(9223372036854775807) --- testing: 9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -9223372036854775807 --- int(-9223372036854775806) --- testing: -9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) diff --git a/tests/lang/operators/subtract_basiclong_64bit.phpt b/tests/lang/operators/subtract_basiclong_64bit.phpt index 06853717379e1..9b7f6111d6c5c 100644 --- a/tests/lang/operators/subtract_basiclong_64bit.phpt +++ b/tests/lang/operators/subtract_basiclong_64bit.phpt @@ -43,7 +43,7 @@ int(9223372036854775807) --- testing: 9223372036854775807 - 1 --- int(9223372036854775806) --- testing: 9223372036854775807 - -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807 - 7 --- int(9223372036854775800) --- testing: 9223372036854775807 - 9 --- @@ -51,7 +51,7 @@ int(9223372036854775798) --- testing: 9223372036854775807 - 65 --- int(9223372036854775742) --- testing: 9223372036854775807 - -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775807 - 2147483647 --- int(9223372034707292160) --- testing: 9223372036854775807 - 9223372036854775807 --- @@ -59,21 +59,21 @@ int(0) --- testing: -9223372036854775808 - 0 --- int(-9223372036854775808) --- testing: -9223372036854775808 - 1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775808 - -1 --- int(-9223372036854775807) --- testing: -9223372036854775808 - 7 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775808 - 9 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775808 - 65 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775808 - -44 --- int(-9223372036854775764) --- testing: -9223372036854775808 - 2147483647 --- -float(-9.2233720390023E+18) +float(-9.22337203900226E+18) --- testing: -9223372036854775808 - 9223372036854775807 --- -float(-1.844674407371E+19) +float(-1.8446744073709552E+19) --- testing: 2147483647 - 0 --- int(2147483647) --- testing: 2147483647 - 1 --- @@ -109,7 +109,7 @@ int(-2147483604) --- testing: -2147483648 - 2147483647 --- int(-4294967295) --- testing: -2147483648 - 9223372036854775807 --- -float(-9.2233720390023E+18) +float(-9.22337203900226E+18) --- testing: 9223372034707292160 - 0 --- int(9223372034707292160) --- testing: 9223372034707292160 - 1 --- @@ -145,7 +145,7 @@ int(-9223372034707292116) --- testing: -9223372034707292160 - 2147483647 --- int(-9223372036854775807) --- testing: -9223372034707292160 - 9223372036854775807 --- -float(-1.8446744071562E+19) +float(-1.8446744071562068E+19) --- testing: 2147483648 - 0 --- int(2147483648) --- testing: 2147483648 - 1 --- @@ -181,7 +181,7 @@ int(-2147483605) --- testing: -2147483649 - 2147483647 --- int(-4294967296) --- testing: -2147483649 - 9223372036854775807 --- -float(-9.2233720390023E+18) +float(-9.22337203900226E+18) --- testing: 4294967294 - 0 --- int(4294967294) --- testing: 4294967294 - 1 --- @@ -249,27 +249,27 @@ int(9223372036854775797) --- testing: 9223372036854775806 - 65 --- int(9223372036854775741) --- testing: 9223372036854775806 - -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9223372036854775806 - 2147483647 --- int(9223372034707292159) --- testing: 9223372036854775806 - 9223372036854775807 --- int(-1) --- testing: 9.2233720368548E+18 - 0 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 - 1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 - -1 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 - 7 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 - 9 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 - 65 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 - -44 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9.2233720368548E+18 - 2147483647 --- -float(9.2233720347073E+18) +float(9.223372034707292E+18) --- testing: 9.2233720368548E+18 - 9223372036854775807 --- float(0) --- testing: -9223372036854775807 - 0 --- @@ -279,39 +279,39 @@ int(-9223372036854775808) --- testing: -9223372036854775807 - -1 --- int(-9223372036854775806) --- testing: -9223372036854775807 - 7 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775807 - 9 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775807 - 65 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9223372036854775807 - -44 --- int(-9223372036854775763) --- testing: -9223372036854775807 - 2147483647 --- -float(-9.2233720390023E+18) +float(-9.22337203900226E+18) --- testing: -9223372036854775807 - 9223372036854775807 --- -float(-1.844674407371E+19) +float(-1.8446744073709552E+19) --- testing: -9.2233720368548E+18 - 0 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 - 1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 - -1 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 - 7 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 - 9 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 - 65 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 - -44 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -9.2233720368548E+18 - 2147483647 --- -float(-9.2233720390023E+18) +float(-9.22337203900226E+18) --- testing: -9.2233720368548E+18 - 9223372036854775807 --- -float(-1.844674407371E+19) +float(-1.8446744073709552E+19) --- testing: 0 - 9223372036854775807 --- int(-9223372036854775807) --- testing: 0 - -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 0 - 2147483647 --- int(-2147483647) --- testing: 0 - -2147483648 --- @@ -333,15 +333,15 @@ int(-4294967293) --- testing: 0 - 9223372036854775806 --- int(-9223372036854775806) --- testing: 0 - 9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 0 - -9223372036854775807 --- int(9223372036854775807) --- testing: 0 - -9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 1 - 9223372036854775807 --- int(-9223372036854775806) --- testing: 1 - -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 1 - 2147483647 --- int(-2147483646) --- testing: 1 - -2147483648 --- @@ -363,11 +363,11 @@ int(-4294967292) --- testing: 1 - 9223372036854775806 --- int(-9223372036854775805) --- testing: 1 - 9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 1 - -9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 1 - -9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -1 - 9223372036854775807 --- int(-9223372036854775808) --- testing: -1 - -9223372036854775808 --- @@ -393,15 +393,15 @@ int(-4294967294) --- testing: -1 - 9223372036854775806 --- int(-9223372036854775807) --- testing: -1 - 9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -1 - -9223372036854775807 --- int(9223372036854775806) --- testing: -1 - -9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 7 - 9223372036854775807 --- int(-9223372036854775800) --- testing: 7 - -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 7 - 2147483647 --- int(-2147483640) --- testing: 7 - -2147483648 --- @@ -423,15 +423,15 @@ int(-4294967286) --- testing: 7 - 9223372036854775806 --- int(-9223372036854775799) --- testing: 7 - 9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 7 - -9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 7 - -9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9 - 9223372036854775807 --- int(-9223372036854775798) --- testing: 9 - -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9 - 2147483647 --- int(-2147483638) --- testing: 9 - -2147483648 --- @@ -453,15 +453,15 @@ int(-4294967284) --- testing: 9 - 9223372036854775806 --- int(-9223372036854775797) --- testing: 9 - 9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 9 - -9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 9 - -9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 65 - 9223372036854775807 --- int(-9223372036854775742) --- testing: 65 - -9223372036854775808 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 65 - 2147483647 --- int(-2147483582) --- testing: 65 - -2147483648 --- @@ -483,13 +483,13 @@ int(-4294967228) --- testing: 65 - 9223372036854775806 --- int(-9223372036854775741) --- testing: 65 - 9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: 65 - -9223372036854775807 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 65 - -9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: -44 - 9223372036854775807 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -44 - -9223372036854775808 --- int(9223372036854775764) --- testing: -44 - 2147483647 --- @@ -511,17 +511,17 @@ int(-4294967339) --- testing: -44 - 4294967293 --- int(-4294967337) --- testing: -44 - 9223372036854775806 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -44 - 9.2233720368548E+18 --- -float(-9.2233720368548E+18) +float(-9.223372036854776E+18) --- testing: -44 - -9223372036854775807 --- int(9223372036854775763) --- testing: -44 - -9.2233720368548E+18 --- -float(9.2233720368548E+18) +float(9.223372036854776E+18) --- testing: 2147483647 - 9223372036854775807 --- int(-9223372034707292160) --- testing: 2147483647 - -9223372036854775808 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 2147483647 - 2147483647 --- int(0) --- testing: 2147483647 - -2147483648 --- @@ -543,27 +543,27 @@ int(-2147483646) --- testing: 2147483647 - 9223372036854775806 --- int(-9223372034707292159) --- testing: 2147483647 - 9.2233720368548E+18 --- -float(-9.2233720347073E+18) +float(-9.223372034707292E+18) --- testing: 2147483647 - -9223372036854775807 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 2147483647 - -9.2233720368548E+18 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 9223372036854775807 - 9223372036854775807 --- int(0) --- testing: 9223372036854775807 - -9223372036854775808 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 9223372036854775807 - 2147483647 --- int(9223372034707292160) --- testing: 9223372036854775807 - -2147483648 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 9223372036854775807 - 9223372034707292160 --- int(2147483647) --- testing: 9223372036854775807 - -9223372034707292160 --- -float(1.8446744071562E+19) +float(1.8446744071562068E+19) --- testing: 9223372036854775807 - 2147483648 --- int(9223372034707292159) --- testing: 9223372036854775807 - -2147483649 --- -float(9.2233720390023E+18) +float(9.22337203900226E+18) --- testing: 9223372036854775807 - 4294967294 --- int(9223372032559808513) --- testing: 9223372036854775807 - 4294967295 --- @@ -575,6 +575,6 @@ int(1) --- testing: 9223372036854775807 - 9.2233720368548E+18 --- float(0) --- testing: 9223372036854775807 - -9223372036854775807 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) --- testing: 9223372036854775807 - -9.2233720368548E+18 --- -float(1.844674407371E+19) +float(1.8446744073709552E+19) From 16897aacce85df66a34a04d3b5a84bbe7b8c4871 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 25 Feb 2020 10:06:13 +0100 Subject: [PATCH 078/201] Remove unnecessary checks in breakpoint iterator The result of Z_INTL_BREAKITERATOR_P() cannot be NULL. This type of macro in general can never be NULL. --- ext/intl/breakiterator/breakiterator_methods.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp index 3f2dded5eff68..fc1c813499b5a 100644 --- a/ext/intl/breakiterator/breakiterator_methods.cpp +++ b/ext/intl/breakiterator/breakiterator_methods.cpp @@ -383,9 +383,6 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_code) /* Fetch the object (without resetting its last error code ). */ bio = Z_INTL_BREAKITERATOR_P(object); - if (bio == NULL) - RETURN_FALSE; - RETURN_LONG((zend_long)BREAKITER_ERROR_CODE(bio)); } @@ -402,8 +399,6 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_message) /* Fetch the object (without resetting its last error code ). */ bio = Z_INTL_BREAKITERATOR_P(object); - if (bio == NULL) - RETURN_FALSE; /* Return last error message. */ message = intl_error_get_message(BREAKITER_ERROR_P(bio)); From 7956866ff45bb8bf9cb01010e1f3013dd8a7621d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 21 Feb 2020 15:23:10 +0100 Subject: [PATCH 079/201] Fix macro-expansion issues in ZEND_FE and friends I noticed that we have various places where we work around macros conflicting with PHP function names. Rather than require this, fix our ZEND_FE etc macros to avoid pre-scan macro expansion. This requires duplicating the ZEND_FN/ZEND_MN macros in places, but that seems like a reasonable tradeoff. --- Zend/zend_API.h | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 9fd656b276db9..4c29a0f1b928c 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -59,40 +59,46 @@ typedef struct _zend_fcall_info_cache { #define ZEND_NS_NAME(ns, name) ns "\\" name +/* ZEND_FN/ZEND_MN are inlined below to prevent pre-scan macro expansion, + * which causes issues if the function name is also a macro name. */ #define ZEND_FN(name) zif_##name #define ZEND_MN(name) zim_##name + #define ZEND_NAMED_FUNCTION(name) void ZEND_FASTCALL name(INTERNAL_FUNCTION_PARAMETERS) -#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name)) -#define ZEND_METHOD(classname, name) ZEND_NAMED_FUNCTION(ZEND_MN(classname##_##name)) +#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(zif_##name) +#define ZEND_METHOD(classname, name) ZEND_NAMED_FUNCTION(zim_##classname##_##name) #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags }, #define ZEND_RAW_FENTRY(zend_name, name, arg_info, flags) { zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags }, + +/* Same as ZEND_NAMED_FE */ #define ZEND_RAW_NAMED_FE(zend_name, name, arg_info) ZEND_RAW_FENTRY(#zend_name, name, arg_info, 0) -#define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_FENTRY(zend_name, name, arg_info, 0) -#define ZEND_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0) -#define ZEND_DEP_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED) -#define ZEND_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, 0) -#define ZEND_DEP_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED) +#define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_RAW_FENTRY(#zend_name, name, arg_info, 0) +#define ZEND_FE(name, arg_info) ZEND_RAW_FENTRY(#name, zif_##name, arg_info, 0) +#define ZEND_DEP_FE(name, arg_info) ZEND_RAW_FENTRY(#name, zif_##name, arg_info, ZEND_ACC_DEPRECATED) +#define ZEND_FALIAS(name, alias, arg_info) ZEND_RAW_FENTRY(#name, zif_##alias, arg_info, 0) +#define ZEND_DEP_FALIAS(name, alias, arg_info) ZEND_RAW_FENTRY(#name, zif_##alias, arg_info, ZEND_ACC_DEPRECATED) #define ZEND_NAMED_ME(zend_name, name, arg_info, flags) ZEND_FENTRY(zend_name, name, arg_info, flags) -#define ZEND_ME(classname, name, arg_info, flags) ZEND_FENTRY(name, ZEND_MN(classname##_##name), arg_info, flags) -#define ZEND_DEP_ME(classname, name, arg_info, flags) ZEND_ME(classname, name, arg_info, flags | ZEND_ACC_DEPRECATED) -#define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT) -#define ZEND_MALIAS(classname, name, alias, arg_info, flags) \ - ZEND_FENTRY(name, ZEND_MN(classname##_##alias), arg_info, flags) -#define ZEND_ME_MAPPING(name, func_name, arg_types, flags) ZEND_NAMED_ME(name, ZEND_FN(func_name), arg_types, flags) +#define ZEND_ME(classname, name, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##name, arg_info, flags) +#define ZEND_DEP_ME(classname, name, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##name, arg_info, flags | ZEND_ACC_DEPRECATED) +#define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_RAW_FENTRY(#name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT) +#define ZEND_MALIAS(classname, name, alias, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##alias, arg_info, flags) +#define ZEND_ME_MAPPING(name, func_name, arg_types, flags) ZEND_RAW_FENTRY(#name, zif_##func_name, arg_types, flags) #define ZEND_NS_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, #zend_name), name, arg_info, flags) #define ZEND_NS_RAW_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, zend_name), name, arg_info, flags) + +/* Same as ZEND_NS_NAMED_FE */ #define ZEND_NS_RAW_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0) -#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_FENTRY(ns, zend_name, name, arg_info, 0) -#define ZEND_NS_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, 0) -#define ZEND_NS_DEP_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED) -#define ZEND_NS_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0) -#define ZEND_NS_DEP_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED) +#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0) +#define ZEND_NS_FE(ns, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #name, zif_##name, arg_info, 0) +#define ZEND_NS_DEP_FE(ns, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #name, zif_##name, arg_info, ZEND_ACC_DEPRECATED) +#define ZEND_NS_FALIAS(ns, name, alias, arg_info) ZEND_NS_RAW_FENTRY(ns, #name, zif_##alias, arg_info, 0) +#define ZEND_NS_DEP_FALIAS(ns, name, alias, arg_info) ZEND_NS_RAW_FENTRY(ns, #name, zif_##alias, arg_info, ZEND_ACC_DEPRECATED) #define ZEND_FE_END { NULL, NULL, NULL, 0, 0 } From bb6e2a1615a54bc2986c782a2541289fd33a1bbb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 21 Feb 2020 15:33:58 +0100 Subject: [PATCH 080/201] Avoid used of "named fn" in ext/standard --- ext/standard/basic_functions.c | 32 ++++++++++++++++---------------- ext/standard/basic_functions.h | 6 +++--- ext/standard/crc32.c | 2 +- ext/standard/dir.c | 4 ++-- ext/standard/file.c | 8 ++++---- ext/standard/file.h | 8 ++++---- ext/standard/filestat.c | 4 ++-- ext/standard/formatted_print.c | 4 ++-- ext/standard/md5.c | 4 ++-- ext/standard/md5.h | 4 ++-- ext/standard/php_dir.h | 2 +- ext/standard/php_filestat.h | 4 ++-- ext/standard/php_string.h | 4 ++-- 13 files changed, 43 insertions(+), 43 deletions(-) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index a55e58f565919..e0b7760477d37 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -146,9 +146,9 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(get_html_translation_table, arginfo_get_html_translation_table) PHP_FE(sha1, arginfo_sha1) PHP_FE(sha1_file, arginfo_sha1_file) - PHP_NAMED_FE(md5,php_if_md5, arginfo_md5) - PHP_NAMED_FE(md5_file,php_if_md5_file, arginfo_md5_file) - PHP_NAMED_FE(crc32,php_if_crc32, arginfo_crc32) + PHP_FE(md5, arginfo_md5) + PHP_FE(md5_file, arginfo_md5_file) + PHP_FE(crc32, arginfo_crc32) PHP_FE(iptcparse, arginfo_iptcparse) PHP_FE(iptcembed, arginfo_iptcembed) @@ -235,8 +235,8 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(str_pad, arginfo_str_pad) PHP_FALIAS(chop, rtrim, arginfo_chop) PHP_FALIAS(strchr, strstr, arginfo_strchr) - PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), arginfo_sprintf) - PHP_NAMED_FE(printf, PHP_FN(user_printf), arginfo_printf) + PHP_FE(sprintf, arginfo_sprintf) + PHP_FE(printf, arginfo_printf) PHP_FE(vprintf, arginfo_vprintf) PHP_FE(vsprintf, arginfo_vsprintf) PHP_FE(fprintf, arginfo_fprintf) @@ -361,10 +361,10 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(fdiv, arginfo_fdiv) PHP_FE(intdiv, arginfo_intdiv) #ifdef HAVE_INET_NTOP - PHP_RAW_NAMED_FE(inet_ntop, zif_inet_ntop, arginfo_inet_ntop) + PHP_FE(inet_ntop, arginfo_inet_ntop) #endif #ifdef HAVE_INET_PTON - PHP_RAW_NAMED_FE(inet_pton, php_inet_pton, arginfo_inet_pton) + PHP_FE(inet_pton, arginfo_inet_pton) #endif PHP_FE(ip2long, arginfo_ip2long) PHP_FE(long2ip, arginfo_long2ip) @@ -517,10 +517,10 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(fgetc, arginfo_fgetc) PHP_FE(fgets, arginfo_fgets) PHP_FE(fread, arginfo_fread) - PHP_NAMED_FE(fopen, php_if_fopen, arginfo_fopen) + PHP_FE(fopen, arginfo_fopen) PHP_FE(fpassthru, arginfo_fpassthru) - PHP_NAMED_FE(ftruncate, php_if_ftruncate, arginfo_ftruncate) - PHP_NAMED_FE(fstat, php_if_fstat, arginfo_fstat) + PHP_FE(ftruncate, arginfo_ftruncate) + PHP_FE(fstat, arginfo_fstat) PHP_FE(fseek, arginfo_fseek) PHP_FE(ftell, arginfo_ftell) PHP_FE(fflush, arginfo_fflush) @@ -530,7 +530,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(rename, arginfo_rename) PHP_FE(copy, arginfo_copy) PHP_FE(tempnam, arginfo_tempnam) - PHP_NAMED_FE(tmpfile, php_if_tmpfile, arginfo_tmpfile) + PHP_FE(tmpfile, arginfo_tmpfile) PHP_FE(file, arginfo_file) PHP_FE(file_get_contents, arginfo_file_get_contents) PHP_FE(file_put_contents, arginfo_file_put_contents) @@ -629,7 +629,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(getcwd, arginfo_getcwd) PHP_FE(rewinddir, arginfo_rewinddir) - PHP_NAMED_FE(readdir, php_if_readdir, arginfo_readdir) + PHP_FE(readdir, arginfo_readdir) PHP_FALIAS(dir, getdir, arginfo_dir) PHP_FE(scandir, arginfo_scandir) #ifdef HAVE_GLOB @@ -653,8 +653,8 @@ static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(is_file, arginfo_is_file) PHP_FE(is_dir, arginfo_is_dir) PHP_FE(is_link, arginfo_is_link) - PHP_NAMED_FE(stat, php_if_stat, arginfo_stat) - PHP_NAMED_FE(lstat, php_if_lstat, arginfo_lstat) + PHP_FE(stat, arginfo_stat) + PHP_FE(lstat, arginfo_lstat) PHP_FE(chown, arginfo_chown) PHP_FE(chgrp, arginfo_chgrp) #if HAVE_LCHOWN @@ -1301,7 +1301,7 @@ PHP_FUNCTION(constant) #ifdef HAVE_INET_NTOP /* {{{ proto string|false inet_ntop(string in_addr) Converts a packed inet address to a human readable IP address string */ -PHP_NAMED_FUNCTION(zif_inet_ntop) +PHP_FUNCTION(inet_ntop) { char *address; size_t address_len; @@ -1333,7 +1333,7 @@ PHP_NAMED_FUNCTION(zif_inet_ntop) #ifdef HAVE_INET_PTON /* {{{ proto string|false inet_pton(string ip_address) Converts a human readable IP address to a packed binary string */ -PHP_NAMED_FUNCTION(php_inet_pton) +PHP_FUNCTION(inet_pton) { int ret, af = AF_INET; char *address; diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 1366998983da1..31325fea121e5 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -52,10 +52,10 @@ PHP_FUNCTION(time_sleep_until); #endif PHP_FUNCTION(flush); #ifdef HAVE_INET_NTOP -PHP_NAMED_FUNCTION(zif_inet_ntop); +PHP_FUNCTION(inet_ntop); #endif #ifdef HAVE_INET_PTON -PHP_NAMED_FUNCTION(php_inet_pton); +PHP_FUNCTION(inet_pton); #endif PHP_FUNCTION(ip2long); PHP_FUNCTION(long2ip); @@ -108,7 +108,7 @@ PHP_FUNCTION(getservbyport); PHP_FUNCTION(getprotobyname); PHP_FUNCTION(getprotobynumber); -PHP_NAMED_FUNCTION(php_if_crc32); +PHP_FUNCTION(crc32); PHP_FUNCTION(register_tick_function); PHP_FUNCTION(unregister_tick_function); diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c index 1393483278ecc..a0e5d6d816091 100644 --- a/ext/standard/crc32.c +++ b/ext/standard/crc32.c @@ -70,7 +70,7 @@ static uint32_t crc32_aarch64(uint32_t crc, char *p, size_t nr) { /* {{{ proto string crc32(string str) Calculate the crc32 polynomial of a string */ -PHP_NAMED_FUNCTION(php_if_crc32) +PHP_FUNCTION(crc32) { char *p; size_t nr; diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 5554a689b35b8..e6caf7109d38e 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -90,7 +90,7 @@ static zend_class_entry *dir_class_entry_ptr; static const zend_function_entry php_dir_class_functions[] = { PHP_FALIAS(close, closedir, arginfo_class_Directory_close) PHP_FALIAS(rewind, rewinddir, arginfo_class_Directory_rewind) - PHP_NAMED_FE(read, php_if_readdir, arginfo_class_Directory_read) + PHP_FALIAS(read, readdir, arginfo_class_Directory_read) PHP_FE_END }; @@ -385,7 +385,7 @@ PHP_FUNCTION(rewinddir) /* {{{ proto string|false readdir([resource dir_handle]) Read directory entry from dir_handle */ -PHP_NAMED_FUNCTION(php_if_readdir) +PHP_FUNCTION(readdir) { zval *id = NULL, *tmp, *myself; php_stream *dirp; diff --git a/ext/standard/file.c b/ext/standard/file.c index 473d0510c277b..bdb56d542895a 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -850,7 +850,7 @@ PHP_FUNCTION(tempnam) /* {{{ proto resource tmpfile(void) Create a temporary file that will be deleted automatically after use */ -PHP_NAMED_FUNCTION(php_if_tmpfile) +PHP_FUNCTION(tmpfile) { php_stream *stream; @@ -868,7 +868,7 @@ PHP_NAMED_FUNCTION(php_if_tmpfile) /* {{{ proto resource fopen(string filename, string mode [, bool use_include_path [, resource context]]) Open a file or a URL and return a file pointer */ -PHP_NAMED_FUNCTION(php_if_fopen) +PHP_FUNCTION(fopen) { char *filename, *mode; size_t filename_len, mode_len; @@ -1483,7 +1483,7 @@ PHP_FUNCTION(unlink) /* {{{ proto bool ftruncate(resource fp, int size) Truncate file to 'size' length */ -PHP_NAMED_FUNCTION(php_if_ftruncate) +PHP_FUNCTION(ftruncate) { zval *fp; zend_long size; @@ -1512,7 +1512,7 @@ PHP_NAMED_FUNCTION(php_if_ftruncate) /* {{{ proto array fstat(resource fp) Stat() on a filehandle */ -PHP_NAMED_FUNCTION(php_if_fstat) +PHP_FUNCTION(fstat) { zval *fp; zval stat_dev, stat_ino, stat_mode, stat_nlink, stat_uid, stat_gid, stat_rdev, diff --git a/ext/standard/file.h b/ext/standard/file.h index 4e368cf5454e2..bcca86f9a3f68 100644 --- a/ext/standard/file.h +++ b/ext/standard/file.h @@ -23,8 +23,8 @@ PHP_MINIT_FUNCTION(file); PHP_MSHUTDOWN_FUNCTION(file); PHP_FUNCTION(tempnam); -PHP_NAMED_FUNCTION(php_if_tmpfile); -PHP_NAMED_FUNCTION(php_if_fopen); +PHP_FUNCTION(tmpfile); +PHP_FUNCTION(fopen); PHPAPI PHP_FUNCTION(fclose); PHP_FUNCTION(popen); PHP_FUNCTION(pclose); @@ -61,8 +61,8 @@ PHP_FUNCTION(realpath); #ifdef HAVE_FNMATCH PHP_FUNCTION(fnmatch); #endif -PHP_NAMED_FUNCTION(php_if_ftruncate); -PHP_NAMED_FUNCTION(php_if_fstat); +PHP_FUNCTION(ftruncate); +PHP_FUNCTION(fstat); PHP_FUNCTION(sys_get_temp_dir); PHP_MINIT_FUNCTION(user_streams); diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 88821296fcd5e..c391cef48a388 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -1074,12 +1074,12 @@ FileFunction(PHP_FN(file_exists), FS_EXISTS) /* {{{ proto array lstat(string filename) Give information about a file or symbolic link */ -FileFunction(php_if_lstat, FS_LSTAT) +FileFunction(PHP_FN(lstat), FS_LSTAT) /* }}} */ /* {{{ proto array stat(string filename) Give information about a file */ -FileFunction(php_if_stat, FS_STAT) +FileFunction(PHP_FN(stat), FS_STAT) /* }}} */ /* {{{ proto bool realpath_cache_size() diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index c8d912793a11c..ad8a79960c282 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -670,7 +670,7 @@ php_formatted_print_get_array(zval *array, int *argc) /* {{{ proto string sprintf(string format [, mixed arg1 [, mixed ...]]) Return a formatted string */ -PHP_FUNCTION(user_sprintf) +PHP_FUNCTION(sprintf) { zend_string *result; char *format; @@ -719,7 +719,7 @@ PHP_FUNCTION(vsprintf) /* {{{ proto int printf(string format [, mixed arg1 [, mixed ...]]) Output a formatted string */ -PHP_FUNCTION(user_printf) +PHP_FUNCTION(printf) { zend_string *result; size_t rlen; diff --git a/ext/standard/md5.c b/ext/standard/md5.c index 994ac1a1fee19..2e2b5281da855 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -40,7 +40,7 @@ PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len) / /* {{{ proto string md5(string str, [ bool raw_output]) Calculate the md5 hash of a string */ -PHP_NAMED_FUNCTION(php_if_md5) +PHP_FUNCTION(md5) { zend_string *arg; zend_bool raw_output = 0; @@ -68,7 +68,7 @@ PHP_NAMED_FUNCTION(php_if_md5) /* {{{ proto string md5_file(string filename [, bool raw_output]) Calculate the md5 hash of given filename */ -PHP_NAMED_FUNCTION(php_if_md5_file) +PHP_FUNCTION(md5_file) { char *arg; size_t arg_len; diff --git a/ext/standard/md5.h b/ext/standard/md5.h index a6aa4e7b0a7be..9463c13892a92 100644 --- a/ext/standard/md5.h +++ b/ext/standard/md5.h @@ -21,8 +21,8 @@ PHPAPI void make_digest(char *md5str, const unsigned char *digest); PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len); -PHP_NAMED_FUNCTION(php_if_md5); -PHP_NAMED_FUNCTION(php_if_md5_file); +PHP_FUNCTION(md5); +PHP_FUNCTION(md5_file); #include "ext/standard/basic_functions.h" diff --git a/ext/standard/php_dir.h b/ext/standard/php_dir.h index 9d91e50ef2633..599ac738c0cb6 100644 --- a/ext/standard/php_dir.h +++ b/ext/standard/php_dir.h @@ -28,7 +28,7 @@ PHP_FUNCTION(chroot); #endif PHP_FUNCTION(getcwd); PHP_FUNCTION(rewinddir); -PHP_NAMED_FUNCTION(php_if_readdir); +PHP_FUNCTION(readdir); PHP_FUNCTION(getdir); PHP_FUNCTION(glob); PHP_FUNCTION(scandir); diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h index d978f46796584..0e454ac208392 100644 --- a/ext/standard/php_filestat.h +++ b/ext/standard/php_filestat.h @@ -39,8 +39,8 @@ PHP_FUNCTION(is_file); PHP_FUNCTION(is_dir); PHP_FUNCTION(is_link); PHP_FUNCTION(file_exists); -PHP_NAMED_FUNCTION(php_if_stat); -PHP_NAMED_FUNCTION(php_if_lstat); +PHP_FUNCTION(stat); +PHP_FUNCTION(lstat); PHP_FUNCTION(disk_total_space); PHP_FUNCTION(disk_free_space); PHP_FUNCTION(chown); diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index 2c3953b958699..7753bb6b46a79 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -52,8 +52,8 @@ PHP_FUNCTION(ucwords); PHP_FUNCTION(strtr); PHP_FUNCTION(strrev); PHP_FUNCTION(hebrev); -PHP_FUNCTION(user_sprintf); -PHP_FUNCTION(user_printf); +PHP_FUNCTION(sprintf); +PHP_FUNCTION(printf); PHP_FUNCTION(vprintf); PHP_FUNCTION(vsprintf); PHP_FUNCTION(addcslashes); From aa79a22d32f31dbc5343f8191e925aa07447c3ec Mon Sep 17 00:00:00 2001 From: Nicolas Oelgart Date: Mon, 17 Feb 2020 14:29:12 +0100 Subject: [PATCH 081/201] Add preg_last_error_msg() function Provides the last PCRE error as a human-readable message, similar to functionality existing in other extensions, such as json_last_error_msg(). Closes GH-5185. --- UPGRADING | 5 ++++ ext/pcre/php_pcre.c | 49 ++++++++++++++++++++++++++++-------- ext/pcre/php_pcre.h | 12 ++++++++- ext/pcre/php_pcre.stub.php | 2 ++ ext/pcre/php_pcre_arginfo.h | 3 +++ ext/pcre/tests/errors01.phpt | 15 +++++++++++ ext/pcre/tests/errors02.phpt | 12 +++++++++ ext/pcre/tests/errors03.phpt | 13 ++++++++++ ext/pcre/tests/errors04.phpt | 26 +++++++++++++++++++ ext/pcre/tests/errors05.phpt | 18 +++++++++++++ ext/pcre/tests/errors06.phpt | 11 ++++++++ sapi/cli/tests/006.phpt | 6 +++++ 12 files changed, 160 insertions(+), 12 deletions(-) create mode 100644 ext/pcre/tests/errors01.phpt create mode 100644 ext/pcre/tests/errors02.phpt create mode 100644 ext/pcre/tests/errors03.phpt create mode 100644 ext/pcre/tests/errors04.phpt create mode 100644 ext/pcre/tests/errors05.phpt create mode 100644 ext/pcre/tests/errors06.phpt diff --git a/UPGRADING b/UPGRADING index 2696cf8376781..133747d28f58a 100644 --- a/UPGRADING +++ b/UPGRADING @@ -435,6 +435,11 @@ PHP 8.0 UPGRADE NOTES 6. New Functions ======================================== +- PCRE: + . Added preg_last_error_msg(), which returns a human-readable message for + the last PCRE error. It complements preg_last_error(), which returns an + integer enum instead. + - SQLite3: . Add SQLite3::setAuthorizer() and respective class constants to set a userland callback that will be used to authorize or not an action on the diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index edf48ca1f4651..fdc1b1b8563ad 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -52,17 +52,6 @@ struct _pcre_cache_entry { uint32_t refcount; }; -enum { - PHP_PCRE_NO_ERROR = 0, - PHP_PCRE_INTERNAL_ERROR, - PHP_PCRE_BACKTRACK_LIMIT_ERROR, - PHP_PCRE_RECURSION_LIMIT_ERROR, - PHP_PCRE_BAD_UTF8_ERROR, - PHP_PCRE_BAD_UTF8_OFFSET_ERROR, - PHP_PCRE_JIT_STACKLIMIT_ERROR -}; - - PHPAPI ZEND_DECLARE_MODULE_GLOBALS(pcre) #ifdef HAVE_PCRE_JIT_SUPPORT @@ -138,6 +127,33 @@ static void pcre_handle_exec_error(int pcre_code) /* {{{ */ } /* }}} */ +static const char *php_pcre_get_error_msg(php_pcre_error_code error_code) /* {{{ */ +{ + switch (error_code) { + case PHP_PCRE_NO_ERROR: + return "No error"; + case PHP_PCRE_INTERNAL_ERROR: + return "Internal error"; + case PHP_PCRE_BAD_UTF8_ERROR: + return "Malformed UTF-8 characters, possibly incorrectly encoded"; + case PHP_PCRE_BAD_UTF8_OFFSET_ERROR: + return "The offset did not correspond to the beginning of a valid UTF-8 code point"; + case PHP_PCRE_BACKTRACK_LIMIT_ERROR: + return "Backtrack limit exhausted"; + case PHP_PCRE_RECURSION_LIMIT_ERROR: + return "Recursion limit exhausted"; + +#ifdef HAVE_PCRE_JIT_SUPPORT + case PHP_PCRE_JIT_STACKLIMIT_ERROR: + return "JIT stack limit exhausted"; +#endif + + default: + return "Unknown error"; + } +} +/* }}} */ + static void php_free_pcre_cache(zval *data) /* {{{ */ { pcre_cache_entry *pce = (pcre_cache_entry *) Z_PTR_P(data); @@ -2957,6 +2973,16 @@ static PHP_FUNCTION(preg_last_error) } /* }}} */ +/* {{{ proto string preg_last_error_msg() + Returns the error message of the last regexp execution. */ +static PHP_FUNCTION(preg_last_error_msg) +{ + ZEND_PARSE_PARAMETERS_NONE(); + + RETURN_STRING(php_pcre_get_error_msg(PCRE_G(error_code))); +} +/* }}} */ + /* {{{ module definition structures */ static const zend_function_entry pcre_functions[] = { @@ -2970,6 +2996,7 @@ static const zend_function_entry pcre_functions[] = { PHP_FE(preg_quote, arginfo_preg_quote) PHP_FE(preg_grep, arginfo_preg_grep) PHP_FE(preg_last_error, arginfo_preg_last_error) + PHP_FE(preg_last_error_msg, arginfo_preg_last_error_msg) PHP_FE_END }; diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index 3c2fff4251865..bf78f992fa85b 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -37,6 +37,16 @@ extern zend_module_entry pcre_module_entry; typedef struct _pcre_cache_entry pcre_cache_entry; +typedef enum { + PHP_PCRE_NO_ERROR = 0, + PHP_PCRE_INTERNAL_ERROR, + PHP_PCRE_BACKTRACK_LIMIT_ERROR, + PHP_PCRE_RECURSION_LIMIT_ERROR, + PHP_PCRE_BAD_UTF8_ERROR, + PHP_PCRE_BAD_UTF8_OFFSET_ERROR, + PHP_PCRE_JIT_STACKLIMIT_ERROR +} php_pcre_error_code; + PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex); PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, int locale_aware); @@ -70,7 +80,7 @@ ZEND_BEGIN_MODULE_GLOBALS(pcre) zend_bool jit; #endif zend_bool per_request_cache; - int error_code; + php_pcre_error_code error_code; /* Used for unmatched subpatterns in OFFSET_CAPTURE mode */ zval unmatched_null_pair; zval unmatched_empty_pair; diff --git a/ext/pcre/php_pcre.stub.php b/ext/pcre/php_pcre.stub.php index 397ab22159aa4..ccedc7207d8c6 100644 --- a/ext/pcre/php_pcre.stub.php +++ b/ext/pcre/php_pcre.stub.php @@ -37,3 +37,5 @@ function preg_quote(string $str, ?string $delim_char = null): string {} function preg_grep(string $regex, array $input, int $flags = 0): array|false {} function preg_last_error(): int {} + +function preg_last_error_msg(): string {} diff --git a/ext/pcre/php_pcre_arginfo.h b/ext/pcre/php_pcre_arginfo.h index 4c7308baabcc7..41591da52f1e4 100644 --- a/ext/pcre/php_pcre_arginfo.h +++ b/ext/pcre/php_pcre_arginfo.h @@ -63,3 +63,6 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_preg_last_error, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_preg_last_error_msg, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() diff --git a/ext/pcre/tests/errors01.phpt b/ext/pcre/tests/errors01.phpt new file mode 100644 index 0000000000000..c239309c11567 --- /dev/null +++ b/ext/pcre/tests/errors01.phpt @@ -0,0 +1,15 @@ +--TEST-- +Test preg_split() function : error conditions - Recursion limit exhausted +--INI-- +pcre.recursion_limit=1 +--FILE-- + +--EXPECT-- +bool(true) +bool(true) diff --git a/ext/pcre/tests/errors02.phpt b/ext/pcre/tests/errors02.phpt new file mode 100644 index 0000000000000..d350bae7056fc --- /dev/null +++ b/ext/pcre/tests/errors02.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test preg_split() function : error conditions - Malformed UTF-8 +--FILE-- + +--EXPECT-- +bool(false) +bool(true) diff --git a/ext/pcre/tests/errors03.phpt b/ext/pcre/tests/errors03.phpt new file mode 100644 index 0000000000000..1f519cb599958 --- /dev/null +++ b/ext/pcre/tests/errors03.phpt @@ -0,0 +1,13 @@ +--TEST-- +Test preg_match() function : error conditions - Internal error +--FILE-- + +--EXPECTF-- +Warning: preg_match(): No ending delimiter '/' found in %s on line %d +bool(false) +bool(true) diff --git a/ext/pcre/tests/errors04.phpt b/ext/pcre/tests/errors04.phpt new file mode 100644 index 0000000000000..340b08409872d --- /dev/null +++ b/ext/pcre/tests/errors04.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test preg_match_all() function : error conditions - Backtracking limit +--SKIPIF-- + +--INI-- +pcre.backtrack_limit=2 +pcre.jit=0 +--FILE-- + +--EXPECT-- +bool(false) +bool(true) +int(10) +bool(true) diff --git a/ext/pcre/tests/errors05.phpt b/ext/pcre/tests/errors05.phpt new file mode 100644 index 0000000000000..13fabc4f30f4c --- /dev/null +++ b/ext/pcre/tests/errors05.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test preg_match() function : error conditions - jit stacklimit exhausted +--SKIPIF-- + +--INI-- +pcre.jit=1 +--FILE-- + +--EXPECT-- +bool(false) +bool(true) diff --git a/ext/pcre/tests/errors06.phpt b/ext/pcre/tests/errors06.phpt new file mode 100644 index 0000000000000..8e782442334f7 --- /dev/null +++ b/ext/pcre/tests/errors06.phpt @@ -0,0 +1,11 @@ +--TEST-- +Test preg_match() function : error conditions - Malformed UTF-8 offset +--FILE-- + +--EXPECT-- +bool(true) +bool(true) diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt index b1f756d17f73d..f1e3a0a33de1a 100644 --- a/sapi/cli/tests/006.phpt +++ b/sapi/cli/tests/006.phpt @@ -165,6 +165,12 @@ string(%d) "Extension [ extension #%d pcre version %s ] { } - Return [ int ] } + Function [ function preg_last_error_msg ] { + + - Parameters [0] { + } + - Return [ string ] + } } } From fabe6a310ca25349301becf3d61dfdde249893a7 Mon Sep 17 00:00:00 2001 From: Tom Van Looy Date: Fri, 15 Nov 2019 15:39:56 +0100 Subject: [PATCH 082/201] Add ext/mysqli stubs Closes GH-4913. --- ext/mysqli/mysqli.stub.php | 527 ++++++++++++++++++++++++++++ ext/mysqli/mysqli_api.c | 2 +- ext/mysqli/mysqli_arginfo.h | 661 ++++++++++++++++++++++++++++++++++++ ext/mysqli/mysqli_fe.c | 631 ++++++++-------------------------- ext/mysqli/mysqli_warning.c | 6 +- 5 files changed, 1327 insertions(+), 500 deletions(-) create mode 100644 ext/mysqli/mysqli.stub.php create mode 100644 ext/mysqli/mysqli_arginfo.h diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php new file mode 100644 index 0000000000000..6df17ec47fd85 --- /dev/null +++ b/ext/mysqli/mysqli.stub.php @@ -0,0 +1,527 @@ + Date: Tue, 25 Feb 2020 11:17:34 +0100 Subject: [PATCH 083/201] Add missing zend_test stubs --- ext/zend_test/test.c | 6 +++--- ext/zend_test/test.stub.php | 10 ++++++++++ ext/zend_test/test_arginfo.h | 9 +++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 6c495b5a7f59c..185120234899c 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -198,13 +198,13 @@ static ZEND_METHOD(_ZendTestTrait, testMethod) /* {{{ */ { /* }}} */ static const zend_function_entry zend_test_class_methods[] = { - ZEND_ME(_ZendTestClass, is_object, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - ZEND_ME(_ZendTestClass, __toString, NULL, ZEND_ACC_DEPRECATED) + ZEND_ME(_ZendTestClass, is_object, arginfo_class__ZendTestClass_is_object, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(_ZendTestClass, __toString, arginfo_class__ZendTestClass___toString, ZEND_ACC_DEPRECATED) ZEND_FE_END }; static const zend_function_entry zend_test_trait_methods[] = { - ZEND_ME(_ZendTestTrait, testMethod, NULL, ZEND_ACC_PUBLIC) + ZEND_ME(_ZendTestTrait, testMethod, arginfo_class__ZendTestTrait_testMethod, ZEND_ACC_PUBLIC) ZEND_FE_END }; diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index f86f061d77a48..b823116742ae2 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -1,5 +1,15 @@ Date: Thu, 13 Feb 2020 16:45:20 +0100 Subject: [PATCH 084/201] Give arginfo to SplFileInfo::_bad_state_ex() We should really get rid of this hack though... Wow! --- ext/spl/spl_directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 18b17ea0f292c..eb2b320792558 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1932,7 +1932,7 @@ static const zend_function_entry spl_SplFileInfo_functions[] = { SPL_ME(SplFileInfo, openFile, arginfo_info_openFile, ZEND_ACC_PUBLIC) SPL_ME(SplFileInfo, setFileClass, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) SPL_ME(SplFileInfo, setInfoClass, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, _bad_state_ex, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) + SPL_ME(SplFileInfo, _bad_state_ex, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) SPL_MA(SplFileInfo, __toString, SplFileInfo, getPathname, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) PHP_FE_END }; From 8c6a7c3326f000af0a8ea266143059e5a463e626 Mon Sep 17 00:00:00 2001 From: Mark Plomer Date: Mon, 24 Feb 2020 21:32:02 +0100 Subject: [PATCH 085/201] Fix #63206: Fully support error/exception_handler stacking, even with null or inside the handler Always push the current user_error/exception_handler to the stack, even when it is empty, so restore_error_handler() always works as expected. The user_error_handler is especially temporarily empty when we are inside the error handler, which caused inconsistent behaviour before. --- NEWS | 4 ++++ Zend/tests/bug63206.phpt | 29 +++++++++++++++++++++++++++++ Zend/tests/bug63206_1.phpt | 26 ++++++++++++++++++++++++++ Zend/tests/bug63206_2.phpt | 26 ++++++++++++++++++++++++++ Zend/zend_builtin_functions.c | 10 +++++----- 5 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 Zend/tests/bug63206.phpt create mode 100644 Zend/tests/bug63206_1.phpt create mode 100644 Zend/tests/bug63206_2.phpt diff --git a/NEWS b/NEWS index 64682a8d070bd..12208cf46ab6d 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.3.16 +- Core: + . Fixed bug #63206 (restore_error_handler does not restore previous errors + mask). (Mark Plomer) + - COM: . Fixed bug #66322 (COMPersistHelper::SaveToFile can save to wrong location). (cmb) diff --git a/Zend/tests/bug63206.phpt b/Zend/tests/bug63206.phpt new file mode 100644 index 0000000000000..dc7bb1fd1dd8b --- /dev/null +++ b/Zend/tests/bug63206.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #63206 Fully support error_handler stacking, even inside the error_handler +--FILE-- + +--EXPECTF-- +Second handler +Internal handler +Second handler +Internal handler diff --git a/Zend/tests/bug63206_1.phpt b/Zend/tests/bug63206_1.phpt new file mode 100644 index 0000000000000..f08f913824f6b --- /dev/null +++ b/Zend/tests/bug63206_1.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #63206 Fully support error_handler stacking, even with null +--FILE-- + +--EXPECTF-- +Second handler diff --git a/Zend/tests/bug63206_2.phpt b/Zend/tests/bug63206_2.phpt new file mode 100644 index 0000000000000..7a2bf385437ad --- /dev/null +++ b/Zend/tests/bug63206_2.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #63206 Fully support exception_handler stacking, even with null +--FILE-- + +--EXPECTF-- +Second handler diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index f4c4a4f31d7a9..69fbeec1e1c70 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1665,11 +1665,11 @@ ZEND_FUNCTION(set_error_handler) if (Z_TYPE(EG(user_error_handler)) != IS_UNDEF) { ZVAL_COPY(return_value, &EG(user_error_handler)); - - zend_stack_push(&EG(user_error_handlers_error_reporting), &EG(user_error_handler_error_reporting)); - zend_stack_push(&EG(user_error_handlers), &EG(user_error_handler)); } + zend_stack_push(&EG(user_error_handlers_error_reporting), &EG(user_error_handler_error_reporting)); + zend_stack_push(&EG(user_error_handlers), &EG(user_error_handler)); + if (Z_TYPE_P(error_handler) == IS_NULL) { /* unset user-defined handler */ ZVAL_UNDEF(&EG(user_error_handler)); return; @@ -1732,10 +1732,10 @@ ZEND_FUNCTION(set_exception_handler) if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) { ZVAL_COPY(return_value, &EG(user_exception_handler)); - - zend_stack_push(&EG(user_exception_handlers), &EG(user_exception_handler)); } + zend_stack_push(&EG(user_exception_handlers), &EG(user_exception_handler)); + if (Z_TYPE_P(exception_handler) == IS_NULL) { /* unset user-defined handler */ ZVAL_UNDEF(&EG(user_exception_handler)); return; From d594fba3ac7afc591ab4082c5f13f8f96fffa451 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 25 Feb 2020 17:23:46 +0100 Subject: [PATCH 086/201] Reorder checks in object ref assignment First check for IS_INDIRECT and de-indirect it directly there. Handle the error cases later. --- Zend/zend_execute.c | 53 ++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 7da6810a111eb..b851439e396bf 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2758,39 +2758,38 @@ static zend_always_inline void zend_assign_to_property_reference(zval *container zend_fetch_property_address(variable_ptr, container, container_op_type, prop_ptr, prop_op_type, cache_addr, BP_VAR_W, 0, 0 OPLINE_CC EXECUTE_DATA_CC); - if (Z_TYPE_P(variable_ptr) == IS_INDIRECT) { + if (EXPECTED(Z_TYPE_P(variable_ptr) == IS_INDIRECT)) { variable_ptr = Z_INDIRECT_P(variable_ptr); - } + if (/*OP_DATA_TYPE == IS_VAR &&*/ + (opline->extended_value & ZEND_RETURNS_FUNCTION) && + UNEXPECTED(!Z_ISREF_P(value_ptr))) { + + if (UNEXPECTED(!zend_wrong_assign_to_variable_reference( + variable_ptr, value_ptr OPLINE_CC EXECUTE_DATA_CC))) { + variable_ptr = &EG(uninitialized_zval); + } + } else { + zend_property_info *prop_info = NULL; + + if (prop_op_type == IS_CONST) { + prop_info = (zend_property_info *) CACHED_PTR_EX(cache_addr + 2); + } else { + ZVAL_DEREF(container); + prop_info = zend_object_fetch_property_type_info(Z_OBJ_P(container), variable_ptr); + } - if (UNEXPECTED(Z_ISERROR_P(variable_ptr))) { + if (UNEXPECTED(prop_info)) { + variable_ptr = zend_assign_to_typed_property_reference(prop_info, variable_ptr, value_ptr EXECUTE_DATA_CC); + } else { + zend_assign_to_variable_reference(variable_ptr, value_ptr); + } + } + } else if (Z_ISERROR_P(variable_ptr)) { variable_ptr = &EG(uninitialized_zval); - } else if (UNEXPECTED(Z_TYPE(variable) != IS_INDIRECT)) { + } else { zend_throw_error(NULL, "Cannot assign by reference to overloaded object"); zval_ptr_dtor(&variable); variable_ptr = &EG(uninitialized_zval); - } else if (/*OP_DATA_TYPE == IS_VAR &&*/ - (opline->extended_value & ZEND_RETURNS_FUNCTION) && - UNEXPECTED(!Z_ISREF_P(value_ptr))) { - - if (UNEXPECTED(!zend_wrong_assign_to_variable_reference( - variable_ptr, value_ptr OPLINE_CC EXECUTE_DATA_CC))) { - variable_ptr = &EG(uninitialized_zval); - } - } else { - zend_property_info *prop_info = NULL; - - if (prop_op_type == IS_CONST) { - prop_info = (zend_property_info *) CACHED_PTR_EX(cache_addr + 2); - } else { - ZVAL_DEREF(container); - prop_info = zend_object_fetch_property_type_info(Z_OBJ_P(container), variable_ptr); - } - - if (UNEXPECTED(prop_info)) { - variable_ptr = zend_assign_to_typed_property_reference(prop_info, variable_ptr, value_ptr EXECUTE_DATA_CC); - } else { - zend_assign_to_variable_reference(variable_ptr, value_ptr); - } } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { From bcb7847139b5fd1ccab5d5f2818aebe1eeed0fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 24 Feb 2020 23:54:49 +0100 Subject: [PATCH 087/201] Add stubs for Intl BreakIterator Closes GH-5207 --- ext/intl/breakiterator/breakiterator.stub.php | 95 +++++++++++++++++++ .../breakiterator/breakiterator_arginfo.h | 73 ++++++++++++++ .../breakiterator/breakiterator_class.cpp | 93 ++++++------------ .../breakiterator/breakiterator_iterators.cpp | 6 +- 4 files changed, 199 insertions(+), 68 deletions(-) create mode 100644 ext/intl/breakiterator/breakiterator.stub.php create mode 100644 ext/intl/breakiterator/breakiterator_arginfo.h diff --git a/ext/intl/breakiterator/breakiterator.stub.php b/ext/intl/breakiterator/breakiterator.stub.php new file mode 100644 index 0000000000000..663932d64e46e --- /dev/null +++ b/ext/intl/breakiterator/breakiterator.stub.php @@ -0,0 +1,95 @@ + @@ -285,11 +286,8 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator) ZVAL_COPY_DEREF(return_value, biter_zval); } -ZEND_BEGIN_ARG_INFO_EX(ainfo_parts_it_void, 0, 0, 0) -ZEND_END_ARG_INFO() - static const zend_function_entry IntlPartsIterator_class_functions[] = { - PHP_ME(IntlPartsIterator, getBreakIterator, ainfo_parts_it_void, ZEND_ACC_PUBLIC) + PHP_ME(IntlPartsIterator, getBreakIterator, arginfo_class_IntlPartsIterator_getBreakIterator, ZEND_ACC_PUBLIC) PHP_FE_END }; From 81fee9f29f4c02ec4159263c9b8815ab5f3c3061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 25 Feb 2020 19:57:23 +0100 Subject: [PATCH 088/201] Get rid of method mapping of BreakIterator classes --- .../breakiterator/breakiterator_class.cpp | 58 +++++++++---------- .../breakiterator/breakiterator_methods.cpp | 40 ++++++------- .../breakiterator/breakiterator_methods.h | 40 ++++++------- .../codepointiterator_methods.cpp | 2 +- .../breakiterator/codepointiterator_methods.h | 2 +- .../rulebasedbreakiterator_methods.cpp | 8 +-- .../rulebasedbreakiterator_methods.h | 8 +-- 7 files changed, 79 insertions(+), 79 deletions(-) diff --git a/ext/intl/breakiterator/breakiterator_class.cpp b/ext/intl/breakiterator/breakiterator_class.cpp index abbc413c5c2a6..301701d29e143 100644 --- a/ext/intl/breakiterator/breakiterator_class.cpp +++ b/ext/intl/breakiterator/breakiterator_class.cpp @@ -222,31 +222,31 @@ static zend_object *BreakIterator_object_create(zend_class_entry *ce) /* }}} */ /* {{{ BreakIterator_class_functions - * Every 'BreakIterator' class method has an entry in this table + * Every 'IntlBreakIterator' class method has an entry in this table */ static const zend_function_entry BreakIterator_class_functions[] = { - PHP_ME(BreakIterator, __construct, arginfo_class_IntlBreakIterator___construct, ZEND_ACC_PRIVATE) - PHP_ME_MAPPING(createWordInstance, breakiter_create_word_instance, arginfo_class_IntlBreakIterator_createWordInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(createLineInstance, breakiter_create_line_instance, arginfo_class_IntlBreakIterator_createLineInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(createCharacterInstance, breakiter_create_character_instance, arginfo_class_IntlBreakIterator_createCharacterInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(createSentenceInstance, breakiter_create_sentence_instance, arginfo_class_IntlBreakIterator_createSentenceInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(createTitleInstance, breakiter_create_title_instance, arginfo_class_IntlBreakIterator_createTitleInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(createCodePointInstance, breakiter_create_code_point_instance, arginfo_class_IntlBreakIterator_createCodePointInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getText, breakiter_get_text, arginfo_class_IntlBreakIterator_getText, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(setText, breakiter_set_text, arginfo_class_IntlBreakIterator_setText, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(first, breakiter_first, arginfo_class_IntlBreakIterator_first, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(last, breakiter_last, arginfo_class_IntlBreakIterator_last, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(previous, breakiter_previous, arginfo_class_IntlBreakIterator_previous, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(next, breakiter_next, arginfo_class_IntlBreakIterator_next, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(current, breakiter_current, arginfo_class_IntlBreakIterator_current, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(following, breakiter_following, arginfo_class_IntlBreakIterator_following, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(preceding, breakiter_preceding, arginfo_class_IntlBreakIterator_preceding, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(isBoundary, breakiter_is_boundary, arginfo_class_IntlBreakIterator_isBoundary, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getLocale, breakiter_get_locale, arginfo_class_IntlBreakIterator_getLocale, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getPartsIterator, breakiter_get_parts_iterator, arginfo_class_IntlBreakIterator_getPartsIterator, ZEND_ACC_PUBLIC) - - PHP_ME_MAPPING(getErrorCode, breakiter_get_error_code, arginfo_class_IntlBreakIterator_getErrorCode, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getErrorMessage, breakiter_get_error_message, arginfo_class_IntlBreakIterator_getErrorMessage, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, __construct, arginfo_class_IntlBreakIterator___construct, ZEND_ACC_PRIVATE) + PHP_ME(BreakIterator, createWordInstance, arginfo_class_IntlBreakIterator_createWordInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, createLineInstance, arginfo_class_IntlBreakIterator_createLineInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, createCharacterInstance, arginfo_class_IntlBreakIterator_createCharacterInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, createSentenceInstance, arginfo_class_IntlBreakIterator_createSentenceInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, createTitleInstance, arginfo_class_IntlBreakIterator_createTitleInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, createCodePointInstance, arginfo_class_IntlBreakIterator_createCodePointInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, getText, arginfo_class_IntlBreakIterator_getText, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, setText, arginfo_class_IntlBreakIterator_setText, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, first, arginfo_class_IntlBreakIterator_first, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, last, arginfo_class_IntlBreakIterator_last, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, previous, arginfo_class_IntlBreakIterator_previous, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, next, arginfo_class_IntlBreakIterator_next, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, current, arginfo_class_IntlBreakIterator_current, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, following, arginfo_class_IntlBreakIterator_following, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, preceding, arginfo_class_IntlBreakIterator_preceding, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, isBoundary, arginfo_class_IntlBreakIterator_isBoundary, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, getLocale, arginfo_class_IntlBreakIterator_getLocale, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, getPartsIterator, arginfo_class_IntlBreakIterator_getPartsIterator, ZEND_ACC_PUBLIC) + + PHP_ME(BreakIterator, getErrorCode, arginfo_class_IntlBreakIterator_getErrorCode, ZEND_ACC_PUBLIC) + PHP_ME(BreakIterator, getErrorMessage, arginfo_class_IntlBreakIterator_getErrorMessage, ZEND_ACC_PUBLIC) PHP_FE_END }; /* }}} */ @@ -254,11 +254,11 @@ static const zend_function_entry BreakIterator_class_functions[] = { /* {{{ RuleBasedBreakIterator_class_functions */ static const zend_function_entry RuleBasedBreakIterator_class_functions[] = { - PHP_ME(IntlRuleBasedBreakIterator, __construct, arginfo_class_IntlRuleBasedBreakIterator___construct, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getRules, rbbi_get_rules, arginfo_class_IntlRuleBasedBreakIterator_getRules, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getRuleStatus, rbbi_get_rule_status, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatus, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getRuleStatusVec, rbbi_get_rule_status_vec, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatusVec, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getBinaryRules, rbbi_get_binary_rules, arginfo_class_IntlRuleBasedBreakIterator_getBinaryRules, ZEND_ACC_PUBLIC) + PHP_ME(IntlRuleBasedBreakIterator, __construct, arginfo_class_IntlRuleBasedBreakIterator___construct, ZEND_ACC_PUBLIC) + PHP_ME(IntlRuleBasedBreakIterator, getRules, arginfo_class_IntlRuleBasedBreakIterator_getRules, ZEND_ACC_PUBLIC) + PHP_ME(IntlRuleBasedBreakIterator, getRuleStatus, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatus, ZEND_ACC_PUBLIC) + PHP_ME(IntlRuleBasedBreakIterator, getRuleStatusVec, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatusVec, ZEND_ACC_PUBLIC) + PHP_ME(IntlRuleBasedBreakIterator, getBinaryRules, arginfo_class_IntlRuleBasedBreakIterator_getBinaryRules, ZEND_ACC_PUBLIC) PHP_FE_END }; /* }}} */ @@ -266,7 +266,7 @@ static const zend_function_entry RuleBasedBreakIterator_class_functions[] = { /* {{{ CodePointBreakIterator_class_functions */ static const zend_function_entry CodePointBreakIterator_class_functions[] = { - PHP_ME_MAPPING(getLastCodePoint, cpbi_get_last_code_point, arginfo_class_IntlCodePointBreakIterator_getLastCodePoint, ZEND_ACC_PUBLIC) + PHP_ME(IntlCodePointBreakIterator, getLastCodePoint, arginfo_class_IntlCodePointBreakIterator_getLastCodePoint, ZEND_ACC_PUBLIC) PHP_FE_END }; /* }}} */ diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp index fc1c813499b5a..3c9e93b160283 100644 --- a/ext/intl/breakiterator/breakiterator_methods.cpp +++ b/ext/intl/breakiterator/breakiterator_methods.cpp @@ -73,42 +73,42 @@ static void _breakiter_factory(const char *func_name, breakiterator_object_create(return_value, biter, 1); } -U_CFUNC PHP_FUNCTION(breakiter_create_word_instance) +U_CFUNC PHP_METHOD(BreakIterator, createWordInstance) { _breakiter_factory("breakiter_create_word_instance", &BreakIterator::createWordInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_create_line_instance) +U_CFUNC PHP_METHOD(BreakIterator, createLineInstance) { _breakiter_factory("breakiter_create_line_instance", &BreakIterator::createLineInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_create_character_instance) +U_CFUNC PHP_METHOD(BreakIterator, createCharacterInstance) { _breakiter_factory("breakiter_create_character_instance", &BreakIterator::createCharacterInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_create_sentence_instance) +U_CFUNC PHP_METHOD(BreakIterator, createSentenceInstance) { _breakiter_factory("breakiter_create_sentence_instance", &BreakIterator::createSentenceInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_create_title_instance) +U_CFUNC PHP_METHOD(BreakIterator, createTitleInstance) { _breakiter_factory("breakiter_create_title_instance", &BreakIterator::createTitleInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_create_code_point_instance) +U_CFUNC PHP_METHOD(BreakIterator, createCodePointInstance) { intl_error_reset(NULL); @@ -120,7 +120,7 @@ U_CFUNC PHP_FUNCTION(breakiter_create_code_point_instance) breakiterator_object_create(return_value, cpbi, 1); } -U_CFUNC PHP_FUNCTION(breakiter_get_text) +U_CFUNC PHP_METHOD(BreakIterator, getText) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -138,7 +138,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_text) } } -U_CFUNC PHP_FUNCTION(breakiter_set_text) +U_CFUNC PHP_METHOD(BreakIterator, setText) { UText *ut = NULL; zend_string *text; @@ -217,28 +217,28 @@ static void _breakiter_int32_ret_int32( RETURN_LONG((zend_long)res); } -U_CFUNC PHP_FUNCTION(breakiter_first) +U_CFUNC PHP_METHOD(BreakIterator, first) { _breakiter_no_args_ret_int32("breakiter_first", &BreakIterator::first, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_last) +U_CFUNC PHP_METHOD(BreakIterator, last) { _breakiter_no_args_ret_int32("breakiter_last", &BreakIterator::last, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_previous) +U_CFUNC PHP_METHOD(BreakIterator, previous) { _breakiter_no_args_ret_int32("breakiter_previous", &BreakIterator::previous, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_next) +U_CFUNC PHP_METHOD(BreakIterator, next) { bool no_arg_version = false; @@ -267,7 +267,7 @@ U_CFUNC PHP_FUNCTION(breakiter_next) } } -U_CFUNC PHP_FUNCTION(breakiter_current) +U_CFUNC PHP_METHOD(BreakIterator, current) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -283,21 +283,21 @@ U_CFUNC PHP_FUNCTION(breakiter_current) RETURN_LONG((zend_long)res); } -U_CFUNC PHP_FUNCTION(breakiter_following) +U_CFUNC PHP_METHOD(BreakIterator, following) { _breakiter_int32_ret_int32("breakiter_following", &BreakIterator::following, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_preceding) +U_CFUNC PHP_METHOD(BreakIterator, preceding) { _breakiter_int32_ret_int32("breakiter_preceding", &BreakIterator::preceding, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(breakiter_is_boundary) +U_CFUNC PHP_METHOD(BreakIterator, isBoundary) { zend_long offset; BREAKITER_METHOD_INIT_VARS; @@ -322,7 +322,7 @@ U_CFUNC PHP_FUNCTION(breakiter_is_boundary) RETURN_BOOL((zend_long)res); } -U_CFUNC PHP_FUNCTION(breakiter_get_locale) +U_CFUNC PHP_METHOD(BreakIterator, getLocale) { zend_long locale_type; BREAKITER_METHOD_INIT_VARS; @@ -348,7 +348,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_locale) RETURN_STRING(locale.getName()); } -U_CFUNC PHP_FUNCTION(breakiter_get_parts_iterator) +U_CFUNC PHP_METHOD(BreakIterator, getPartsIterator) { zend_long key_type = 0; BREAKITER_METHOD_INIT_VARS; @@ -372,7 +372,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_parts_iterator) object, return_value, (parts_iter_key_type)key_type); } -U_CFUNC PHP_FUNCTION(breakiter_get_error_code) +U_CFUNC PHP_METHOD(BreakIterator, getErrorCode) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -386,7 +386,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_code) RETURN_LONG((zend_long)BREAKITER_ERROR_CODE(bio)); } -U_CFUNC PHP_FUNCTION(breakiter_get_error_message) +U_CFUNC PHP_METHOD(BreakIterator, getErrorMessage) { zend_string* message = NULL; BREAKITER_METHOD_INIT_VARS; diff --git a/ext/intl/breakiterator/breakiterator_methods.h b/ext/intl/breakiterator/breakiterator_methods.h index 2aef4594411b3..880fdc168f3fe 100644 --- a/ext/intl/breakiterator/breakiterator_methods.h +++ b/ext/intl/breakiterator/breakiterator_methods.h @@ -19,44 +19,44 @@ PHP_METHOD(BreakIterator, __construct); -PHP_FUNCTION(breakiter_create_word_instance); +PHP_METHOD(BreakIterator, createWordInstance); -PHP_FUNCTION(breakiter_create_line_instance); +PHP_METHOD(BreakIterator, createLineInstance); -PHP_FUNCTION(breakiter_create_character_instance); +PHP_METHOD(BreakIterator, createCharacterInstance); -PHP_FUNCTION(breakiter_create_sentence_instance); +PHP_METHOD(BreakIterator, createSentenceInstance); -PHP_FUNCTION(breakiter_create_title_instance); +PHP_METHOD(BreakIterator, createTitleInstance); -PHP_FUNCTION(breakiter_create_code_point_instance); +PHP_METHOD(BreakIterator, createCodePointInstance); -PHP_FUNCTION(breakiter_get_text); +PHP_METHOD(BreakIterator, getText); -PHP_FUNCTION(breakiter_set_text); +PHP_METHOD(BreakIterator, setText); -PHP_FUNCTION(breakiter_first); +PHP_METHOD(BreakIterator, first); -PHP_FUNCTION(breakiter_last); +PHP_METHOD(BreakIterator, last); -PHP_FUNCTION(breakiter_previous); +PHP_METHOD(BreakIterator, previous); -PHP_FUNCTION(breakiter_next); +PHP_METHOD(BreakIterator, next); -PHP_FUNCTION(breakiter_current); +PHP_METHOD(BreakIterator, current); -PHP_FUNCTION(breakiter_following); +PHP_METHOD(BreakIterator, following); -PHP_FUNCTION(breakiter_preceding); +PHP_METHOD(BreakIterator, preceding); -PHP_FUNCTION(breakiter_is_boundary); +PHP_METHOD(BreakIterator, isBoundary); -PHP_FUNCTION(breakiter_get_locale); +PHP_METHOD(BreakIterator, getLocale); -PHP_FUNCTION(breakiter_get_parts_iterator); +PHP_METHOD(BreakIterator, getPartsIterator); -PHP_FUNCTION(breakiter_get_error_code); +PHP_METHOD(BreakIterator, getErrorCode); -PHP_FUNCTION(breakiter_get_error_message); +PHP_METHOD(BreakIterator, getErrorMessage); #endif diff --git a/ext/intl/breakiterator/codepointiterator_methods.cpp b/ext/intl/breakiterator/codepointiterator_methods.cpp index 12df7949257e5..6409b5e05cf4d 100644 --- a/ext/intl/breakiterator/codepointiterator_methods.cpp +++ b/ext/intl/breakiterator/codepointiterator_methods.cpp @@ -25,7 +25,7 @@ static inline CodePointBreakIterator *fetch_cpbi(BreakIterator_object *bio) { return (CodePointBreakIterator*)bio->biter; } -U_CFUNC PHP_FUNCTION(cpbi_get_last_code_point) +U_CFUNC PHP_METHOD(IntlCodePointBreakIterator, getLastCodePoint) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; diff --git a/ext/intl/breakiterator/codepointiterator_methods.h b/ext/intl/breakiterator/codepointiterator_methods.h index 867326cada3c8..04576d0eb1d1d 100644 --- a/ext/intl/breakiterator/codepointiterator_methods.h +++ b/ext/intl/breakiterator/codepointiterator_methods.h @@ -17,6 +17,6 @@ #include -PHP_FUNCTION(cpbi_get_last_code_point); +PHP_METHOD(IntlCodePointBreakIterator, getLastCodePoint); #endif diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp index 04031733d94ce..3e49b1ceb3172 100644 --- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp +++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp @@ -95,7 +95,7 @@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, __construct) zend_restore_error_handling(&error_handling); } -U_CFUNC PHP_FUNCTION(rbbi_get_rules) +U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRules) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -120,7 +120,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rules) RETVAL_STR(u8str); } -U_CFUNC PHP_FUNCTION(rbbi_get_rule_status) +U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatus) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -134,7 +134,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rule_status) RETURN_LONG(fetch_rbbi(bio)->getRuleStatus()); } -U_CFUNC PHP_FUNCTION(rbbi_get_rule_status_vec) +U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatusVec) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -172,7 +172,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rule_status_vec) delete[] rules; } -U_CFUNC PHP_FUNCTION(rbbi_get_binary_rules) +U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getBinaryRules) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.h b/ext/intl/breakiterator/rulebasedbreakiterator_methods.h index 88528f928e76f..9b6802bcfaa35 100644 --- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.h +++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.h @@ -19,12 +19,12 @@ PHP_METHOD(IntlRuleBasedBreakIterator, __construct); -PHP_FUNCTION(rbbi_get_rules); +PHP_METHOD(IntlRuleBasedBreakIterator, getRules); -PHP_FUNCTION(rbbi_get_rule_status); +PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatus); -PHP_FUNCTION(rbbi_get_rule_status_vec); +PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatusVec); -PHP_FUNCTION(rbbi_get_binary_rules); +PHP_METHOD(IntlRuleBasedBreakIterator, getBinaryRules); #endif From 1fdc53bc960ba1708131208874ec02a8c6fb7e8f Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 24 Feb 2020 00:04:12 +0100 Subject: [PATCH 089/201] Remove deprecated capture_session_meta OpenSSL stream context Closes GH-5200 --- ext/openssl/tests/session_meta_capture.phpt | 18 +++--- .../tests/session_meta_capture_tlsv13.phpt | 8 +-- ext/openssl/xp_ssl.c | 62 ------------------- 3 files changed, 10 insertions(+), 78 deletions(-) diff --git a/ext/openssl/tests/session_meta_capture.phpt b/ext/openssl/tests/session_meta_capture.phpt index c5840057b1bad..e61ef923e63af 100644 --- a/ext/openssl/tests/session_meta_capture.phpt +++ b/ext/openssl/tests/session_meta_capture.phpt @@ -34,26 +34,22 @@ $clientCode = <<<'CODE' $clientCtx = stream_context_create(['ssl' => [ 'verify_peer' => true, 'cafile' => '%s', - 'peer_name' => '%s', - 'capture_session_meta' => true, + 'peer_name' => '%s' ]]); phpt_wait(); stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT); - @stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx); - $meta = stream_context_get_options($clientCtx)['ssl']['session_meta']; - var_dump($meta['protocol']); + $stream = stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx); + var_dump(stream_get_meta_data($stream)['crypto']['protocol']); stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT); - @stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx); - $meta = stream_context_get_options($clientCtx)['ssl']['session_meta']; - var_dump($meta['protocol']); + $stream = stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx); + var_dump(stream_get_meta_data($stream)['crypto']['protocol']); stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT); - @stream_socket_client($serverUri, $errno, $errstr, 2, $clientFlags, $clientCtx); - $meta = stream_context_get_options($clientCtx)['ssl']['session_meta']; - var_dump($meta['protocol']); + $stream = stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx); + var_dump(stream_get_meta_data($stream)['crypto']['protocol']); CODE; $clientCode = sprintf($clientCode, $cacertFile, $peerName); diff --git a/ext/openssl/tests/session_meta_capture_tlsv13.phpt b/ext/openssl/tests/session_meta_capture_tlsv13.phpt index 0f92463faef50..717f832049c38 100644 --- a/ext/openssl/tests/session_meta_capture_tlsv13.phpt +++ b/ext/openssl/tests/session_meta_capture_tlsv13.phpt @@ -33,16 +33,14 @@ $clientCode = <<<'CODE' $clientCtx = stream_context_create(['ssl' => [ 'verify_peer' => true, 'cafile' => '%s', - 'peer_name' => '%s', - 'capture_session_meta' => true, + 'peer_name' => '%s' ]]); phpt_wait(); stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT); - @stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx); - $meta = stream_context_get_options($clientCtx)['ssl']['session_meta']; - var_dump($meta['protocol']); + $stream = stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx); + var_dump(stream_get_meta_data($stream)['crypto']['protocol']); CODE; $clientCode = sprintf($clientCode, $cacertFile, $peerName); diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index da175dcfb9eab..85153b86f8bef 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -1820,50 +1820,6 @@ int php_openssl_setup_crypto(php_stream *stream, } /* }}} */ -static zend_array *php_openssl_capture_session_meta(SSL *ssl_handle) /* {{{ */ -{ - zval meta_arr; - char *proto_str; - long proto = SSL_version(ssl_handle); - const SSL_CIPHER *cipher = SSL_get_current_cipher(ssl_handle); - - switch (proto) { -#ifdef HAVE_TLS13 - case TLS1_3_VERSION: - proto_str = "TLSv1.3"; - break; -#endif -#ifdef HAVE_TLS12 - case TLS1_2_VERSION: - proto_str = "TLSv1.2"; - break; -#endif -#ifdef HAVE_TLS11 - case TLS1_1_VERSION: - proto_str = "TLSv1.1"; - break; -#endif - case TLS1_VERSION: - proto_str = "TLSv1"; - break; -#ifdef HAVE_SSL3 - case SSL3_VERSION: - proto_str = "SSLv3"; - break; -#endif - default: proto_str = "UNKNOWN"; - } - - array_init(&meta_arr); - add_assoc_string(&meta_arr, "protocol", proto_str); - add_assoc_string(&meta_arr, "cipher_name", (char *) SSL_CIPHER_get_name(cipher)); - add_assoc_long(&meta_arr, "cipher_bits", SSL_CIPHER_get_bits(cipher, NULL)); - add_assoc_string(&meta_arr, "cipher_version", SSL_CIPHER_get_version(cipher)); - - return Z_ARR(meta_arr); -} -/* }}} */ - static int php_openssl_capture_peer_certs(php_stream *stream, php_openssl_netstream_data_t *sslsock, X509 *peer_cert) /* {{{ */ { @@ -2015,24 +1971,6 @@ static int php_openssl_enable_crypto(php_stream *stream, n = -1; } else { sslsock->ssl_active = 1; - - if (PHP_STREAM_CONTEXT(stream)) { - zval *val; - if (NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), - "ssl", "capture_session_meta")) - ) { - php_error(E_DEPRECATED, - "capture_session_meta is deprecated; its information is now available via stream_get_meta_data()" - ); - } - - if (val && zend_is_true(val)) { - zval meta_arr; - ZVAL_ARR(&meta_arr, php_openssl_capture_session_meta(sslsock->ssl_handle)); - php_stream_context_set_option(PHP_STREAM_CONTEXT(stream), "ssl", "session_meta", &meta_arr); - zval_ptr_dtor(&meta_arr); - } - } } } else if (errno == EAGAIN) { n = 0; From 8d30d5f26944f98ef370cc09a638461510e9ad2b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 25 Feb 2020 12:31:51 +0100 Subject: [PATCH 090/201] Add stubs for COMPersistHelper --- ext/com_dotnet/com_persist.c | 50 +++++++++++++++++----------- ext/com_dotnet/com_persist.stub.php | 21 ++++++++++++ ext/com_dotnet/com_persist_arginfo.h | 30 +++++++++++++++++ 3 files changed, 82 insertions(+), 19 deletions(-) create mode 100644 ext/com_dotnet/com_persist.stub.php create mode 100644 ext/com_dotnet/com_persist_arginfo.h diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c index 656215dd1aa01..f9eb36f105acb 100644 --- a/ext/com_dotnet/com_persist.c +++ b/ext/com_dotnet/com_persist.c @@ -29,6 +29,7 @@ #include "php_com_dotnet.h" #include "php_com_dotnet_internal.h" #include "Zend/zend_exceptions.h" +#include "com_persist_arginfo.h" /* {{{ expose php_stream as a COM IStream */ @@ -336,6 +337,10 @@ CPH_METHOD(GetCurFileName) OLECHAR *olename = NULL; CPH_FETCH(); + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } + CPH_NO_OBJ(); res = get_persist_file(helper); @@ -374,15 +379,15 @@ CPH_METHOD(SaveToFile) OLECHAR *olefilename = NULL; CPH_FETCH(); + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "p!|b", + &filename, &filename_len, &remember)) { + RETURN_THROWS(); + } + CPH_NO_OBJ(); res = get_persist_file(helper); if (helper->ipf) { - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "p!|b", - &filename, &filename_len, &remember)) { - RETURN_THROWS(); - } - if (filename) { fullpath = expand_filepath(filename, NULL); if (!fullpath) { @@ -436,16 +441,15 @@ CPH_METHOD(LoadFromFile) OLECHAR *olefilename; CPH_FETCH(); + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "p|l", + &filename, &filename_len, &flags)) { + RETURN_THROWS(); + } + CPH_NO_OBJ(); res = get_persist_file(helper); if (helper->ipf) { - - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "p|l", - &filename, &filename_len, &flags)) { - RETURN_THROWS(); - } - if (!(fullpath = expand_filepath(filename, NULL))) { RETURN_FALSE; } @@ -479,6 +483,10 @@ CPH_METHOD(GetMaxStreamSize) ULARGE_INTEGER size; CPH_FETCH(); + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } + CPH_NO_OBJ(); res = get_persist_stream_init(helper); @@ -510,6 +518,10 @@ CPH_METHOD(InitNew) HRESULT res; CPH_FETCH(); + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } + CPH_NO_OBJ(); res = get_persist_stream_init(helper); @@ -671,14 +683,14 @@ CPH_METHOD(__construct) static const zend_function_entry com_persist_helper_methods[] = { - CPH_ME(__construct, NULL) - CPH_ME(GetCurFileName, NULL) - CPH_ME(SaveToFile, NULL) - CPH_ME(LoadFromFile, NULL) - CPH_ME(GetMaxStreamSize, NULL) - CPH_ME(InitNew, NULL) - CPH_ME(LoadFromStream, NULL) - CPH_ME(SaveToStream, NULL) + CPH_ME(__construct, arginfo_class_COMPersistHelper___construct) + CPH_ME(GetCurFileName, arginfo_class_COMPersistHelper_GetCurFileName) + CPH_ME(SaveToFile, arginfo_class_COMPersistHelper_SaveToFile) + CPH_ME(LoadFromFile, arginfo_class_COMPersistHelper_LoadFromFile) + CPH_ME(GetMaxStreamSize, arginfo_class_COMPersistHelper_GetMaxStreamSize) + CPH_ME(InitNew, arginfo_class_COMPersistHelper_InitNew) + CPH_ME(LoadFromStream, arginfo_class_COMPersistHelper_LoadFromStream) + CPH_ME(SaveToStream, arginfo_class_COMPersistHelper_SaveToStream) PHP_FE_END }; diff --git a/ext/com_dotnet/com_persist.stub.php b/ext/com_dotnet/com_persist.stub.php new file mode 100644 index 0000000000000..5f183b175a72d --- /dev/null +++ b/ext/com_dotnet/com_persist.stub.php @@ -0,0 +1,21 @@ + Date: Thu, 13 Feb 2020 16:38:51 +0100 Subject: [PATCH 091/201] Require all internal functions to have arginfo --- UPGRADING.INTERNALS | 4 ++++ Zend/zend_API.c | 6 +++++- Zend/zend_inheritance.c | 8 -------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 6381b22d37486..af8c5218c25f3 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -13,6 +13,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES j. compare_objects() and compare() object handlers k. The 'I' length modifier l. Some VM instructions switched to IS_TMP_VAR result instead of IS_VAR + m. All internal functions must have arginfo 2. Build system changes a. Abstract @@ -98,6 +99,9 @@ PHP 8.0 INTERNALS UPGRADE NOTES pre increments/decrements (ZEND_PRE_INC, ZEND_PRE_DEC, ZEND_PRE_INC_OBJ ZEND_PRE_DEC_OBJ, ZEND_PRE_INC_STATIC_PROP ZEND_PRE_DEC_STATIC_PROP). + m. All internal functions and methods are now required to specify arginfo + information, otherwise warnings will be thrown on startup. + ======================== 2. Build system changes ======================== diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 595208033b189..a739303cf3156 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2042,9 +2042,9 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio } else { internal_function->fn_flags = ZEND_ACC_PUBLIC; } + if (ptr->arg_info) { zend_internal_function_info *info = (zend_internal_function_info*)ptr->arg_info; - internal_function->arg_info = (zend_internal_arg_info*)ptr->arg_info+1; internal_function->num_args = ptr->num_args; /* Currently you cannot denote that the function can accept less arguments than num_args */ @@ -2072,10 +2072,14 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio internal_function->fn_flags |= ZEND_ACC_HAS_RETURN_TYPE; } } else { + zend_error(E_CORE_WARNING, "Missing arginfo for %s%s%s()", + scope ? ZSTR_VAL(scope->name) : "", scope ? "::" : "", ptr->fname); + internal_function->arg_info = NULL; internal_function->num_args = 0; internal_function->required_num_args = 0; } + zend_set_function_arg_flags((zend_function*)internal_function); if (ptr->flags & ZEND_ACC_ABSTRACT) { if (scope) { diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 219c1ffcc9f06..587d4b2634991 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -530,14 +530,6 @@ static inheritance_status zend_do_perform_implementation_check( inheritance_status status, local_status; zend_bool proto_is_variadic, fe_is_variadic; - /* If it's a user function then arg_info == NULL means we don't have any parameters but - * we still need to do the arg number checks. We are only willing to ignore this for internal - * functions because extensions don't always define arg_info. - */ - if (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION) { - return INHERITANCE_SUCCESS; - } - /* Checks for constructors only if they are declared in an interface, * or explicitly marked as abstract */ From c7094d892639fedffb67c273f8fd44f3ffff86d6 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sat, 22 Feb 2020 02:16:38 +0100 Subject: [PATCH 092/201] Fix mbstring regex variable types to correspond to Oniguruma The beginning and ending of a Oniguruma Regex are stored in a OnigRegion (which is a typedef to the Oniguruma re_registers struct) as as int* therefore change the type from size_t to int Closes GH-5196 --- ext/mbstring/php_mbregex.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 8de9d2d30203f..ceda96398ea65 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -1390,7 +1390,9 @@ _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode) char *arg_pattern = NULL, *arg_options = NULL; size_t arg_pattern_len, arg_options_len; int err; - size_t n, i, pos, len, beg, end; + size_t n, i, pos, len; + /* Stored as int* in the OnigRegion struct */ + int beg, end; OnigOptionType option; OnigUChar *str; OnigSyntaxType *syntax; @@ -1585,7 +1587,9 @@ PHP_FUNCTION(mb_ereg_search_init) Get matched substring of the last time */ PHP_FUNCTION(mb_ereg_search_getregs) { - size_t n, i, len, beg, end; + size_t n, i, len; + /* Stored as int* in the OnigRegion struct */ + int beg, end; OnigUChar *str; if (zend_parse_parameters_none() == FAILURE) { From 960318ed95d17bd30c2896e2f3189ebffb965dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 25 Feb 2020 20:58:33 +0100 Subject: [PATCH 093/201] Change argument error message format Closes GH-5211 --- Zend/tests/008.phpt | 2 +- Zend/tests/009.phpt | 4 +- Zend/tests/arrow_functions/006.phpt | 4 +- Zend/tests/bug31720.phpt | 2 +- Zend/tests/bug39003.phpt | 2 +- Zend/tests/bug42802.phpt | 2 +- Zend/tests/bug43332_1.phpt | 2 +- Zend/tests/bug45186.phpt | 2 +- Zend/tests/bug45186_2.phpt | 4 +- Zend/tests/bug48770_2.phpt | 4 +- Zend/tests/bug48770_3.phpt | 2 +- Zend/tests/bug61273.phpt | 2 +- Zend/tests/bug68446.phpt | 2 +- Zend/tests/bug70895.phpt | 6 +- Zend/tests/bug70898.phpt | 2 +- Zend/tests/bug72598.phpt | 4 +- Zend/tests/bug72598_2.phpt | 4 +- Zend/tests/bug73954.phpt | 2 +- Zend/tests/bug74164.phpt | 2 +- Zend/tests/call_user_func_001.phpt | 4 +- Zend/tests/call_user_func_002.phpt | 8 +- Zend/tests/call_user_func_006.phpt | 4 +- Zend/tests/call_user_func_007.phpt | 2 +- Zend/tests/call_user_func_008.phpt | 16 +- Zend/tests/call_user_func_009.phpt | 4 +- .../call_user_func_array_invalid_type.phpt | 2 +- Zend/tests/closure_027.phpt | 2 +- Zend/tests/closure_059.phpt | 6 +- Zend/tests/exception_017.phpt | 2 +- Zend/tests/exception_handler_004.phpt | 4 +- ...ument_count_incorrect_userland_strict.phpt | 4 +- .../variadic_argument_type_error.phpt | 4 +- .../generators/generator_with_type_check.phpt | 2 +- .../generator_with_type_check_2.phpt | 4 +- .../generators/throw_not_an_exception.phpt | 2 +- ...methods-on-non-objects-call-user-func.phpt | 2 +- Zend/tests/ns_071.phpt | 2 +- Zend/tests/ns_072.phpt | 2 +- .../type_hint_in_class_method.phpt | 2 +- .../object_types/type_hint_in_function.phpt | 2 +- Zend/tests/objects_022.phpt | 2 +- Zend/tests/trait_type_errors.phpt | 4 +- Zend/tests/type_declarations/array_001.phpt | 2 +- .../tests/type_declarations/callable_001.phpt | 2 +- .../explicit_weak_include_strict.phpt | 2 +- ...inexistent_class_hint_with_scalar_arg.phpt | 2 +- .../internal_function_strict_mode.phpt | 6 +- .../tests/type_declarations/iterable_001.phpt | 2 +- .../tests/type_declarations/scalar_basic.phpt | 48 ++--- .../scalar_constant_defaults.phpt | 4 +- .../scalar_constant_defaults_error.phpt | 2 +- Zend/tests/type_declarations/scalar_null.phpt | 8 +- .../type_declarations/scalar_strict.phpt | 102 +++++------ .../scalar_strict_64bit.phpt | 102 +++++------ .../scalar_strict_basic.phpt | 60 +++---- .../type_declarations/strict_call_weak.phpt | 2 +- .../strict_call_weak_explicit.phpt | 2 +- .../union_types/multiple_classes.phpt | 2 +- .../union_types/type_checking_strict.phpt | 170 +++++++++--------- .../union_types/type_checking_weak.phpt | 72 ++++---- .../weak_include_strict.phpt | 2 +- Zend/tests/typehints/or_null.phpt | 18 +- Zend/tests/variadic/typehint_error.phpt | 2 +- .../variadic/typehint_suppressed_error.phpt | 2 +- Zend/zend_API.c | 21 +-- Zend/zend_builtin_functions.c | 4 +- Zend/zend_execute.c | 26 +-- Zend/zend_execute_API.c | 2 +- Zend/zend_vm_def.h | 8 +- Zend/zend_vm_execute.h | 22 +-- ext/curl/tests/curl_setopt_error.phpt | 2 +- ext/date/tests/014.phpt | 2 +- ext/date/tests/68062.phpt | 2 +- .../DateTimeImmutable_createFromMutable.phpt | 2 +- .../tests/DateTime_createFromImmutable.phpt | 2 +- ext/date/tests/bug36988.phpt | 2 +- ext/date/tests/bug52062.phpt | 2 +- ext/date/tests/bug70245.phpt | 2 +- ext/date/tests/microtime_error.phpt | 4 +- ext/date/tests/timezone_offset_get_error.phpt | 12 +- ext/ffi/tests/045.phpt | 2 +- ext/fileinfo/tests/finfo_open_001.phpt | 2 +- ext/fileinfo/tests/finfo_open_error.phpt | 4 +- ext/gd/tests/imagegd2_nullbyte_injection.phpt | 2 +- ext/gd/tests/imagegd_nullbyte_injection.phpt | 2 +- ext/gd/tests/imagexbm_nullbyte_injection.phpt | 2 +- ext/gmp/tests/gmp_clrbit.phpt | 2 +- ext/gmp/tests/gmp_pow.phpt | 2 +- ext/gmp/tests/gmp_setbit.phpt | 4 +- ext/imap/tests/imap_expunge_error.phpt | 4 +- ext/imap/tests/imap_gc_error.phpt | 4 +- ext/imap/tests/imap_headers.phpt | 4 +- ext/imap/tests/imap_num_msg_error.phpt | 4 +- ext/imap/tests/imap_num_recent_error.phpt | 4 +- ext/imap/tests/imap_ping_error.phpt | 4 +- ext/imap/tests/imap_timeout_basic.phpt | 2 +- .../tests/breakiter___construct_error.phpt | 2 +- ext/intl/tests/bug48227.phpt | 4 +- ext/intl/tests/calendar_add_error.phpt | 2 +- .../tests/calendar_before_after_error.phpt | 4 +- ext/intl/tests/calendar_clear_error.phpt | 2 +- ext/intl/tests/calendar_equals_error.phpt | 6 +- .../tests/calendar_fieldDifference_error.phpt | 2 +- .../calendar_getDayOfWeekType_error.phpt | 2 +- .../tests/calendar_getErrorCode_error.phpt | 2 +- .../tests/calendar_getErrorMessage_error.phpt | 2 +- .../calendar_getFirstDayOfWeek_error.phpt | 2 +- ...endar_getMinimalDaysInFirstWeek_error.phpt | 2 +- ...tSkipped_RepeatedWallTimeOption_error.phpt | 2 +- .../tests/calendar_getTimeZone_error.phpt | 2 +- ext/intl/tests/calendar_getTime_error.phpt | 2 +- ext/intl/tests/calendar_getType_error.phpt | 2 +- .../calendar_getWeekendTransition_error.phpt | 2 +- ..._Least_Greatest_Minimum_Maximum_error.phpt | 8 +- ...r_get_getActualMaximum_Minumum_error2.phpt | 6 +- .../tests/calendar_inDaylightTime_error.phpt | 2 +- .../tests/calendar_isEquivalentTo_error.phpt | 8 +- ext/intl/tests/calendar_isLenient_error.phpt | 2 +- ext/intl/tests/calendar_isSet_error.phpt | 2 +- ext/intl/tests/calendar_isWeekend_error.phpt | 2 +- ext/intl/tests/calendar_roll_error.phpt | 2 +- .../calendar_setFirstDayOfWeek_error.phpt | 2 +- ext/intl/tests/calendar_setLenient_error.phpt | 2 +- ...endar_setMinimalDaysInFirstWeek_error.phpt | 2 +- ...tSkipped_RepeatedWallTimeOption_error.phpt | 2 +- .../tests/calendar_setTimeZone_error.phpt | 2 +- ext/intl/tests/calendar_set_error.phpt | 2 +- ext/intl/tests/calendar_toDateTime_error.phpt | 2 +- ext/intl/tests/formatter_fail.phpt | 6 +- .../gregoriancalendar___construct_error.phpt | 2 +- ...riancalendar_getGregorianChange_error.phpt | 2 +- .../gregoriancalendar_isLeapYear_error.phpt | 2 +- ext/intl/tests/msgfmt_fail2.phpt | 6 +- .../tests/timezone_getDSTSavings_error.phpt | 2 +- .../tests/timezone_getDisplayName_error.phpt | 2 +- .../tests/timezone_getErrorCode_error.phpt | 2 +- .../tests/timezone_getErrorMessage_error.phpt | 2 +- ext/intl/tests/timezone_getID_error.phpt | 2 +- ext/intl/tests/timezone_getOffset_error.phpt | 2 +- .../tests/timezone_getRawOffset_error.phpt | 2 +- .../tests/timezone_hasSameRules_error.phpt | 4 +- .../tests/timezone_toDateTimeZone_error.phpt | 2 +- .../tests/timezone_useDaylightTime_error.phpt | 2 +- .../transliterator_create_inverse_error.phpt | 2 +- .../transliterator_get_error_code_error.phpt | 2 +- ...ransliterator_get_error_message_error.phpt | 2 +- ext/libxml/tests/004.phpt | 10 +- ext/libxml/tests/bug63389.phpt | 2 +- ext/mbstring/tests/mb_ereg1.phpt | 4 +- .../tests/mysqli_class_mysqli_warning.phpt | 2 +- ext/mysqli/tests/mysqli_embedded_connect.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_object.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 4 +- ext/oci8/tests/bug51291_1.phpt | 4 +- ext/oci8/tests/conn_attr_4.phpt | 6 +- ext/oci8/tests/lob_002.phpt | 4 +- ext/oci8/tests/lob_021.phpt | 2 +- ext/oci8/tests/lob_026.phpt | 2 +- ext/oci8/tests/null_byte_1.phpt | 4 +- ext/oci8/tests/privileged_connect.phpt | 2 +- ext/oci8/tests/privileged_connect1.phpt | 2 +- ext/odbc/tests/odbc_exec_001.phpt | 4 +- .../tests/openssl_csr_export_bacis.phpt | 2 +- .../openssl_csr_export_to_file_basic.phpt | 2 +- ext/openssl/tests/openssl_pkey_new_error.phpt | 6 +- ext/pcre/tests/preg_grep_error1.phpt | 4 +- ext/pcre/tests/preg_match_all_error1.phpt | 4 +- ext/pcre/tests/preg_match_all_error2.phpt | 2 +- ext/pcre/tests/preg_match_error1.phpt | 4 +- ext/pcre/tests/preg_match_error2.phpt | 4 +- ext/pcre/tests/preg_split_error1.phpt | 4 +- .../tests/pdo_oci_stmt_getcolumnmeta.phpt | 2 +- ext/phar/tests/badparameters.phpt | 36 ++-- ext/phar/tests/bug64931/bug64931.phpt | 2 +- ext/phar/tests/create_path_error.phpt | 2 +- ext/phar/tests/fgc_edgecases.phpt | 2 +- ext/phar/tests/fopen_edgecases2.phpt | 2 +- ext/phar/tests/opendir_edgecases.phpt | 2 +- ext/phar/tests/phar_extract.phpt | 2 +- ext/phar/tests/phar_oo_006.phpt | 2 +- ext/phar/tests/phar_unlinkarchive.phpt | 2 +- ext/phar/tests/pharfileinfo_construct.phpt | 2 +- .../tests/ReflectionClass_getMethod_002.phpt | 4 +- .../ReflectionClass_getProperty_002.phpt | 4 +- ...ctionClass_getStaticPropertyValue_002.phpt | 2 +- .../ReflectionClass_newInstanceArgs_002.phpt | 2 +- ...ctionClass_setStaticPropertyValue_002.phpt | 2 +- ...ReflectionExtension_constructor_error.phpt | 2 +- .../ReflectionFunction_construct.001.phpt | 4 +- .../ReflectionMethod_invokeArgs_error2.phpt | 2 +- .../tests/ReflectionMethod_invoke_basic.phpt | 2 +- .../tests/ReflectionMethod_invoke_error1.phpt | 2 +- .../tests/ReflectionReference_errors.phpt | 2 +- ext/reflection/tests/bug42976.phpt | 4 +- ext/reflection/tests/request38992.phpt | 4 +- .../session_set_save_handler_iface_002.phpt | 2 +- ext/snmp/tests/snmp-object-error.phpt | 4 +- ext/soap/tests/bug77088.phpt | 2 +- ext/sodium/tests/sodium_error_001.phpt | 2 +- .../tests/CallbackFilterIteratorTest-002.phpt | 4 +- .../tests/SplFileInfo_setFileClass_error.phpt | 2 +- .../tests/SplFileInfo_setInfoClass_error.phpt | 2 +- .../SplFixedArray__construct_param_array.phpt | 2 +- ...SplFixedArray__construct_param_string.phpt | 2 +- ...edArray_construct_param_SplFixedArray.phpt | 2 +- .../SplTempFileObject_constructor_error.phpt | 2 +- .../tests/arrayObject___construct_error1.phpt | 4 +- ext/spl/tests/arrayObject_asort_basic1.phpt | 2 +- ext/spl/tests/arrayObject_ksort_basic1.phpt | 2 +- .../arrayObject_setIteratorClass_error1.phpt | 8 +- ext/spl/tests/bug54291.phpt | 2 +- ext/spl/tests/bug54292.phpt | 2 +- ext/spl/tests/bug77431.phpt | 7 +- ext/spl/tests/bug78863.phpt | 2 +- ext/spl/tests/fixedarray_005.phpt | 6 +- ext/spl/tests/fixedarray_009.phpt | 2 +- ext/spl/tests/fixedarray_015.phpt | 2 +- ext/spl/tests/iterator_042.phpt | 2 +- ext/spl/tests/iterator_044.phpt | 8 +- ext/spl/tests/iterator_count.phpt | 2 +- ext/spl/tests/iterator_to_array.phpt | 2 +- .../tests/recursive_tree_iterator_003.phpt | 2 +- ext/spl/tests/spl_004.phpt | 4 +- ext/standard/filestat.c | 4 +- ext/standard/string.c | 4 +- .../array_change_key_case_variation.phpt | 2 +- .../tests/array/array_diff_uassoc_error.phpt | 4 +- .../array/array_diff_ukey_variation10.phpt | 4 +- .../tests/array/array_filter_variation9.phpt | 4 +- .../array_intersect_ukey_variation8.phpt | 6 +- .../tests/array/array_key_exists.phpt | 2 +- .../tests/array/array_map_object1.phpt | 10 +- .../tests/array/array_map_object2.phpt | 4 +- .../tests/array/array_map_object3.phpt | 4 +- .../tests/array/array_map_variation12.phpt | 2 +- .../tests/array/array_map_variation14.phpt | 4 +- .../tests/array/array_map_variation15.phpt | 2 +- .../tests/array/array_map_variation16.phpt | 16 +- .../tests/array/array_map_variation17.phpt | 40 ++--- .../tests/array/array_search_variation3.phpt | 4 +- .../tests/array/array_slice_variation1.phpt | 4 +- .../tests/array/array_walk_objects.phpt | 2 +- .../tests/array/array_walk_rec_objects.phpt | Bin 947 -> 921 bytes .../array_walk_recursive_variation8.phpt | 2 +- .../tests/array/array_walk_variation8.phpt | 2 +- ext/standard/tests/array/bug40191.phpt | 2 +- .../tests/array/in_array_variation3.phpt | 4 +- ext/standard/tests/array/range_errors.phpt | 8 +- ext/standard/tests/array/range_variation.phpt | 2 +- .../class_object/get_class_variation_001.phpt | 52 +++--- ext/standard/tests/file/006_variation2.phpt | 16 +- ext/standard/tests/file/bug39863.phpt | 2 +- ext/standard/tests/file/chgrp.phpt | 2 +- .../tests/file/disk_free_space_variation.phpt | 16 +- .../file/disk_total_space_variation.phpt | 8 +- .../file_get_contents_variation8-win32.phpt | 4 +- .../file/file_get_contents_variation8.phpt | 4 +- .../file_put_contents_variation8-win32.phpt | 4 +- .../file/file_put_contents_variation8.phpt | 4 +- .../tests/file/filegroup_variation3.phpt | 4 +- .../tests/file/fileinode_variation3.phpt | 4 +- .../tests/file/fileowner_variation3.phpt | 4 +- .../tests/file/fileperms_variation3.phpt | 4 +- ext/standard/tests/file/flock_error.phpt | 10 +- .../tests/file/fnmatch_variation.phpt | 66 +++---- .../tests/file/fopen_variation10-win32.phpt | 10 +- .../tests/file/fopen_variation11-win32.phpt | 10 +- .../tests/file/glob_variation-win32-mb.phpt | 4 +- .../tests/file/glob_variation-win32.phpt | 4 +- ext/standard/tests/file/glob_variation.phpt | 4 +- .../tests/file/is_dir_variation4.phpt | 4 +- .../tests/file/is_executable_variation1.phpt | 4 +- .../tests/file/is_file_variation4.phpt | 4 +- .../tests/file/is_readable_variation1.phpt | 6 +- .../tests/file/is_writable_variation1.phpt | 12 +- .../tests/file/mkdir_rmdir_variation2.phpt | 4 +- .../file/readfile_variation10-win32.phpt | 4 +- .../tests/file/readfile_variation10.phpt | Bin 1739 -> 1734 bytes .../tests/file/stream_rfc2397_006.phpt | 4 +- .../tests/file/tempnam_variation3-win32.phpt | 4 +- .../tests/file/tempnam_variation3.phpt | 4 +- .../tests/file/tempnam_variation7-win32.phpt | 4 +- .../tests/file/tempnam_variation7.phpt | 4 +- .../tests/file/windows_links/bug78862.phpt | 2 +- .../tests/general_functions/bug41970.phpt | 8 +- .../call_user_func_array_variation_001.phpt | 2 +- .../general_functions/callbacks_001.phpt | 4 +- .../general_functions/callbacks_002.phpt | 8 +- ext/standard/tests/math/abs_variation.phpt | 16 +- .../tests/math/bindec_variation1.phpt | 4 +- .../tests/math/bindec_variation1_64bit.phpt | 4 +- ext/standard/tests/math/ceil_variation1.phpt | 16 +- ext/standard/tests/math/floor_variation1.phpt | 16 +- .../tests/math/hexdec_variation1.phpt | 4 +- .../tests/math/hexdec_variation1_64bit.phpt | 4 +- .../tests/math/octdec_variation1.phpt | 4 +- ext/standard/tests/math/round_variation1.phpt | 16 +- ext/standard/tests/network/bug73594.phpt | 2 +- .../tests/password/password_hash_error.phpt | 6 +- .../password/password_needs_rehash_error.phpt | 4 +- .../tests/strings/addcslashes_001.phpt | Bin 1646 -> 1641 bytes ext/standard/tests/strings/bug54322.phpt | 2 +- .../tests/strings/chunk_split_variation5.phpt | Bin 2226 -> 2221 bytes .../tests/strings/chunk_split_variation8.phpt | 2 +- ext/standard/tests/strings/implode1.phpt | Bin 6313 -> 6273 bytes ext/standard/tests/strings/join_error.phpt | 2 +- .../tests/strings/join_variation1.phpt | 12 +- .../tests/strings/join_variation2.phpt | 46 ++--- .../tests/strings/join_variation4.phpt | Bin 2290 -> 2285 bytes .../tests/strings/join_variation5.phpt | 2 +- .../tests/strings/printf_variation1.phpt | 36 ++-- .../tests/strings/sprintf_variation1.phpt | 36 ++-- .../tests/strings/str_pad_variation1.phpt | 2 +- .../tests/strings/str_replace_basic.phpt | 2 +- .../tests/strings/str_replace_variation3.phpt | 4 +- .../tests/strings/stripos_variation10.phpt | 12 +- .../tests/strings/stripos_variation11.phpt | 24 +-- .../tests/strings/stristr_variation2.phpt | 8 +- ext/standard/tests/strings/strpos.phpt | Bin 8050 -> 8035 bytes .../tests/strings/strrchr_variation10.phpt | 12 +- .../tests/strings/strrchr_variation11.phpt | 12 +- .../tests/strings/strripos_offset.phpt | 2 +- .../tests/strings/strrpos_offset.phpt | 2 +- .../tests/strings/strrpos_variation10.phpt | 12 +- .../tests/strings/strrpos_variation11.phpt | 24 +-- .../tests/strings/strtr_variation6.phpt | 2 +- .../tests/strings/strtr_variation8.phpt | 2 +- .../tests/strings/vfprintf_error3.phpt | 2 +- .../tests/strings/vfprintf_error4.phpt | 2 +- .../tests/strings/vfprintf_variation20.phpt | 12 +- .../tests/strings/vprintf_variation1.phpt | 12 +- .../tests/strings/vsprintf_variation1.phpt | 12 +- tests/classes/abstract_user_call.phpt | 2 +- tests/classes/autoload_009.phpt | 2 +- tests/classes/autoload_012.phpt | 2 +- tests/classes/bug27504.phpt | 2 +- tests/classes/tostring_004.phpt | 2 +- tests/classes/type_hinting_001.phpt | 2 +- tests/classes/type_hinting_002.phpt | 2 +- tests/classes/type_hinting_003.phpt | 2 +- tests/classes/type_hinting_004.phpt | 12 +- tests/lang/bug24658.phpt | 2 +- tests/lang/catchable_error_001.phpt | 2 +- tests/lang/catchable_error_002.phpt | 2 +- tests/lang/type_hints_001.phpt | 2 +- .../sapi_windows_vt100_support_winko_err.phpt | 10 +- ...pi_windows_vt100_support_winko_in-err.phpt | 10 +- ...indows_vt100_support_winko_in-out-err.phpt | 10 +- ...pi_windows_vt100_support_winko_in-out.phpt | 10 +- ...i_windows_vt100_support_winko_out-err.phpt | 10 +- .../sapi_windows_vt100_support_winko_out.phpt | 10 +- .../sapi_windows_vt100_support_winok_err.phpt | 10 +- ...pi_windows_vt100_support_winok_in-err.phpt | 10 +- ...indows_vt100_support_winok_in-out-err.phpt | 10 +- ...pi_windows_vt100_support_winok_in-out.phpt | 10 +- ...i_windows_vt100_support_winok_out-err.phpt | 10 +- .../sapi_windows_vt100_support_winok_out.phpt | 10 +- 357 files changed, 1168 insertions(+), 1158 deletions(-) diff --git a/Zend/tests/008.phpt b/Zend/tests/008.phpt index f597812fa8094..b53578dbb35ef 100644 --- a/Zend/tests/008.phpt +++ b/Zend/tests/008.phpt @@ -25,7 +25,7 @@ var_dump(constant("test const")); echo "Done\n"; ?> --EXPECTF-- -TypeError: define() expects argument #1 ($constant_name) to be of type string, array given +TypeError: define(): Argument #1 ($constant_name) must be of type string, array given Notice: Constant TRUE already defined in %s on line %d bool(false) diff --git a/Zend/tests/009.phpt b/Zend/tests/009.phpt index 222fd36297016..16c060389d34e 100644 --- a/Zend/tests/009.phpt +++ b/Zend/tests/009.phpt @@ -46,8 +46,8 @@ string(3) "foo" Warning: get_class() called without object from outside a class in %s on line %d bool(false) -get_class() expects argument #1 ($object) to be of type object, string given +get_class(): Argument #1 ($object) must be of type object, string given string(3) "foo" string(4) "foo2" -get_class() expects argument #1 ($object) to be of type object, null given +get_class(): Argument #1 ($object) must be of type object, null given Done diff --git a/Zend/tests/arrow_functions/006.phpt b/Zend/tests/arrow_functions/006.phpt index e0ca1e1b5c169..6bf4c683c86c4 100644 --- a/Zend/tests/arrow_functions/006.phpt +++ b/Zend/tests/arrow_functions/006.phpt @@ -32,7 +32,7 @@ try { --EXPECTF-- int(2) int(10) -{closure}() expects argument #1 ($x) to be of type int, string given, called in %s on line %d +{closure}(): Argument #1 ($x) must be of type int, string given, called in %s on line %d array(3) { [0]=> int(20) @@ -41,4 +41,4 @@ array(3) { [2]=> int(30) } -{closure}() expects argument #2 ($args) to be of type ?int, string given, called in %s on line %d +{closure}(): Argument #2 ($args) must be of type ?int, string given, called in %s on line %d diff --git a/Zend/tests/bug31720.phpt b/Zend/tests/bug31720.phpt index ea4ba7753cf65..fb3992eceed8e 100644 --- a/Zend/tests/bug31720.phpt +++ b/Zend/tests/bug31720.phpt @@ -12,4 +12,4 @@ try { ?> --EXPECTF-- Warning: Undefined variable: nonesuchvar in %s on line %d -array_walk() expects argument #2 ($funcname) to be a valid callback, first array member is not a valid class name or object +array_walk(): Argument #2 ($funcname) must be a valid callback, first array member is not a valid class name or object diff --git a/Zend/tests/bug39003.phpt b/Zend/tests/bug39003.phpt index 758e3f9c838b2..5f7c7849762dc 100644 --- a/Zend/tests/bug39003.phpt +++ b/Zend/tests/bug39003.phpt @@ -20,7 +20,7 @@ test($obj); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: test() expects argument #1 ($object) to be of type OtherClassName, ClassName given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: test(): Argument #1 ($object) must be of type OtherClassName, ClassName given, called in %s:%d Stack trace: #0 %s(%d): test(Object(ClassName)) #1 {main} diff --git a/Zend/tests/bug42802.phpt b/Zend/tests/bug42802.phpt index 084b7c0e9d4ad..375d7f6b5bbc9 100644 --- a/Zend/tests/bug42802.phpt +++ b/Zend/tests/bug42802.phpt @@ -37,7 +37,7 @@ ok ok ok -Fatal error: Uncaught TypeError: foo\test5() expects argument #1 ($bar) to be of type bar, foo\bar given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo\test5(): Argument #1 ($bar) must be of type bar, foo\bar given, called in %s:%d Stack trace: #0 %s(%d): foo\test5(Object(foo\bar)) #1 {main} diff --git a/Zend/tests/bug43332_1.phpt b/Zend/tests/bug43332_1.phpt index e7f52eae9c3e1..3b999646b57cf 100644 --- a/Zend/tests/bug43332_1.phpt +++ b/Zend/tests/bug43332_1.phpt @@ -12,7 +12,7 @@ $foo = new foo; $foo->bar($foo); // Ok! $foo->bar(new \stdclass); // Error, ok! --EXPECTF-- -Fatal error: Uncaught TypeError: foobar\foo::bar() expects argument #1 ($a) to be of type foobar\foo, stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5 +Fatal error: Uncaught TypeError: foobar\foo::bar(): Argument #1 ($a) must be of type foobar\foo, stdClass given, called in %s:%d Stack trace: #0 %s(%d): foobar\foo->bar(Object(stdClass)) #1 {main} diff --git a/Zend/tests/bug45186.phpt b/Zend/tests/bug45186.phpt index d60cab50887df..7e4d0e5a7331e 100644 --- a/Zend/tests/bug45186.phpt +++ b/Zend/tests/bug45186.phpt @@ -54,4 +54,4 @@ string(1) "y" ok __callstatic: string(3) "www" -call_user_func() expects argument #1 ($function) to be a valid callback, cannot access self:: when no class scope is active +call_user_func(): Argument #1 ($function) must be a valid callback, cannot access self:: when no class scope is active diff --git a/Zend/tests/bug45186_2.phpt b/Zend/tests/bug45186_2.phpt index 262b379180222..01f5734a4f5cc 100644 --- a/Zend/tests/bug45186_2.phpt +++ b/Zend/tests/bug45186_2.phpt @@ -52,5 +52,5 @@ string(1) "y" __call: string(1) "y" ok -call_user_func() expects argument #1 ($function) to be a valid callback, class 'bar' does not have a method 'www' -call_user_func() expects argument #1 ($function) to be a valid callback, cannot access self:: when no class scope is active +call_user_func(): Argument #1 ($function) must be a valid callback, class 'bar' does not have a method 'www' +call_user_func(): Argument #1 ($function) must be a valid callback, cannot access self:: when no class scope is active diff --git a/Zend/tests/bug48770_2.phpt b/Zend/tests/bug48770_2.phpt index c5c17acb835ff..b8f88445f8189 100644 --- a/Zend/tests/bug48770_2.phpt +++ b/Zend/tests/bug48770_2.phpt @@ -58,5 +58,5 @@ $c->func('This should work!'); --EXPECT-- string(27) "A::func2: This should work!" string(27) "A::func3: This should work!" -call_user_func_array() expects argument #1 ($function) to be a valid callback, cannot access private method A::func22() -call_user_func_array() expects argument #1 ($function) to be a valid callback, class 'A' does not have a method 'inexistent' +call_user_func_array(): Argument #1 ($function) must be a valid callback, cannot access private method A::func22() +call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'A' does not have a method 'inexistent' diff --git a/Zend/tests/bug48770_3.phpt b/Zend/tests/bug48770_3.phpt index 07cc8025df859..0ce0d6911987a 100644 --- a/Zend/tests/bug48770_3.phpt +++ b/Zend/tests/bug48770_3.phpt @@ -52,4 +52,4 @@ $c->func('This should work!'); --EXPECT-- string(27) "B::func2: This should work!" string(27) "B::func3: This should work!" -call_user_func_array() expects argument #1 ($function) to be a valid callback, class 'B' does not have a method 'inexistent' +call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'B' does not have a method 'inexistent' diff --git a/Zend/tests/bug61273.phpt b/Zend/tests/bug61273.phpt index e9d67f9d2a26e..45461729cbdc6 100644 --- a/Zend/tests/bug61273.phpt +++ b/Zend/tests/bug61273.phpt @@ -11,5 +11,5 @@ $args = array_fill(0, 64 * 1024 - 64, 0); call_user_func_array(function(&$a) {}, $args); echo strval("okey"); --EXPECTF-- -Warning: {closure}() expects argument #1 ($a) to be passed by reference, value given in %s on line %d +Warning: {closure}(): Argument #1 ($a) must be passed by reference, value given in %s on line %d okey diff --git a/Zend/tests/bug68446.phpt b/Zend/tests/bug68446.phpt index c9d833a37f6a1..34cdb23149cb3 100644 --- a/Zend/tests/bug68446.phpt +++ b/Zend/tests/bug68446.phpt @@ -32,7 +32,7 @@ array(1) { int(1) } -Fatal error: Uncaught TypeError: a() expects argument #1 ($a) to be of type array, null given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: a(): Argument #1 ($a) must be of type array, null given, called in %s:%d Stack trace: #0 %s(%d): a(NULL) #1 {main} diff --git a/Zend/tests/bug70895.phpt b/Zend/tests/bug70895.phpt index 0d4dc47004324..9aa3706362f19 100644 --- a/Zend/tests/bug70895.phpt +++ b/Zend/tests/bug70895.phpt @@ -20,6 +20,6 @@ try { } ?> --EXPECT-- -array_map() expects argument #1 ($callback) to be a valid callback, function '%n' not found or invalid function name -array_map() expects argument #1 ($callback) to be a valid callback, function '%n %i' not found or invalid function name -array_map() expects argument #1 ($callback) to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function '%n' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function '%n %i' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name diff --git a/Zend/tests/bug70898.phpt b/Zend/tests/bug70898.phpt index 2a0fabd138458..ea67acaaf860a 100644 --- a/Zend/tests/bug70898.phpt +++ b/Zend/tests/bug70898.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -array_map() expects argument #1 ($callback) to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name diff --git a/Zend/tests/bug72598.phpt b/Zend/tests/bug72598.phpt index acf40cbba05e2..741abc35e227b 100644 --- a/Zend/tests/bug72598.phpt +++ b/Zend/tests/bug72598.phpt @@ -17,10 +17,10 @@ new class { }; ?> --EXPECTF-- -Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d +Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d object(class@anonymous)#1 (0) { } -Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d +Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d object(class@anonymous)#1 (0) { } diff --git a/Zend/tests/bug72598_2.phpt b/Zend/tests/bug72598_2.phpt index 75c4894dff9f3..9a9274aae4253 100644 --- a/Zend/tests/bug72598_2.phpt +++ b/Zend/tests/bug72598_2.phpt @@ -20,8 +20,8 @@ new class { }; ?> --EXPECTF-- -Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d +Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d int(0) -Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d +Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d int(0) diff --git a/Zend/tests/bug73954.phpt b/Zend/tests/bug73954.phpt index 062d438b600b3..bff81f500120c 100644 --- a/Zend/tests/bug73954.phpt +++ b/Zend/tests/bug73954.phpt @@ -16,7 +16,7 @@ takes_int(log(tan(3.14))); float(NAN) bool(true) -Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($int) to be of type int, float given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: takes_int(): Argument #1 ($int) must be of type int, float given, called in %s:%d Stack trace: #0 %s(9): takes_int(NAN) #1 {main} diff --git a/Zend/tests/bug74164.phpt b/Zend/tests/bug74164.phpt index e0dbed9a195a4..36d681290d12d 100644 --- a/Zend/tests/bug74164.phpt +++ b/Zend/tests/bug74164.phpt @@ -12,7 +12,7 @@ set_error_handler(function ($type, $msg) { call_user_func(function (array &$ref) {var_dump("xxx");}, 'not_an_array_variable'); ?> --EXPECTF-- -Fatal error: Uncaught Exception: Foo\{closure}() expects argument #1 ($ref) to be passed by reference, value given in %s:%d +Fatal error: Uncaught Exception: Foo\{closure}(): Argument #1 ($ref) must be passed by reference, value given in %s:%d Stack trace: #0 [internal function]: Foo\{closure}(%s) #1 %sbug74164.php(%d): call_user_func(%s) diff --git a/Zend/tests/call_user_func_001.phpt b/Zend/tests/call_user_func_001.phpt index 8ad76564597ca..34234271b36b9 100644 --- a/Zend/tests/call_user_func_001.phpt +++ b/Zend/tests/call_user_func_001.phpt @@ -37,5 +37,5 @@ namespace testing { ?> --EXPECT-- string(6) "foobar" -call_user_func() expects argument #1 ($function) to be a valid callback, cannot access private method testing\foo::priv() -call_user_func() expects argument #1 ($function) to be a valid callback, cannot access protected method testing\foo::prot() +call_user_func(): Argument #1 ($function) must be a valid callback, cannot access private method testing\foo::priv() +call_user_func(): Argument #1 ($function) must be a valid callback, cannot access protected method testing\foo::prot() diff --git a/Zend/tests/call_user_func_002.phpt b/Zend/tests/call_user_func_002.phpt index 3ac930854353d..c06803334a2c4 100644 --- a/Zend/tests/call_user_func_002.phpt +++ b/Zend/tests/call_user_func_002.phpt @@ -31,11 +31,11 @@ try { ?> --EXPECTF-- string(3) "foo" -call_user_func() expects argument #1 ($function) to be a valid callback, class 'foo' not found -call_user_func() expects argument #1 ($function) to be a valid callback, class '' not found +call_user_func(): Argument #1 ($function) must be a valid callback, class 'foo' not found +call_user_func(): Argument #1 ($function) must be a valid callback, class '' not found Warning: Undefined variable: foo in %s on line %d -call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object +call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object Warning: Undefined variable: foo in %s on line %d -call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object +call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object diff --git a/Zend/tests/call_user_func_006.phpt b/Zend/tests/call_user_func_006.phpt index 624ce2391c2e5..e45c81dc108bf 100644 --- a/Zend/tests/call_user_func_006.phpt +++ b/Zend/tests/call_user_func_006.phpt @@ -21,8 +21,8 @@ var_dump($y); ?> --EXPECTF-- -Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d +Warning: Foo\bar(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d int(42) -Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d +Warning: Foo\bar(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d int(42) diff --git a/Zend/tests/call_user_func_007.phpt b/Zend/tests/call_user_func_007.phpt index 8efa3ab9018d5..4dd7341add7a2 100644 --- a/Zend/tests/call_user_func_007.phpt +++ b/Zend/tests/call_user_func_007.phpt @@ -15,6 +15,6 @@ Notice: Undefined offset: 0 in %s on line %d Warning: Trying to access array offset on value of type null in %s on line %d -Warning: foo() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d +Warning: foo(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d array(0) { } diff --git a/Zend/tests/call_user_func_008.phpt b/Zend/tests/call_user_func_008.phpt index c710360a13252..1d20bc60d6608 100644 --- a/Zend/tests/call_user_func_008.phpt +++ b/Zend/tests/call_user_func_008.phpt @@ -25,30 +25,30 @@ var_dump($i, $j); ?> --EXPECTF-- -Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d +Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d -Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d +Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d bool(true) int(0) int(0) -Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d +Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d -Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d +Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d bool(true) int(0) int(0) -Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d +Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d -Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d +Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d bool(true) int(0) int(0) -Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d +Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d -Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d +Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d bool(true) int(0) int(0) diff --git a/Zend/tests/call_user_func_009.phpt b/Zend/tests/call_user_func_009.phpt index ebbecd73e690d..6f2ec7a4b6b58 100644 --- a/Zend/tests/call_user_func_009.phpt +++ b/Zend/tests/call_user_func_009.phpt @@ -10,8 +10,8 @@ var_dump(\call_user_func('sort', [])); ?> --EXPECTF-- -Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d +Warning: sort(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d bool(true) -Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d +Warning: sort(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d bool(true) diff --git a/Zend/tests/call_user_func_array_invalid_type.phpt b/Zend/tests/call_user_func_array_invalid_type.phpt index a7b5fb3cb7b71..785a6e35e9076 100644 --- a/Zend/tests/call_user_func_array_invalid_type.phpt +++ b/Zend/tests/call_user_func_array_invalid_type.phpt @@ -15,4 +15,4 @@ try { } ?> --EXPECT-- -call_user_func_array() expects argument #2 ($args) to be of type array, null given +call_user_func_array(): Argument #2 ($args) must be of type array, null given diff --git a/Zend/tests/closure_027.phpt b/Zend/tests/closure_027.phpt index bffd69c11a6cf..ceffcd72abb68 100644 --- a/Zend/tests/closure_027.phpt +++ b/Zend/tests/closure_027.phpt @@ -30,7 +30,7 @@ NULL Warning: Undefined variable: y in %s on line %d Exception: Too few arguments to function {closure}(), 0 passed in %s on line %d and exactly 1 expected -Fatal error: Uncaught TypeError: test() expects argument #1 ($a) to be of type Closure, stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: test(): Argument #1 ($a) must be of type Closure, stdClass given, called in %s:%d Stack trace: #0 %s(%d): test(Object(stdClass)) #1 {main} diff --git a/Zend/tests/closure_059.phpt b/Zend/tests/closure_059.phpt index c63e654f2d0fa..ab418e42b7e18 100644 --- a/Zend/tests/closure_059.phpt +++ b/Zend/tests/closure_059.phpt @@ -33,6 +33,6 @@ try { echo "Exception: " . $e->getMessage() . "\n"; } --EXPECTF-- -Exception: {closure}() expects argument #1 ($a) to be of type A, B given, called in %s on line %d -Exception: {closure}() expects argument #1 ($a) to be of type A, B given -Exception: {closure}() expects argument #1 ($a) to be of type A, B given +Exception: {closure}(): Argument #1 ($a) must be of type A, B given, called in %s on line %d +Exception: {closure}(): Argument #1 ($a) must be of type A, B given +Exception: {closure}(): Argument #1 ($a) must be of type A, B given diff --git a/Zend/tests/exception_017.phpt b/Zend/tests/exception_017.phpt index 4299ada5c0427..f2f5f964ce8f0 100644 --- a/Zend/tests/exception_017.phpt +++ b/Zend/tests/exception_017.phpt @@ -28,7 +28,7 @@ Error: Cannot call abstract method C::foo() in %s:%d Stack trace: #0 {main} -TypeError: foo() expects argument #1 ($x) to be of type callable, string given, called in %s on line %d and defined in %s:%d +TypeError: foo(): Argument #1 ($x) must be of type callable, string given, called in %s:%d Stack trace: #0 %s(%d): foo('C::foo') #1 {main} diff --git a/Zend/tests/exception_handler_004.phpt b/Zend/tests/exception_handler_004.phpt index e4684e942dd9f..757a1b7f2d3d1 100644 --- a/Zend/tests/exception_handler_004.phpt +++ b/Zend/tests/exception_handler_004.phpt @@ -9,7 +9,7 @@ set_exception_handler(array("", "")); echo "Done\n"; ?> --EXPECTF-- -Warning: set_exception_handler() expects argument #1 ($exception_handler) to be a valid callback in %s on line %d +Warning: set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback in %s on line %d -Warning: set_exception_handler() expects argument #1 ($exception_handler) to be a valid callback in %s on line %d +Warning: set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback in %s on line %d Done diff --git a/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt b/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt index c8977ece99ea5..206b96149b4a2 100644 --- a/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt +++ b/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt @@ -49,6 +49,6 @@ Too few arguments to function bar(), 1 passed in %s and exactly 2 expected ArgumentCountError Too few arguments to function bat(), 1 passed in %s and exactly 2 expected TypeError -bat() expects argument #1 ($foo) to be of type int, string given, called in %s on line %d +bat(): Argument #1 ($foo) must be of type int, string given, called in %s on line %d TypeError -bat() expects argument #2 ($bar) to be of type string, int given, called in %s on line %d +bat(): Argument #2 ($bar) must be of type string, int given, called in %s on line %d diff --git a/Zend/tests/function_arguments/variadic_argument_type_error.phpt b/Zend/tests/function_arguments/variadic_argument_type_error.phpt index ee244ab4a1ad9..3a9bc050ccc35 100644 --- a/Zend/tests/function_arguments/variadic_argument_type_error.phpt +++ b/Zend/tests/function_arguments/variadic_argument_type_error.phpt @@ -18,5 +18,5 @@ try { } --EXPECTF-- -foo() expects argument #2 ($bar) to be of type int, array given, called in %s on line %d -foo() expects argument #4 ($bar) to be of type int, array given, called in %s on line %d +foo(): Argument #2 ($bar) must be of type int, array given, called in %s on line %d +foo(): Argument #4 ($bar) must be of type int, array given, called in %s on line %d diff --git a/Zend/tests/generators/generator_with_type_check.phpt b/Zend/tests/generators/generator_with_type_check.phpt index 90636406b4096..67d19ab9479e3 100644 --- a/Zend/tests/generators/generator_with_type_check.phpt +++ b/Zend/tests/generators/generator_with_type_check.phpt @@ -6,7 +6,7 @@ function gen(array $a) { yield; } gen(42); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: gen(): Argument #1 ($a) must be of type array, int given, called in %s:%d Stack trace: #0 %sgenerator_with_type_check.php(3): gen(42) #1 {main} diff --git a/Zend/tests/generators/generator_with_type_check_2.phpt b/Zend/tests/generators/generator_with_type_check_2.phpt index 445c8f4a9fedf..21e8ab8bedc0d 100644 --- a/Zend/tests/generators/generator_with_type_check_2.phpt +++ b/Zend/tests/generators/generator_with_type_check_2.phpt @@ -18,5 +18,5 @@ try { } ?> --EXPECTF-- -gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d -gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d +gen(): Argument #1 ($a) must be of type array, int given, called in %s on line %d +gen(): Argument #1 ($a) must be of type array, int given, called in %s on line %d diff --git a/Zend/tests/generators/throw_not_an_exception.phpt b/Zend/tests/generators/throw_not_an_exception.phpt index dcb1d3d0b014f..d1ff81882f8a4 100644 --- a/Zend/tests/generators/throw_not_an_exception.phpt +++ b/Zend/tests/generators/throw_not_an_exception.phpt @@ -12,7 +12,7 @@ $gen->throw(new stdClass); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Generator::throw() expects argument #1 ($exception) to be of type Throwable, object given in %s:%d +Fatal error: Uncaught TypeError: Generator::throw(): Argument #1 ($exception) must be of type Throwable, object given in %s:%d Stack trace: #0 %s(%d): Generator->throw(Object(stdClass)) #1 {main} diff --git a/Zend/tests/methods-on-non-objects-call-user-func.phpt b/Zend/tests/methods-on-non-objects-call-user-func.phpt index 5ccf9e0d26653..c158cd1ca12ac 100644 --- a/Zend/tests/methods-on-non-objects-call-user-func.phpt +++ b/Zend/tests/methods-on-non-objects-call-user-func.phpt @@ -10,4 +10,4 @@ try { } ?> --EXPECT-- -call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object +call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object diff --git a/Zend/tests/ns_071.phpt b/Zend/tests/ns_071.phpt index cee6431be0b64..b0126e399fae2 100644 --- a/Zend/tests/ns_071.phpt +++ b/Zend/tests/ns_071.phpt @@ -18,7 +18,7 @@ new bar(new \stdclass); --EXPECTF-- NULL -Fatal error: Uncaught TypeError: foo\bar::__construct() expects argument #1 ($x) to be of type ?array, object given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo\bar::__construct(): Argument #1 ($x) must be of type ?array, object given, called in %s:%d Stack trace: #0 %s(%d): foo\bar->__construct(Object(stdClass)) #1 {main} diff --git a/Zend/tests/ns_072.phpt b/Zend/tests/ns_072.phpt index 6429632658586..b41fe29778faa 100644 --- a/Zend/tests/ns_072.phpt +++ b/Zend/tests/ns_072.phpt @@ -30,7 +30,7 @@ object(foo\test)#%d (0) { } NULL -Fatal error: Uncaught TypeError: foo\bar::__construct() expects argument #1 ($x) to be of type ?foo\foo, stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo\bar::__construct(): Argument #1 ($x) must be of type ?foo\foo, stdClass given, called in %s:%d Stack trace: #0 %s(%d): foo\bar->__construct(Object(stdClass)) #1 {main} diff --git a/Zend/tests/object_types/type_hint_in_class_method.phpt b/Zend/tests/object_types/type_hint_in_class_method.phpt index 098bfc0c52cb0..f23189cb50cd0 100644 --- a/Zend/tests/object_types/type_hint_in_class_method.phpt +++ b/Zend/tests/object_types/type_hint_in_class_method.phpt @@ -11,7 +11,7 @@ $one = new One(); $one->a(new One()); $one->a(123); --EXPECTF-- -Fatal error: Uncaught TypeError: One::a() expects argument #1 ($obj) to be of type object, int given, called in %s:%d +Fatal error: Uncaught TypeError: One::a(): Argument #1 ($obj) must be of type object, int given, called in %s:%d Stack trace: #0 %s(9): One->a(123) #1 {main} diff --git a/Zend/tests/object_types/type_hint_in_function.phpt b/Zend/tests/object_types/type_hint_in_function.phpt index e834997f4d552..f35e73b3a744f 100644 --- a/Zend/tests/object_types/type_hint_in_function.phpt +++ b/Zend/tests/object_types/type_hint_in_function.phpt @@ -9,7 +9,7 @@ function a(object $obj) {} a(new A()); a(123); --EXPECTF-- -Fatal error: Uncaught TypeError: a() expects argument #1 ($obj) to be of type object, int given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: a(): Argument #1 ($obj) must be of type object, int given, called in %s:%d Stack trace: #0 %s(7): a(123) #1 {main} diff --git a/Zend/tests/objects_022.phpt b/Zend/tests/objects_022.phpt index ce2d2f7c0032d..5fa6f8e95d6a5 100644 --- a/Zend/tests/objects_022.phpt +++ b/Zend/tests/objects_022.phpt @@ -36,7 +36,7 @@ object(bar)#%d (0) { object(baz)#%d (0) { } -Fatal error: Uncaught TypeError: foo::testFoo() expects argument #1 ($obj) to be of type foo, stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo::testFoo(): Argument #1 ($obj) must be of type foo, stdClass given, called in %s:%d Stack trace: #0 %s(%d): foo->testFoo(Object(stdClass)) #1 {main} diff --git a/Zend/tests/trait_type_errors.phpt b/Zend/tests/trait_type_errors.phpt index 1d29714a2f1e4..2f5069a4331fc 100644 --- a/Zend/tests/trait_type_errors.phpt +++ b/Zend/tests/trait_type_errors.phpt @@ -39,5 +39,5 @@ try { ?> --EXPECTF-- Return value of C::test1() must be of type int, string returned -C::test2() expects argument #1 ($arg) to be of type int, string given, called in %s on line %d -C::test3() expects argument #1 ($arg) to be of type int, string given, called in %s on line %d +C::test2(): Argument #1 ($arg) must be of type int, string given, called in %s on line %d +C::test3(): Argument #1 ($arg) must be of type int, string given, called in %s on line %d diff --git a/Zend/tests/type_declarations/array_001.phpt b/Zend/tests/type_declarations/array_001.phpt index 0e08bd8b7f259..5739ae1b72e26 100644 --- a/Zend/tests/type_declarations/array_001.phpt +++ b/Zend/tests/type_declarations/array_001.phpt @@ -12,7 +12,7 @@ foo(123); --EXPECTF-- 3 -Fatal error: Uncaught TypeError: foo() expects argument #1 ($a) to be of type array, int given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo(): Argument #1 ($a) must be of type array, int given, called in %s:%d Stack trace: #0 %s(%d): foo(123) #1 {main} diff --git a/Zend/tests/type_declarations/callable_001.phpt b/Zend/tests/type_declarations/callable_001.phpt index e6c2702235df5..6b555f40e6912 100644 --- a/Zend/tests/type_declarations/callable_001.phpt +++ b/Zend/tests/type_declarations/callable_001.phpt @@ -29,7 +29,7 @@ array(2) { string(3) "foo" } -Fatal error: Uncaught TypeError: foo() expects argument #1 ($bar) to be of type callable, array given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo(): Argument #1 ($bar) must be of type callable, array given, called in %s:%d Stack trace: #0 %s(%d): foo(Array) #1 {main} diff --git a/Zend/tests/type_declarations/explicit_weak_include_strict.phpt b/Zend/tests/type_declarations/explicit_weak_include_strict.phpt index 5ad7bd17fcb88..60d4159dc24b9 100644 --- a/Zend/tests/type_declarations/explicit_weak_include_strict.phpt +++ b/Zend/tests/type_declarations/explicit_weak_include_strict.phpt @@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc'; // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: takes_int(): Argument #1 ($x) must be of type int, float given, called in %s:%d Stack trace: #0 %s(%d): takes_int(1) #1 %s(%d): require('%s') diff --git a/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt b/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt index 661616fb92f2c..d70f7e240a6a1 100644 --- a/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt +++ b/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt @@ -8,7 +8,7 @@ foo(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: foo() expects argument #1 ($ex) to be of type bar, null given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: foo(): Argument #1 ($ex) must be of type bar, null given, called in %s:%d Stack trace: #0 %s(%d): foo(NULL) #1 {main} diff --git a/Zend/tests/type_declarations/internal_function_strict_mode.phpt b/Zend/tests/type_declarations/internal_function_strict_mode.phpt index b3b9adc9d3b4e..04c59ae3410ef 100644 --- a/Zend/tests/type_declarations/internal_function_strict_mode.phpt +++ b/Zend/tests/type_declarations/internal_function_strict_mode.phpt @@ -28,8 +28,8 @@ try { ?> --EXPECT-- *** Trying Ord With Integer -*** Caught ord() expects argument #1 ($character) to be of type string, int given +*** Caught ord(): Argument #1 ($character) must be of type string, int given *** Trying Array Map With Invalid Callback -*** Caught array_map() expects argument #1 ($callback) to be a valid callback, first array member is not a valid class name or object +*** Caught array_map(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object *** Trying Strlen With Float -*** Caught strlen() expects argument #1 ($str) to be of type string, float given +*** Caught strlen(): Argument #1 ($str) must be of type string, float given diff --git a/Zend/tests/type_declarations/iterable_001.phpt b/Zend/tests/type_declarations/iterable_001.phpt index 856dc63c4d8d4..e5f21957badee 100644 --- a/Zend/tests/type_declarations/iterable_001.phpt +++ b/Zend/tests/type_declarations/iterable_001.phpt @@ -44,4 +44,4 @@ object(ArrayIterator)#1 (1) { int(3) } } -test() expects argument #1 ($iterable) to be of type iterable, int given, called in %s on line %d +test(): Argument #1 ($iterable) must be of type iterable, int given, called in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_basic.phpt b/Zend/tests/type_declarations/scalar_basic.phpt index ef10e67ac075e..e4b8ab5c51e0b 100644 --- a/Zend/tests/type_declarations/scalar_basic.phpt +++ b/Zend/tests/type_declarations/scalar_basic.phpt @@ -78,16 +78,16 @@ E_NOTICE: A non well formed numeric value encountered on line %d int(1) *** Trying string(1) "a" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying string(0) "" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying int(%d) int(%d) *** Trying float(NAN) -*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying bool(true) int(1) @@ -96,22 +96,22 @@ int(1) int(0) *** Trying NULL -*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d *** Trying object(stdClass)#%s (0) { } -*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d *** Trying object(Stringable)#%s (0) { } -*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d *** Trying resource(%d) of type (stream) -*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d Testing 'float' type: @@ -132,10 +132,10 @@ E_NOTICE: A non well formed numeric value encountered on line %d float(1) *** Trying string(1) "a" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying string(0) "" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying int(%d) float(%s) @@ -150,22 +150,22 @@ float(1) float(0) *** Trying NULL -*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d *** Trying object(stdClass)#%s (0) { } -*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d *** Trying object(Stringable)#%s (0) { } -*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d *** Trying resource(%d) of type (stream) -*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d Testing 'string' type: @@ -203,22 +203,22 @@ string(1) "1" string(0) "" *** Trying NULL -*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d *** Trying object(stdClass)#%s (0) { } -*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d *** Trying object(Stringable)#%s (0) { } string(6) "foobar" *** Trying resource(%d) of type (stream) -*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d Testing 'bool' type: @@ -256,21 +256,21 @@ bool(true) bool(false) *** Trying NULL -*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d *** Trying object(stdClass)#%s (0) { } -*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d *** Trying object(Stringable)#%s (0) { } -*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d *** Trying resource(%d) of type (stream) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d Done diff --git a/Zend/tests/type_declarations/scalar_constant_defaults.phpt b/Zend/tests/type_declarations/scalar_constant_defaults.phpt index 28f0252cdfb12..5e3826de7dcb6 100644 --- a/Zend/tests/type_declarations/scalar_constant_defaults.phpt +++ b/Zend/tests/type_declarations/scalar_constant_defaults.phpt @@ -96,9 +96,9 @@ float(10.7) Testing string add val string(14) "this is a test" Testing int with default null constant -int_val_default_null() expects argument #1 ($a) to be of type int, null given, called in %s on line %d +int_val_default_null(): Argument #1 ($a) must be of type int, null given, called in %s on line %d Testing int with null null constant -int_val_default_null() expects argument #1 ($a) to be of type int, null given, called in %s on line %d +int_val_default_null(): Argument #1 ($a) must be of type int, null given, called in %s on line %d Testing nullable int with default null constant NULL Testing nullable int with null null constant diff --git a/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt b/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt index 66d56e72df417..72cc9820dad4f 100644 --- a/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt +++ b/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt @@ -13,7 +13,7 @@ var_dump(int_val()); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: int_val() expects argument #1 ($a) to be of type int, string given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: int_val(): Argument #1 ($a) must be of type int, string given, called in %s:%d Stack trace: #0 %s(%d): int_val() #1 {main} diff --git a/Zend/tests/type_declarations/scalar_null.phpt b/Zend/tests/type_declarations/scalar_null.phpt index ab9647ba9c9b2..d1ade3ad48c43 100644 --- a/Zend/tests/type_declarations/scalar_null.phpt +++ b/Zend/tests/type_declarations/scalar_null.phpt @@ -27,13 +27,13 @@ echo PHP_EOL . "Done"; ?> --EXPECTF-- Testing int: -*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d Testing float: -*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d Testing string: -*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d Testing bool: -*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d Testing int nullable: NULL Testing float nullable: diff --git a/Zend/tests/type_declarations/scalar_strict.phpt b/Zend/tests/type_declarations/scalar_strict.phpt index 89ab6a024b06c..032fd3d3015be 100644 --- a/Zend/tests/type_declarations/scalar_strict.phpt +++ b/Zend/tests/type_declarations/scalar_strict.phpt @@ -60,52 +60,52 @@ Testing 'int' type: int(1) *** Trying string(1) "1" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying float(1) -*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying float(1.5) -*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying string(2) "1a" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying string(0) "" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying int(2147483647) int(2147483647) *** Trying float(NAN) -*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d *** Trying NULL -*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d Testing 'float' type: @@ -113,7 +113,7 @@ Testing 'float' type: float(1) *** Trying string(1) "1" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying float(1) float(1) @@ -122,13 +122,13 @@ float(1) float(1.5) *** Trying string(2) "1a" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying string(0) "" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying int(2147483647) float(2147483647) @@ -137,42 +137,42 @@ float(2147483647) float(NAN) *** Trying bool(true) -*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d *** Trying NULL -*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d Testing 'string' type: *** Trying int(1) -*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d *** Trying string(1) "1" string(1) "1" *** Trying float(1) -*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying float(1.5) -*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying string(2) "1a" string(2) "1a" @@ -184,63 +184,63 @@ string(1) "a" string(0) "" *** Trying int(2147483647) -*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d *** Trying float(NAN) -*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d *** Trying NULL -*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d Testing 'bool' type: *** Trying int(1) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d *** Trying string(1) "1" -*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d *** Trying float(1) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d *** Trying float(1.5) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d *** Trying string(2) "1a" -*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d *** Trying string(0) "" -*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d *** Trying int(2147483647) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d *** Trying float(NAN) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d *** Trying bool(true) bool(true) @@ -249,21 +249,21 @@ bool(true) bool(false) *** Trying NULL -*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d Done diff --git a/Zend/tests/type_declarations/scalar_strict_64bit.phpt b/Zend/tests/type_declarations/scalar_strict_64bit.phpt index 2d00b6f23b1a2..5818606b4cfda 100644 --- a/Zend/tests/type_declarations/scalar_strict_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_strict_64bit.phpt @@ -60,52 +60,52 @@ Testing 'int' type: int(1) *** Trying string(1) "1" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying float(1) -*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying float(1.5) -*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying string(2) "1a" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying string(0) "" -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying int(9223372036854775807) int(9223372036854775807) *** Trying float(NAN) -*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d *** Trying NULL -*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d Testing 'float' type: @@ -113,7 +113,7 @@ Testing 'float' type: float(1) *** Trying string(1) "1" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying float(1) float(1) @@ -122,13 +122,13 @@ float(1) float(1.5) *** Trying string(2) "1a" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying string(0) "" -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying int(9223372036854775807) float(9.223372036854776E+18) @@ -137,42 +137,42 @@ float(9.223372036854776E+18) float(NAN) *** Trying bool(true) -*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d *** Trying NULL -*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d Testing 'string' type: *** Trying int(1) -*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d *** Trying string(1) "1" string(1) "1" *** Trying float(1) -*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying float(1.5) -*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying string(2) "1a" string(2) "1a" @@ -184,63 +184,63 @@ string(1) "a" string(0) "" *** Trying int(9223372036854775807) -*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d *** Trying float(NAN) -*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d *** Trying NULL -*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d Testing 'bool' type: *** Trying int(1) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d *** Trying string(1) "1" -*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d *** Trying float(1) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d *** Trying float(1.5) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d *** Trying string(2) "1a" -*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d *** Trying string(1) "a" -*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d *** Trying string(0) "" -*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d *** Trying int(9223372036854775807) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d *** Trying float(NAN) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d *** Trying bool(true) bool(true) @@ -249,21 +249,21 @@ bool(true) bool(false) *** Trying NULL -*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d *** Trying array(0) { } -*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d *** Trying object(stdClass)#5 (0) { } -*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d *** Trying object(Stringable)#6 (0) { } -*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d *** Trying resource(5) of type (stream) -*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d Done diff --git a/Zend/tests/type_declarations/scalar_strict_basic.phpt b/Zend/tests/type_declarations/scalar_strict_basic.phpt index d3050314f42b2..cb385422bdb0a 100644 --- a/Zend/tests/type_declarations/scalar_strict_basic.phpt +++ b/Zend/tests/type_declarations/scalar_strict_basic.phpt @@ -57,28 +57,28 @@ Testing 'int' type: int(1) *** Trying float value -*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying string value -*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying true value -*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d *** Trying false value -*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d *** Trying null value -*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d *** Trying array value -*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d *** Trying object value -*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d *** Trying resource value -*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d Testing 'float' type: @@ -89,65 +89,65 @@ float(1) float(1) *** Trying string value -*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying true value -*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d *** Trying false value -*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d *** Trying null value -*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d *** Trying array value -*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d *** Trying object value -*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d *** Trying resource value -*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d Testing 'string' type: *** Trying integer value -*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d *** Trying float value -*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying string value string(1) "1" *** Trying true value -*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d *** Trying false value -*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d *** Trying null value -*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d *** Trying array value -*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d *** Trying object value -*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d *** Trying resource value -*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d Testing 'bool' type: *** Trying integer value -*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d *** Trying float value -*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d *** Trying string value -*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d *** Trying true value bool(true) @@ -156,15 +156,15 @@ bool(true) bool(false) *** Trying null value -*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d *** Trying array value -*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d *** Trying object value -*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d *** Trying resource value -*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d Done diff --git a/Zend/tests/type_declarations/strict_call_weak.phpt b/Zend/tests/type_declarations/strict_call_weak.phpt index e20524b2d51f8..55da67a6ef8a6 100644 --- a/Zend/tests/type_declarations/strict_call_weak.phpt +++ b/Zend/tests/type_declarations/strict_call_weak.phpt @@ -13,7 +13,7 @@ require 'strict_call_weak_2.inc'; function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: function_declared_in_weak_mode() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: function_declared_in_weak_mode(): Argument #1 ($x) must be of type int, float given, called in %s:%d Stack trace: #0 %s(%d): function_declared_in_weak_mode(1) #1 {main} diff --git a/Zend/tests/type_declarations/strict_call_weak_explicit.phpt b/Zend/tests/type_declarations/strict_call_weak_explicit.phpt index b6b382e5cce22..14b460aa9ddca 100644 --- a/Zend/tests/type_declarations/strict_call_weak_explicit.phpt +++ b/Zend/tests/type_declarations/strict_call_weak_explicit.phpt @@ -13,7 +13,7 @@ require 'strict_call_weak_explicit_2.inc'; function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: function_declared_in_weak_mode() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: function_declared_in_weak_mode(): Argument #1 ($x) must be of type int, float given, called in %s:%d Stack trace: #0 %s(%d): function_declared_in_weak_mode(1) #1 {main} diff --git a/Zend/tests/type_declarations/union_types/multiple_classes.phpt b/Zend/tests/type_declarations/union_types/multiple_classes.phpt index 31874155865a2..b45fc02d83fa5 100644 --- a/Zend/tests/type_declarations/union_types/multiple_classes.phpt +++ b/Zend/tests/type_declarations/union_types/multiple_classes.phpt @@ -68,7 +68,7 @@ int(42) int(42) int(42) Cannot assign stdClass to property Test::$prop of type X|Y|Z|int -Test::method() expects argument #1 ($arg) to be of type X|Y|Z|int, stdClass given, called in %s on line %d +Test::method(): Argument #1 ($arg) must be of type X|Y|Z|int, stdClass given, called in %s on line %d object(X)#4 (0) { } object(X)#6 (0) { diff --git a/Zend/tests/type_declarations/union_types/type_checking_strict.phpt b/Zend/tests/type_declarations/union_types/type_checking_strict.phpt index 81c75328d6f7f..4887b3b7967a5 100644 --- a/Zend/tests/type_declarations/union_types/type_checking_strict.phpt +++ b/Zend/tests/type_declarations/union_types/type_checking_strict.phpt @@ -37,7 +37,7 @@ function test(string $type, array $values) { } catch (TypeError $e) { $msg = $e->getMessage(); $msg = strstr($msg, ', called in', true); - $msg = str_replace('{closure}() expects argument #1', 'Argument ...', $msg); + $msg = str_replace('{closure}(): Argument #1 ($arg)', 'Argument ...', $msg); echo $msg; } echo "\n"; @@ -70,86 +70,86 @@ Type int|float: 42 => 42 42.0 => 42.0 INF => INF -"42" => Argument ... ($arg) to be of type int|float, string given -"42.0" => Argument ... ($arg) to be of type int|float, string given -"42x" => Argument ... ($arg) to be of type int|float, string given -"x" => Argument ... ($arg) to be of type int|float, string given -"" => Argument ... ($arg) to be of type int|float, string given -true => Argument ... ($arg) to be of type int|float, bool given -false => Argument ... ($arg) to be of type int|float, bool given -null => Argument ... ($arg) to be of type int|float, null given -[] => Argument ... ($arg) to be of type int|float, array given -new stdClass => Argument ... ($arg) to be of type int|float, object given -new WithToString => Argument ... ($arg) to be of type int|float, object given +"42" => Argument ... must be of type int|float, string given +"42.0" => Argument ... must be of type int|float, string given +"42x" => Argument ... must be of type int|float, string given +"x" => Argument ... must be of type int|float, string given +"" => Argument ... must be of type int|float, string given +true => Argument ... must be of type int|float, bool given +false => Argument ... must be of type int|float, bool given +null => Argument ... must be of type int|float, null given +[] => Argument ... must be of type int|float, array given +new stdClass => Argument ... must be of type int|float, object given +new WithToString => Argument ... must be of type int|float, object given Type int|float|false: 42 => 42 42.0 => 42.0 INF => INF -"42" => Argument ... ($arg) to be of type int|float|false, string given -"42.0" => Argument ... ($arg) to be of type int|float|false, string given -"42x" => Argument ... ($arg) to be of type int|float|false, string given -"x" => Argument ... ($arg) to be of type int|float|false, string given -"" => Argument ... ($arg) to be of type int|float|false, string given -true => Argument ... ($arg) to be of type int|float|false, bool given +"42" => Argument ... must be of type int|float|false, string given +"42.0" => Argument ... must be of type int|float|false, string given +"42x" => Argument ... must be of type int|float|false, string given +"x" => Argument ... must be of type int|float|false, string given +"" => Argument ... must be of type int|float|false, string given +true => Argument ... must be of type int|float|false, bool given false => false -null => Argument ... ($arg) to be of type int|float|false, null given -[] => Argument ... ($arg) to be of type int|float|false, array given -new stdClass => Argument ... ($arg) to be of type int|float|false, object given -new WithToString => Argument ... ($arg) to be of type int|float|false, object given +null => Argument ... must be of type int|float|false, null given +[] => Argument ... must be of type int|float|false, array given +new stdClass => Argument ... must be of type int|float|false, object given +new WithToString => Argument ... must be of type int|float|false, object given Type int|float|bool: 42 => 42 42.0 => 42.0 INF => INF -"42" => Argument ... ($arg) to be of type int|float|bool, string given -"42.0" => Argument ... ($arg) to be of type int|float|bool, string given -"42x" => Argument ... ($arg) to be of type int|float|bool, string given -"x" => Argument ... ($arg) to be of type int|float|bool, string given -"" => Argument ... ($arg) to be of type int|float|bool, string given +"42" => Argument ... must be of type int|float|bool, string given +"42.0" => Argument ... must be of type int|float|bool, string given +"42x" => Argument ... must be of type int|float|bool, string given +"x" => Argument ... must be of type int|float|bool, string given +"" => Argument ... must be of type int|float|bool, string given true => true false => false -null => Argument ... ($arg) to be of type int|float|bool, null given -[] => Argument ... ($arg) to be of type int|float|bool, array given -new stdClass => Argument ... ($arg) to be of type int|float|bool, object given -new WithToString => Argument ... ($arg) to be of type int|float|bool, object given +null => Argument ... must be of type int|float|bool, null given +[] => Argument ... must be of type int|float|bool, array given +new stdClass => Argument ... must be of type int|float|bool, object given +new WithToString => Argument ... must be of type int|float|bool, object given Type int|bool: 42 => 42 -42.0 => Argument ... ($arg) to be of type int|bool, float given -INF => Argument ... ($arg) to be of type int|bool, float given -"42" => Argument ... ($arg) to be of type int|bool, string given -"42.0" => Argument ... ($arg) to be of type int|bool, string given -"42x" => Argument ... ($arg) to be of type int|bool, string given -"x" => Argument ... ($arg) to be of type int|bool, string given -"" => Argument ... ($arg) to be of type int|bool, string given +42.0 => Argument ... must be of type int|bool, float given +INF => Argument ... must be of type int|bool, float given +"42" => Argument ... must be of type int|bool, string given +"42.0" => Argument ... must be of type int|bool, string given +"42x" => Argument ... must be of type int|bool, string given +"x" => Argument ... must be of type int|bool, string given +"" => Argument ... must be of type int|bool, string given true => true false => false -null => Argument ... ($arg) to be of type int|bool, null given -[] => Argument ... ($arg) to be of type int|bool, array given -new stdClass => Argument ... ($arg) to be of type int|bool, object given -new WithToString => Argument ... ($arg) to be of type int|bool, object given +null => Argument ... must be of type int|bool, null given +[] => Argument ... must be of type int|bool, array given +new stdClass => Argument ... must be of type int|bool, object given +new WithToString => Argument ... must be of type int|bool, object given Type int|string|null: 42 => 42 -42.0 => Argument ... ($arg) to be of type string|int|null, float given -INF => Argument ... ($arg) to be of type string|int|null, float given +42.0 => Argument ... must be of type string|int|null, float given +INF => Argument ... must be of type string|int|null, float given "42" => "42" "42.0" => "42.0" "42x" => "42x" "x" => "x" "" => "" -true => Argument ... ($arg) to be of type string|int|null, bool given -false => Argument ... ($arg) to be of type string|int|null, bool given +true => Argument ... must be of type string|int|null, bool given +false => Argument ... must be of type string|int|null, bool given null => null -[] => Argument ... ($arg) to be of type string|int|null, array given -new stdClass => Argument ... ($arg) to be of type string|int|null, object given -new WithToString => Argument ... ($arg) to be of type string|int|null, object given +[] => Argument ... must be of type string|int|null, array given +new stdClass => Argument ... must be of type string|int|null, object given +new WithToString => Argument ... must be of type string|int|null, object given Type string|bool: -42 => Argument ... ($arg) to be of type string|bool, int given -42.0 => Argument ... ($arg) to be of type string|bool, float given -INF => Argument ... ($arg) to be of type string|bool, float given +42 => Argument ... must be of type string|bool, int given +42.0 => Argument ... must be of type string|bool, float given +INF => Argument ... must be of type string|bool, float given "42" => "42" "42.0" => "42.0" "42x" => "42x" @@ -157,55 +157,55 @@ INF => Argument ... ($arg) to be of type string|bool, float given "" => "" true => true false => false -null => Argument ... ($arg) to be of type string|bool, null given -[] => Argument ... ($arg) to be of type string|bool, array given -new stdClass => Argument ... ($arg) to be of type string|bool, object given -new WithToString => Argument ... ($arg) to be of type string|bool, object given +null => Argument ... must be of type string|bool, null given +[] => Argument ... must be of type string|bool, array given +new stdClass => Argument ... must be of type string|bool, object given +new WithToString => Argument ... must be of type string|bool, object given Type float|array: 42 => 42.0 42.0 => 42.0 INF => INF -"42" => Argument ... ($arg) to be of type array|float, string given -"42.0" => Argument ... ($arg) to be of type array|float, string given -"42x" => Argument ... ($arg) to be of type array|float, string given -"x" => Argument ... ($arg) to be of type array|float, string given -"" => Argument ... ($arg) to be of type array|float, string given -true => Argument ... ($arg) to be of type array|float, bool given -false => Argument ... ($arg) to be of type array|float, bool given -null => Argument ... ($arg) to be of type array|float, null given +"42" => Argument ... must be of type array|float, string given +"42.0" => Argument ... must be of type array|float, string given +"42x" => Argument ... must be of type array|float, string given +"x" => Argument ... must be of type array|float, string given +"" => Argument ... must be of type array|float, string given +true => Argument ... must be of type array|float, bool given +false => Argument ... must be of type array|float, bool given +null => Argument ... must be of type array|float, null given [] => [] -new stdClass => Argument ... ($arg) to be of type array|float, object given -new WithToString => Argument ... ($arg) to be of type array|float, object given +new stdClass => Argument ... must be of type array|float, object given +new WithToString => Argument ... must be of type array|float, object given Type string|array: -42 => Argument ... ($arg) to be of type array|string, int given -42.0 => Argument ... ($arg) to be of type array|string, float given -INF => Argument ... ($arg) to be of type array|string, float given +42 => Argument ... must be of type array|string, int given +42.0 => Argument ... must be of type array|string, float given +INF => Argument ... must be of type array|string, float given "42" => "42" "42.0" => "42.0" "42x" => "42x" "x" => "x" "" => "" -true => Argument ... ($arg) to be of type array|string, bool given -false => Argument ... ($arg) to be of type array|string, bool given -null => Argument ... ($arg) to be of type array|string, null given +true => Argument ... must be of type array|string, bool given +false => Argument ... must be of type array|string, bool given +null => Argument ... must be of type array|string, null given [] => [] -new stdClass => Argument ... ($arg) to be of type array|string, object given -new WithToString => Argument ... ($arg) to be of type array|string, object given +new stdClass => Argument ... must be of type array|string, object given +new WithToString => Argument ... must be of type array|string, object given Type bool|array: -42 => Argument ... ($arg) to be of type array|bool, int given -42.0 => Argument ... ($arg) to be of type array|bool, float given -INF => Argument ... ($arg) to be of type array|bool, float given -"42" => Argument ... ($arg) to be of type array|bool, string given -"42.0" => Argument ... ($arg) to be of type array|bool, string given -"42x" => Argument ... ($arg) to be of type array|bool, string given -"x" => Argument ... ($arg) to be of type array|bool, string given -"" => Argument ... ($arg) to be of type array|bool, string given +42 => Argument ... must be of type array|bool, int given +42.0 => Argument ... must be of type array|bool, float given +INF => Argument ... must be of type array|bool, float given +"42" => Argument ... must be of type array|bool, string given +"42.0" => Argument ... must be of type array|bool, string given +"42x" => Argument ... must be of type array|bool, string given +"x" => Argument ... must be of type array|bool, string given +"" => Argument ... must be of type array|bool, string given true => true false => false -null => Argument ... ($arg) to be of type array|bool, null given +null => Argument ... must be of type array|bool, null given [] => [] -new stdClass => Argument ... ($arg) to be of type array|bool, object given -new WithToString => Argument ... ($arg) to be of type array|bool, object given +new stdClass => Argument ... must be of type array|bool, object given +new WithToString => Argument ... must be of type array|bool, object given diff --git a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt index c48e95f640e74..1b9fa4b316eb8 100644 --- a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt +++ b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt @@ -35,7 +35,7 @@ function test(string $type, array $values) { } catch (TypeError $e) { $msg = $e->getMessage(); $msg = strstr($msg, ', called in', true); - $msg = str_replace('{closure}() expects argument #1', 'Argument ...', $msg); + $msg = str_replace('{closure}(): Argument #1 ($arg)', 'Argument ...', $msg); echo $msg; } echo "\n"; @@ -71,14 +71,14 @@ INF => INF "42" => 42 "42.0" => 42.0 "42x" => 42 (A non well formed numeric value encountered) -"x" => Argument ... ($arg) to be of type int|float, string given -"" => Argument ... ($arg) to be of type int|float, string given +"x" => Argument ... must be of type int|float, string given +"" => Argument ... must be of type int|float, string given true => 1 false => 0 -null => Argument ... ($arg) to be of type int|float, null given -[] => Argument ... ($arg) to be of type int|float, array given -new stdClass => Argument ... ($arg) to be of type int|float, object given -new WithToString => Argument ... ($arg) to be of type int|float, object given +null => Argument ... must be of type int|float, null given +[] => Argument ... must be of type int|float, array given +new stdClass => Argument ... must be of type int|float, object given +new WithToString => Argument ... must be of type int|float, object given Type int|float|false: 42 => 42 @@ -87,14 +87,14 @@ INF => INF "42" => 42 "42.0" => 42.0 "42x" => 42 (A non well formed numeric value encountered) -"x" => Argument ... ($arg) to be of type int|float|false, string given -"" => Argument ... ($arg) to be of type int|float|false, string given +"x" => Argument ... must be of type int|float|false, string given +"" => Argument ... must be of type int|float|false, string given true => 1 false => false -null => Argument ... ($arg) to be of type int|float|false, null given -[] => Argument ... ($arg) to be of type int|float|false, array given -new stdClass => Argument ... ($arg) to be of type int|float|false, object given -new WithToString => Argument ... ($arg) to be of type int|float|false, object given +null => Argument ... must be of type int|float|false, null given +[] => Argument ... must be of type int|float|false, array given +new stdClass => Argument ... must be of type int|float|false, object given +new WithToString => Argument ... must be of type int|float|false, object given Type int|float|bool: 42 => 42 @@ -107,10 +107,10 @@ INF => INF "" => false true => true false => false -null => Argument ... ($arg) to be of type int|float|bool, null given -[] => Argument ... ($arg) to be of type int|float|bool, array given -new stdClass => Argument ... ($arg) to be of type int|float|bool, object given -new WithToString => Argument ... ($arg) to be of type int|float|bool, object given +null => Argument ... must be of type int|float|bool, null given +[] => Argument ... must be of type int|float|bool, array given +new stdClass => Argument ... must be of type int|float|bool, object given +new WithToString => Argument ... must be of type int|float|bool, object given Type int|bool: 42 => 42 @@ -123,10 +123,10 @@ INF => true "" => false true => true false => false -null => Argument ... ($arg) to be of type int|bool, null given -[] => Argument ... ($arg) to be of type int|bool, array given -new stdClass => Argument ... ($arg) to be of type int|bool, object given -new WithToString => Argument ... ($arg) to be of type int|bool, object given +null => Argument ... must be of type int|bool, null given +[] => Argument ... must be of type int|bool, array given +new stdClass => Argument ... must be of type int|bool, object given +new WithToString => Argument ... must be of type int|bool, object given Type int|string|null: 42 => 42 @@ -140,8 +140,8 @@ INF => "INF" true => 1 false => 0 null => null -[] => Argument ... ($arg) to be of type string|int|null, array given -new stdClass => Argument ... ($arg) to be of type string|int|null, object given +[] => Argument ... must be of type string|int|null, array given +new stdClass => Argument ... must be of type string|int|null, object given new WithToString => "__toString()" Type string|bool: @@ -155,9 +155,9 @@ INF => "INF" "" => "" true => true false => false -null => Argument ... ($arg) to be of type string|bool, null given -[] => Argument ... ($arg) to be of type string|bool, array given -new stdClass => Argument ... ($arg) to be of type string|bool, object given +null => Argument ... must be of type string|bool, null given +[] => Argument ... must be of type string|bool, array given +new stdClass => Argument ... must be of type string|bool, object given new WithToString => "__toString()" Type float|array: @@ -167,14 +167,14 @@ INF => INF "42" => 42.0 "42.0" => 42.0 "42x" => 42.0 (A non well formed numeric value encountered) -"x" => Argument ... ($arg) to be of type array|float, string given -"" => Argument ... ($arg) to be of type array|float, string given +"x" => Argument ... must be of type array|float, string given +"" => Argument ... must be of type array|float, string given true => 1.0 false => 0.0 -null => Argument ... ($arg) to be of type array|float, null given +null => Argument ... must be of type array|float, null given [] => [] -new stdClass => Argument ... ($arg) to be of type array|float, object given -new WithToString => Argument ... ($arg) to be of type array|float, object given +new stdClass => Argument ... must be of type array|float, object given +new WithToString => Argument ... must be of type array|float, object given Type string|array: 42 => "42" @@ -187,9 +187,9 @@ INF => "INF" "" => "" true => "1" false => "" -null => Argument ... ($arg) to be of type array|string, null given +null => Argument ... must be of type array|string, null given [] => [] -new stdClass => Argument ... ($arg) to be of type array|string, object given +new stdClass => Argument ... must be of type array|string, object given new WithToString => "__toString()" Type bool|array: @@ -203,7 +203,7 @@ INF => true "" => false true => true false => false -null => Argument ... ($arg) to be of type array|bool, null given +null => Argument ... must be of type array|bool, null given [] => [] -new stdClass => Argument ... ($arg) to be of type array|bool, object given -new WithToString => Argument ... ($arg) to be of type array|bool, object given +new stdClass => Argument ... must be of type array|bool, object given +new WithToString => Argument ... must be of type array|bool, object given diff --git a/Zend/tests/type_declarations/weak_include_strict.phpt b/Zend/tests/type_declarations/weak_include_strict.phpt index 61f33818e2420..9bf6c0a47f604 100644 --- a/Zend/tests/type_declarations/weak_include_strict.phpt +++ b/Zend/tests/type_declarations/weak_include_strict.phpt @@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc'; // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: takes_int(): Argument #1 ($x) must be of type int, float given, called in %s:%d Stack trace: #0 %s(%d): takes_int(1) #1 %s(%d): require('%s') diff --git a/Zend/tests/typehints/or_null.phpt b/Zend/tests/typehints/or_null.phpt index 55714620c28b6..2d0683edbbc15 100644 --- a/Zend/tests/typehints/or_null.phpt +++ b/Zend/tests/typehints/or_null.phpt @@ -219,39 +219,39 @@ try { ?> --EXPECTF-- -TypeError: unloadedClass() expects argument #1 ($param) to be of type ?I\Dont\Exist, stdClass given, called in %s on line %d and defined in %s:%d +TypeError: unloadedClass(): Argument #1 ($param) must be of type ?I\Dont\Exist, stdClass given, called in %s:%d Stack trace: #0 %s(8): unloadedClass(Object(stdClass)) #1 {main} -TypeError: loadedClass() expects argument #1 ($param) to be of type ?RealClass, stdClass given, called in %s on line %d and defined in %s:%d +TypeError: loadedClass(): Argument #1 ($param) must be of type ?RealClass, stdClass given, called in %s:%d Stack trace: #0 %s(20): loadedClass(Object(stdClass)) #1 {main} -TypeError: loadedInterface() expects argument #1 ($param) to be of type ?RealInterface, stdClass given, called in %s on line %d and defined in %s:%d +TypeError: loadedInterface(): Argument #1 ($param) must be of type ?RealInterface, stdClass given, called in %s:%d Stack trace: #0 %s(26): loadedInterface(Object(stdClass)) #1 {main} -TypeError: unloadedClass() expects argument #1 ($param) to be of type ?I\Dont\Exist, int given, called in %s on line %d and defined in %s:%d +TypeError: unloadedClass(): Argument #1 ($param) must be of type ?I\Dont\Exist, int given, called in %s:%d Stack trace: #0 %s(32): unloadedClass(1) #1 {main} -TypeError: loadedClass() expects argument #1 ($param) to be of type ?RealClass, int given, called in %s on line %d and defined in %s:%d +TypeError: loadedClass(): Argument #1 ($param) must be of type ?RealClass, int given, called in %s:%d Stack trace: #0 %s(38): loadedClass(1) #1 {main} -TypeError: loadedInterface() expects argument #1 ($param) to be of type ?RealInterface, int given, called in %s on line %d and defined in %s:%d +TypeError: loadedInterface(): Argument #1 ($param) must be of type ?RealInterface, int given, called in %s:%d Stack trace: #0 %s(44): loadedInterface(1) #1 {main} -TypeError: callableF() expects argument #1 ($param) to be of type ?callable, int given, called in %s on line %d and defined in %s:%d +TypeError: callableF(): Argument #1 ($param) must be of type ?callable, int given, called in %s:%d Stack trace: #0 %s(52): callableF(1) #1 {main} -TypeError: iterableF() expects argument #1 ($param) to be of type ?iterable, int given, called in %s on line %d and defined in %s:%d +TypeError: iterableF(): Argument #1 ($param) must be of type ?iterable, int given, called in %s:%d Stack trace: #0 %s(60): iterableF(1) #1 {main} -TypeError: intF() expects argument #1 ($param) to be of type ?int, object given, called in %s on line %d and defined in %s:%d +TypeError: intF(): Argument #1 ($param) must be of type ?int, object given, called in %s:%d Stack trace: #0 %s(68): intF(Object(stdClass)) #1 {main} diff --git a/Zend/tests/variadic/typehint_error.phpt b/Zend/tests/variadic/typehint_error.phpt index 712e21d3ac1f1..3d92214cf390b 100644 --- a/Zend/tests/variadic/typehint_error.phpt +++ b/Zend/tests/variadic/typehint_error.phpt @@ -33,7 +33,7 @@ array(3) { } } -Fatal error: Uncaught TypeError: test() expects argument #3 ($args) to be of type array, int given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: test(): Argument #3 ($args) must be of type array, int given, called in %s:%d Stack trace: #0 %s(%d): test(Array, Array, 2) #1 {main} diff --git a/Zend/tests/variadic/typehint_suppressed_error.phpt b/Zend/tests/variadic/typehint_suppressed_error.phpt index d1168f4025deb..8bec0389f8c26 100644 --- a/Zend/tests/variadic/typehint_suppressed_error.phpt +++ b/Zend/tests/variadic/typehint_suppressed_error.phpt @@ -15,4 +15,4 @@ try { ?> --EXPECTF-- -string(%d) "test() expects argument #3 ($args) to be of type array, int given, called in %s on line %d" +string(%d) "test(): Argument #3 ($args) must be of type array, int given, called in %s on line %d" diff --git a/Zend/zend_API.c b/Zend/zend_API.c index a739303cf3156..74afc47474540 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -216,7 +216,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, z return; } - zend_argument_type_error(num, "to be %s, %s given", expected_error[expected_type], zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be %s, %s given", expected_error[expected_type], zend_zval_type_name(arg)); } /* }}} */ @@ -226,7 +226,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, return; } - zend_argument_type_error(num, "to be of type %s, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s, %s given", name, zend_zval_type_name(arg)); } /* }}} */ @@ -236,7 +236,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *e return; } - zend_argument_type_error(num, "to be a valid callback, %s", error); + zend_argument_type_error(num, "must be a valid callback, %s", error); efree(error); } /* }}} */ @@ -259,9 +259,10 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_error(zend_class_entry *erro zend_vspprintf(&message, 0, format, va); va_end(va); - zend_throw_error(error_ce, "%s%s%s() expects argument #%d%s%s%s %s", - class_name, space, get_active_function_name(), arg_num, - arg_name ? " ($" : "", arg_name ? arg_name : "", arg_name ? ")" : "", message + zend_throw_error(error_ce, "%s%s%s(): Argument #%d%s%s%s %s", + class_name, space, get_active_function_name(), + arg_num, arg_name ? " ($" : "", arg_name ? arg_name : "", arg_name ? ")" : "", + message ); efree(message); } @@ -283,13 +284,13 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pc *pce = zend_lookup_class(Z_STR_P(arg)); if (ce_base) { if ((!*pce || !instanceof_function(*pce, ce_base))) { - zend_argument_type_error(num, "to be a class name derived from %s, '%s' given", ZSTR_VAL(ce_base->name), Z_STRVAL_P(arg)); + zend_argument_type_error(num, "must be a class name derived from %s, '%s' given", ZSTR_VAL(ce_base->name), Z_STRVAL_P(arg)); *pce = NULL; return 0; } } if (!*pce) { - zend_argument_type_error(num, "to be a valid class name, '%s' given", Z_STRVAL_P(arg)); + zend_argument_type_error(num, "must be a valid class name, '%s' given", Z_STRVAL_P(arg)); return 0; } return 1; @@ -745,10 +746,10 @@ static int zend_parse_arg(int arg_num, zval *arg, va_list *va, const char **spec } if (!(flags & ZEND_PARSE_PARAMS_QUIET) && (*expected_type || error)) { if (error) { - zend_argument_type_error(arg_num, "to be %s", error); + zend_argument_type_error(arg_num, "must be %s", error); efree(error); } else { - zend_argument_type_error(arg_num, "to be of type %s, %s given", expected_type, zend_zval_type_name(arg)); + zend_argument_type_error(arg_num, "must be of type %s, %s given", expected_type, zend_zval_type_name(arg)); } } else if (error) { efree(error); diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 96a6b21ae2892..66cf80d64b6a2 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1388,7 +1388,7 @@ ZEND_FUNCTION(set_error_handler) if (Z_TYPE_P(error_handler) != IS_NULL) { /* NULL == unset */ if (!zend_is_callable(error_handler, 0, NULL)) { zend_string *error_handler_name = zend_get_callable_name(error_handler); - zend_error(E_WARNING, "%s() expects argument #1 ($error_handler) to be a valid callback", get_active_function_name()); + zend_error(E_WARNING, "%s(): Argument #1 ($error_handler) must be a valid callback", get_active_function_name()); zend_string_release_ex(error_handler_name, 0); return; } @@ -1452,7 +1452,7 @@ ZEND_FUNCTION(set_exception_handler) if (Z_TYPE_P(exception_handler) != IS_NULL) { /* NULL == unset */ if (!zend_is_callable(exception_handler, 0, NULL)) { zend_string *exception_handler_name = zend_get_callable_name(exception_handler); - zend_error(E_WARNING, "%s() expects argument #1 ($exception_handler) to be a valid callback", get_active_function_name()); + zend_error(E_WARNING, "%s(): Argument #1 ($exception_handler) must be a valid callback", get_active_function_name()); zend_string_release_ex(exception_handler_name, 0); return; } diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index b851439e396bf..f550614130d35 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -692,16 +692,21 @@ ZEND_API ZEND_COLD void zend_verify_arg_error( if (zf->common.type == ZEND_USER_FUNCTION) { if (ptr && ptr->func && ZEND_USER_CODE(ptr->func->common.type)) { - zend_type_error("%s%s%s() expects argument #%d ($%s) to be of type %s, %s given, called in %s on line %d", - fclass, fsep, fname, arg_num, ZSTR_VAL(arg_info->name), ZSTR_VAL(need_msg), given_msg, - ZSTR_VAL(ptr->func->op_array.filename), ptr->opline->lineno); + zend_type_error("%s%s%s(): Argument #%d ($%s) must be of type %s, %s given, called in %s on line %d", + fclass, fsep, fname, + arg_num, ZSTR_VAL(arg_info->name), + ZSTR_VAL(need_msg), given_msg, + ZSTR_VAL(ptr->func->op_array.filename), ptr->opline->lineno + ); } else { - zend_type_error("%s%s%s() expects argument #%d ($%s) to be of type %s, %s given", - fclass, fsep, fname, arg_num, ZSTR_VAL(arg_info->name), ZSTR_VAL(need_msg), given_msg); + zend_type_error("%s%s%s(): Argument #%d ($%s) must be of type %s, %s given", + fclass, fsep, fname, arg_num, ZSTR_VAL(arg_info->name), ZSTR_VAL(need_msg), given_msg + ); } } else { - zend_type_error("%s%s%s() expects argument #%d ($%s) to be of type %s, %s given", - fclass, fsep, fname, arg_num, ((zend_internal_arg_info*) arg_info)->name, ZSTR_VAL(need_msg), given_msg); + zend_type_error("%s%s%s(): Argument #%d ($%s) must be of type %s, %s given", + fclass, fsep, fname, arg_num, ((zend_internal_arg_info*) arg_info)->name, ZSTR_VAL(need_msg), given_msg + ); } zend_string_release(need_msg); @@ -1925,7 +1930,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_param_must_be_ref(con { const char *arg_name = get_function_arg_name(func, arg_num); - zend_error(E_WARNING, "%s%s%s() expects argument #%d%s%s%s to be passed by reference, value given", + zend_error(E_WARNING, "%s%s%s(): Argument #%d%s%s%s must be passed by reference, value given", func->common.scope ? ZSTR_VAL(func->common.scope->name) : "", func->common.scope ? "::" : "", ZSTR_VAL(func->common.function_name), @@ -2550,8 +2555,9 @@ static ZEND_COLD void ZEND_FASTCALL zend_array_key_exists_error( ZVAL_UNDEFINED_OP2(); } if (!EG(exception)) { - zend_type_error("array_key_exists() expects argument #2 ($array) to be of type array, %s given", - zend_get_type_by_const(Z_TYPE_P(subject))); + zend_type_error("array_key_exists(): Argument #2 ($array) must be of type array, %s given", + zend_get_type_by_const(Z_TYPE_P(subject)) + ); } } diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 80d0cf26ee661..514c40ec1bab8 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -751,7 +751,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) / const char *arg_name = get_function_arg_name(func, i + 1); zend_error(E_WARNING, - "%s%s%s() expects argument #%d%s%s%s to be passed by reference, value given", + "%s%s%s(): Argument #%d%s%s%s must be passed by reference, value given", func->common.scope ? ZSTR_VAL(func->common.scope->name) : "", func->common.scope ? "::" : "", ZSTR_VAL(func->common.function_name), diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 7f0de717a4bb1..bf5a156389ed2 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3775,7 +3775,7 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV, NUM) init_func_run_time_cache(&func->op_array); } } else { - zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); + zend_type_error("%s(): Argument #1 ($function) must be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); efree(error); FREE_OP2(); HANDLE_EXCEPTION(); @@ -4938,7 +4938,7 @@ ZEND_VM_HANDLER(119, ZEND_SEND_ARRAY, ANY, ANY, NUM) ZEND_VM_C_GOTO(send_array); } } - zend_type_error("call_user_func_array() expects argument #2 ($args) to be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args))); + zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args))); FREE_UNFETCHED_OP2(); FREE_OP1(); HANDLE_EXCEPTION(); @@ -7909,7 +7909,7 @@ ZEND_VM_COLD_CONST_HANDLER(121, ZEND_STRLEN, CONST|TMPVAR|CV, ANY) zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -8517,7 +8517,7 @@ ZEND_VM_COLD_CONST_HANDLER(191, ZEND_GET_CLASS, UNUSED|CONST|TMPVAR|CV, UNUSED) if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index c9bb2011310f8..c87df4e871545 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1981,7 +1981,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O goto send_array; } } - zend_type_error("call_user_func_array() expects argument #2 ($args) to be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args))); + zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args))); FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var); FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); @@ -4464,7 +4464,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -5889,7 +5889,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONS init_func_run_time_cache(&func->op_array); } } else { - zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); + zend_type_error("%s(): Argument #1 ($function) must be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); efree(error); HANDLE_EXCEPTION(); @@ -8065,7 +8065,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPV init_func_run_time_cache(&func->op_array); } } else { - zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); + zend_type_error("%s(): Argument #1 ($function) must be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); efree(error); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); @@ -9333,7 +9333,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CO if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -10320,7 +10320,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_H init_func_run_time_cache(&func->op_array); } } else { - zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); + zend_type_error("%s(): Argument #1 ($function) must be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error); efree(error); HANDLE_EXCEPTION(); @@ -13305,7 +13305,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEN zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -16412,7 +16412,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED_H if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -33308,7 +33308,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_UNUSED_UNUSED_H if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects argument 1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("Argument 1 ($object) passed to get_class() must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -36702,7 +36702,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CV_HANDLER(ZEND_OP zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value))); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -45260,7 +45260,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CV_UNUSED_HANDL if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; diff --git a/ext/curl/tests/curl_setopt_error.phpt b/ext/curl/tests/curl_setopt_error.phpt index e6a76e7afacf6..62a6002f39ab0 100644 --- a/ext/curl/tests/curl_setopt_error.phpt +++ b/ext/curl/tests/curl_setopt_error.phpt @@ -20,6 +20,6 @@ curl_setopt($ch, -10, 0); ?> --EXPECTF-- *** curl_setopt() call with incorrect parameters -curl_setopt() expects argument #2 ($option) to be of type int, string given +curl_setopt(): Argument #2 ($option) must be of type int, string given Warning: curl_setopt(): Invalid curl configuration option in %scurl_setopt_error.php on line %d diff --git a/ext/date/tests/014.phpt b/ext/date/tests/014.phpt index ce346c2ba9861..a2f81090e77e4 100644 --- a/ext/date/tests/014.phpt +++ b/ext/date/tests/014.phpt @@ -33,7 +33,7 @@ object(DateTimeZone)#%d (2) { } int(0) -Fatal error: Uncaught TypeError: timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, object given in %s:%d +Fatal error: Uncaught TypeError: timezone_offset_get(): Argument #1 ($object) must be of type DateTimeZone, object given in %s:%d Stack trace: #0 %s(%d): timezone_offset_get(Object(DateTime), Object(DateTimeZone)) #1 {main} diff --git a/ext/date/tests/68062.phpt b/ext/date/tests/68062.phpt index 63e40a3bd00cb..2a7c6ad61af38 100644 --- a/ext/date/tests/68062.phpt +++ b/ext/date/tests/68062.phpt @@ -14,4 +14,4 @@ try { } --EXPECT-- 3600 -DateTimeZone::getOffset() expects argument #1 ($datetime) to be of type DateTimeInterface, int given +DateTimeZone::getOffset(): Argument #1 ($datetime) must be of type DateTimeInterface, int given diff --git a/ext/date/tests/DateTimeImmutable_createFromMutable.phpt b/ext/date/tests/DateTimeImmutable_createFromMutable.phpt index 8651a90d34e52..3ac17de49f0c2 100644 --- a/ext/date/tests/DateTimeImmutable_createFromMutable.phpt +++ b/ext/date/tests/DateTimeImmutable_createFromMutable.phpt @@ -24,4 +24,4 @@ object(DateTimeImmutable)#%d (3) { ["timezone"]=> string(13) "Europe/London" } -DateTimeImmutable::createFromMutable() expects argument #1 ($object) to be of type DateTime, object given +DateTimeImmutable::createFromMutable(): Argument #1 ($object) must be of type DateTime, object given diff --git a/ext/date/tests/DateTime_createFromImmutable.phpt b/ext/date/tests/DateTime_createFromImmutable.phpt index 153e7f3cbffa5..6407333f0688a 100644 --- a/ext/date/tests/DateTime_createFromImmutable.phpt +++ b/ext/date/tests/DateTime_createFromImmutable.phpt @@ -30,4 +30,4 @@ object(DateTime)#%d (3) { string(13) "Europe/London" } bool(true) -DateTime::createFromImmutable() expects argument #1 ($object) to be of type DateTimeImmutable, object given +DateTime::createFromImmutable(): Argument #1 ($object) must be of type DateTimeImmutable, object given diff --git a/ext/date/tests/bug36988.phpt b/ext/date/tests/bug36988.phpt index ecb6e8ad7ac17..275dc80a0d505 100644 --- a/ext/date/tests/bug36988.phpt +++ b/ext/date/tests/bug36988.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -mktime() expects argument #6 ($year) to be of type int, float given +mktime(): Argument #6 ($year) must be of type int, float given diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt index 639868aecb356..de2936c853418 100644 --- a/ext/date/tests/bug52062.phpt +++ b/ext/date/tests/bug52062.phpt @@ -28,7 +28,7 @@ var_dump($i->format('%s')); string(32) "5138-11-16 09:46:40 100000000000" bool(false) string(12) "100000000000" -DateTime::setTimestamp() expects argument #1 ($timestamp) to be of type int, float given +DateTime::setTimestamp(): Argument #1 ($timestamp) must be of type int, float given string(32) "5138-11-16 09:46:40 100000000000" bool(false) string(10) "1215752192" diff --git a/ext/date/tests/bug70245.phpt b/ext/date/tests/bug70245.phpt index 2443d91d019da..9fd566de9a996 100644 --- a/ext/date/tests/bug70245.phpt +++ b/ext/date/tests/bug70245.phpt @@ -10,4 +10,4 @@ try { } ?> --EXPECT-- -strtotime() expects argument #2 ($now) to be of type int, object given +strtotime(): Argument #2 ($now) must be of type int, object given diff --git a/ext/date/tests/microtime_error.phpt b/ext/date/tests/microtime_error.phpt index d746e5b3ac7bb..9ab11355e8b3c 100644 --- a/ext/date/tests/microtime_error.phpt +++ b/ext/date/tests/microtime_error.phpt @@ -47,11 +47,11 @@ float(%s) int(0) } } -microtime() expects argument #1 ($get_as_float) to be of type bool, array given +microtime(): Argument #1 ($get_as_float) must be of type bool, array given --> bad arg: object(stdClass)#%d (0) { } -microtime() expects argument #1 ($get_as_float) to be of type bool, object given +microtime(): Argument #1 ($get_as_float) must be of type bool, object given --> bad arg: int(1) float(%s) diff --git a/ext/date/tests/timezone_offset_get_error.phpt b/ext/date/tests/timezone_offset_get_error.phpt index 1782ced195aea..864dc54c2a9fb 100644 --- a/ext/date/tests/timezone_offset_get_error.phpt +++ b/ext/date/tests/timezone_offset_get_error.phpt @@ -65,16 +65,16 @@ try { *** Testing timezone_offset_get() : error conditions *** -- Testing timezone_offset_get() function with an invalid values for $object argument -- -string(92) "timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, object given" +string(87) "timezone_offset_get(): Argument #1 ($object) must be of type DateTimeZone, object given" -string(89) "timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, int given" +string(84) "timezone_offset_get(): Argument #1 ($object) must be of type DateTimeZone, int given" -string(90) "timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, null given" +string(85) "timezone_offset_get(): Argument #1 ($object) must be of type DateTimeZone, null given" -- Testing timezone_offset_get() function with an invalid values for $datetime argument -- -string(99) "timezone_offset_get() expects argument #2 ($datetime) to be of type DateTimeInterface, object given" +string(94) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, object given" -string(96) "timezone_offset_get() expects argument #2 ($datetime) to be of type DateTimeInterface, int given" +string(91) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, int given" -string(97) "timezone_offset_get() expects argument #2 ($datetime) to be of type DateTimeInterface, null given" +string(92) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, null given" diff --git a/ext/ffi/tests/045.phpt b/ext/ffi/tests/045.phpt index 411a03702b179..7503fb763b002 100644 --- a/ext/ffi/tests/045.phpt +++ b/ext/ffi/tests/045.phpt @@ -23,5 +23,5 @@ try { --EXPECTF-- bool(true) bool(false) -TypeError: FFI::isNull() expects argument #1 ($ptr) to be of type FFI\CData, null given +TypeError: FFI::isNull(): Argument #1 ($ptr) must be of type FFI\CData, null given FFI\Exception: Cannot instantiate FFI\CData of zero size diff --git a/ext/fileinfo/tests/finfo_open_001.phpt b/ext/fileinfo/tests/finfo_open_001.phpt index 2ceb80444c7f5..7099897142417 100644 --- a/ext/fileinfo/tests/finfo_open_001.phpt +++ b/ext/fileinfo/tests/finfo_open_001.phpt @@ -19,7 +19,7 @@ var_dump(finfo_open(FILEINFO_MIME, '/foo/bar/inexistent')); ?> --EXPECTF-- -finfo_open() expects argument #2 ($arg) to be a valid path, string given +finfo_open(): Argument #2 ($arg) must be a valid path, string given resource(%d) of type (file_info) resource(%d) of type (file_info) diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index 6e0c02c489084..72b6db3e62144 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -42,5 +42,5 @@ bool(false) Notice: finfo_open(): Warning: using regular magic file `%smagic' in %sfinfo_open_error.php on line %d resource(6) of type (file_info) -finfo_open() expects argument #1 ($options) to be of type int, string given -finfo::__construct() expects argument #1 ($options) to be of type int, string given +finfo_open(): Argument #1 ($options) must be of type int, string given +finfo::__construct(): Argument #1 ($options) must be of type int, string given diff --git a/ext/gd/tests/imagegd2_nullbyte_injection.phpt b/ext/gd/tests/imagegd2_nullbyte_injection.phpt index 775da28b7fc43..eda6cfed426fc 100644 --- a/ext/gd/tests/imagegd2_nullbyte_injection.phpt +++ b/ext/gd/tests/imagegd2_nullbyte_injection.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -imagegd() expects argument #2 ($to) to be a valid path, string given +imagegd(): Argument #2 ($to) must be a valid path, string given diff --git a/ext/gd/tests/imagegd_nullbyte_injection.phpt b/ext/gd/tests/imagegd_nullbyte_injection.phpt index e9d0af3c93c9f..d10e7dc31b7be 100644 --- a/ext/gd/tests/imagegd_nullbyte_injection.phpt +++ b/ext/gd/tests/imagegd_nullbyte_injection.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -imagegd() expects argument #2 ($to) to be a valid path, string given +imagegd(): Argument #2 ($to) must be a valid path, string given diff --git a/ext/gd/tests/imagexbm_nullbyte_injection.phpt b/ext/gd/tests/imagexbm_nullbyte_injection.phpt index a84bc78eebd16..7a24ebf816b0f 100644 --- a/ext/gd/tests/imagexbm_nullbyte_injection.phpt +++ b/ext/gd/tests/imagexbm_nullbyte_injection.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECTF-- -imagexbm() expects argument #2 ($filename) to be a valid path, string given +imagexbm(): Argument #2 ($filename) must be a valid path, string given diff --git a/ext/gmp/tests/gmp_clrbit.phpt b/ext/gmp/tests/gmp_clrbit.phpt index 5169cc79865f5..491ef79bfc8a9 100644 --- a/ext/gmp/tests/gmp_clrbit.phpt +++ b/ext/gmp/tests/gmp_clrbit.phpt @@ -47,5 +47,5 @@ Warning: gmp_clrbit(): Index must be greater than or equal to zero in %s on line string(7) "1000000" string(7) "1000000" string(30) "238462734628347239571822592658" -gmp_clrbit() expects argument #1 ($a) to be of type GMP, array given +gmp_clrbit(): Argument #1 ($a) must be of type GMP, array given Done diff --git a/ext/gmp/tests/gmp_pow.phpt b/ext/gmp/tests/gmp_pow.phpt index afa8cc13e912d..449f668667156 100644 --- a/ext/gmp/tests/gmp_pow.phpt +++ b/ext/gmp/tests/gmp_pow.phpt @@ -47,7 +47,7 @@ Warning: gmp_pow(): Negative exponent not supported in %s on line %d string(1) "0" string(14) "10240000000000" string(14) "10240000000000" -gmp_pow() expects argument #2 ($exp) to be of type int, array given +gmp_pow(): Argument #2 ($exp) must be of type int, array given Warning: gmp_pow(): Unable to convert variable to GMP - wrong type in %s on line %d bool(false) diff --git a/ext/gmp/tests/gmp_setbit.phpt b/ext/gmp/tests/gmp_setbit.phpt index 30d9021247919..b883060e5425b 100644 --- a/ext/gmp/tests/gmp_setbit.phpt +++ b/ext/gmp/tests/gmp_setbit.phpt @@ -57,6 +57,6 @@ string(1) "7" string(12) "100008388608" string(12) "100000000000" string(12) "100000000008" -gmp_setbit() expects argument #1 ($a) to be of type GMP, string given -gmp_setbit() expects argument #1 ($a) to be of type GMP, array given +gmp_setbit(): Argument #1 ($a) must be of type GMP, string given +gmp_setbit(): Argument #1 ($a) must be of type GMP, array given Done diff --git a/ext/imap/tests/imap_expunge_error.phpt b/ext/imap/tests/imap_expunge_error.phpt index 3b6686a68d532..b27038093cfa3 100644 --- a/ext/imap/tests/imap_expunge_error.phpt +++ b/ext/imap/tests/imap_expunge_error.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_num_recent() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_num_recent() expects argument #1 to be of type resource, string given in %s on line %d +Warning: imap_num_recent(): Argument #1 must be of type resource, string given in %s on line %d -Warning: imap_num_recent() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: imap_num_recent(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_gc_error.phpt b/ext/imap/tests/imap_gc_error.phpt index e3c05c68550f3..2d825ce1fdf19 100644 --- a/ext/imap/tests/imap_gc_error.phpt +++ b/ext/imap/tests/imap_gc_error.phpt @@ -28,8 +28,8 @@ Checking with no parameters Warning: imap_gc() Expects exactly 2 parameters, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_gc() expects argument #1 to be of type resource, string given in %s on line %d +Warning: imap_gc(): Argument #1 must be of type resource, string given in %s on line %d -Warning: imap_gc() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: imap_gc(): Argument #1 must be of type resource, bool given in %s on line %d Warning: imap_gc(): Invalid value for the flags parameter in %s on line %d diff --git a/ext/imap/tests/imap_headers.phpt b/ext/imap/tests/imap_headers.phpt index 73c0c52306556..1ff30bfc10f0b 100644 --- a/ext/imap/tests/imap_headers.phpt +++ b/ext/imap/tests/imap_headers.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_headers() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_headers() expects argument #1 to be of type resource, string given in %s on line %d +Warning: imap_headers(): Argument #1 must be of type resource, string given in %s on line %d -Warning: imap_headers() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: imap_headers(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_num_msg_error.phpt b/ext/imap/tests/imap_num_msg_error.phpt index e6a5650e6d689..28a727ddb23d4 100644 --- a/ext/imap/tests/imap_num_msg_error.phpt +++ b/ext/imap/tests/imap_num_msg_error.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_num_msg() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_num_msg() expects argument #1 to be of type resource, string given in %s on line %d +Warning: imap_num_msg(): Argument #1 must be of type resource, string given in %s on line %d -Warning: imap_num_msg() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: imap_num_msg(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_num_recent_error.phpt b/ext/imap/tests/imap_num_recent_error.phpt index 4f4fef50541bf..0bb877c76df48 100644 --- a/ext/imap/tests/imap_num_recent_error.phpt +++ b/ext/imap/tests/imap_num_recent_error.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_expunge() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_expunge() expects argument #1 to be of type resource, string given in %s on line %d +Warning: imap_expunge(): Argument #1 must be of type resource, string given in %s on line %d -Warning: imap_expunge() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: imap_expunge(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_ping_error.phpt b/ext/imap/tests/imap_ping_error.phpt index 918407ac0636a..2aedcbddd50b4 100644 --- a/ext/imap/tests/imap_ping_error.phpt +++ b/ext/imap/tests/imap_ping_error.phpt @@ -22,6 +22,6 @@ Checking with no parameters Warning: imap_ping() expects exactly 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_ping() expects argument #1 to be of type resource, string given in %s on line %d +Warning: imap_ping(): Argument #1 must be of type resource, string given in %s on line %d -Warning: imap_ping() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: imap_ping(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_timeout_basic.phpt b/ext/imap/tests/imap_timeout_basic.phpt index 7b83309ef7a52..afe1d2d081821 100644 --- a/ext/imap/tests/imap_timeout_basic.phpt +++ b/ext/imap/tests/imap_timeout_basic.phpt @@ -44,7 +44,7 @@ Checking with no parameters Warning: imap_timeout() expects at least 1 parameter, 0 given in %s on line %d Checking with incorrect parameter type -Warning: imap_timeout() expects argument #1 to be of type int, %s given in %s on line %d +Warning: imap_timeout(): Argument #1 must be of type int, %s given in %s on line %d GET values: int(%d) int(%d) diff --git a/ext/intl/tests/breakiter___construct_error.phpt b/ext/intl/tests/breakiter___construct_error.phpt index 35a145dceccb1..c8cbdcc6de3e2 100644 --- a/ext/intl/tests/breakiter___construct_error.phpt +++ b/ext/intl/tests/breakiter___construct_error.phpt @@ -43,6 +43,6 @@ Exception: IntlRuleBasedBreakIterator::__construct() expects at least 1 paramete Exception: IntlRuleBasedBreakIterator::__construct() expects at most 2 parameters, 3 given in %s on line %d -Exception: IntlRuleBasedBreakIterator::__construct() expects argument #2 ($areCompiled) to be of type bool, array given in %s on line %d +Exception: IntlRuleBasedBreakIterator::__construct(): Argument #2 ($areCompiled) must be of type bool, array given in %s on line %d Exception: IntlRuleBasedBreakIterator::__construct(): rbbi_create_instance: unable to create instance from compiled rules in %s on line %d diff --git a/ext/intl/tests/bug48227.phpt b/ext/intl/tests/bug48227.phpt index 28a614da030a5..9635b70906e6d 100644 --- a/ext/intl/tests/bug48227.phpt +++ b/ext/intl/tests/bug48227.phpt @@ -16,7 +16,7 @@ foreach (['', 1, NULL, $x] as $value) { ?> --EXPECT-- -NumberFormatter::format() expects argument #1 ($value) to be of type number, string given +NumberFormatter::format(): Argument #1 ($value) must be of type number, string given string(1) "1" string(1) "0" -NumberFormatter::format() expects argument #1 ($value) to be of type number, object given +NumberFormatter::format(): Argument #1 ($value) must be of type number, object given diff --git a/ext/intl/tests/calendar_add_error.phpt b/ext/intl/tests/calendar_add_error.phpt index e30ed02856861..59b9abc053d85 100644 --- a/ext/intl/tests/calendar_add_error.phpt +++ b/ext/intl/tests/calendar_add_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_add(1, 2, 3)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_add() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_add(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_add(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt index a9bbed25e6d3c..8fd6db2a1be3a 100644 --- a/ext/intl/tests/calendar_before_after_error.phpt +++ b/ext/intl/tests/calendar_before_after_error.phpt @@ -65,9 +65,9 @@ error: 0, IntlCalendar::after() expects exactly 1 parameter, 0 given error: 0, IntlCalendar::before() expects exactly 1 parameter, 0 given -error: 0, IntlCalendar::after() expects argument #1 ($calendar) to be of type IntlCalendar, int given +error: 0, IntlCalendar::after(): Argument #1 ($calendar) must be of type IntlCalendar, int given -error: 0, IntlCalendar::before() expects argument #1 ($calendar) to be of type IntlCalendar, int given +error: 0, IntlCalendar::before(): Argument #1 ($calendar) must be of type IntlCalendar, int given error: 0, IntlCalendar::after() expects exactly 1 parameter, 2 given diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt index c56f9065fc695..dd2c1e0e75b6f 100644 --- a/ext/intl/tests/calendar_clear_error.phpt +++ b/ext/intl/tests/calendar_clear_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: intlcal_clear(): intlcal_clear: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_clear() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_clear(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_clear(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt index 0d4665af60983..9da547fe5a27a 100644 --- a/ext/intl/tests/calendar_equals_error.phpt +++ b/ext/intl/tests/calendar_equals_error.phpt @@ -47,10 +47,10 @@ try { --EXPECT-- error: 0, IntlCalendar::equals() expects exactly 1 parameter, 0 given -error: 0, IntlCalendar::equals() expects argument #1 ($calendar) to be of type IntlCalendar, object given +error: 0, IntlCalendar::equals(): Argument #1 ($calendar) must be of type IntlCalendar, object given error: 0, IntlCalendar::equals() expects exactly 1 parameter, 2 given -error: 0, intlcal_equals() expects argument #2 ($calendar) to be of type IntlCalendar, array given +error: 0, intlcal_equals(): Argument #2 ($calendar) must be of type IntlCalendar, array given -error: 0, intlcal_equals() expects argument #1 ($calendarObject) to be of type IntlCalendar, int given +error: 0, intlcal_equals(): Argument #1 ($calendarObject) must be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt index 872fea825d8e5..bf9ab18c763ed 100644 --- a/ext/intl/tests/calendar_fieldDifference_error.phpt +++ b/ext/intl/tests/calendar_fieldDifference_error.phpt @@ -32,7 +32,7 @@ Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU bool(false) intlcal_field_difference() expects exactly 3 parameters, 4 given -Fatal error: Uncaught TypeError: intlcal_field_difference() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_field_difference(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_field_difference(1, 0, 1) #1 {main} diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt index 644e580f11683..5408f966e2d6e 100644 --- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt +++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt @@ -19,7 +19,7 @@ var_dump(intlcal_get_day_of_week_type(1, 1)); Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_get_day_of_week_type() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_day_of_week_type(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_day_of_week_type(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_getErrorCode_error.phpt b/ext/intl/tests/calendar_getErrorCode_error.phpt index 4d69bdedfd6fb..5bf65b59c5442 100644 --- a/ext/intl/tests/calendar_getErrorCode_error.phpt +++ b/ext/intl/tests/calendar_getErrorCode_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_error_code(null)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_error_code() expects argument #1 ($calendar) to be of type IntlCalendar, null given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_error_code(): Argument #1 ($calendar) must be of type IntlCalendar, null given in %s:%d Stack trace: #0 %s(%d): intlcal_get_error_code(NULL) #1 {main} diff --git a/ext/intl/tests/calendar_getErrorMessage_error.phpt b/ext/intl/tests/calendar_getErrorMessage_error.phpt index 68b1ad1d6cf67..733194fee9a4e 100644 --- a/ext/intl/tests/calendar_getErrorMessage_error.phpt +++ b/ext/intl/tests/calendar_getErrorMessage_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_error_message(null)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_error_message() expects argument #1 ($calendar) to be of type IntlCalendar, null given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_error_message(): Argument #1 ($calendar) must be of type IntlCalendar, null given in %s:%d Stack trace: #0 %s(%d): intlcal_get_error_message(NULL) #1 {main} diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt index 22de5dadcdbd7..fa37edd380c2f 100644 --- a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_first_day_of_week(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_first_day_of_week() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_first_day_of_week(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_first_day_of_week(1) #1 {main} diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt index 644a7eab1c5e8..9a84ac9719485 100644 --- a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_minimal_days_in_first_week(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_minimal_days_in_first_week() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_minimal_days_in_first_week(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_minimal_days_in_first_week(1) #1 {main} diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt index b49861ba49404..3c8082d62b560 100644 --- a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_skipped_wall_time_option(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_skipped_wall_time_option() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_skipped_wall_time_option(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_skipped_wall_time_option(1) #1 {main} diff --git a/ext/intl/tests/calendar_getTimeZone_error.phpt b/ext/intl/tests/calendar_getTimeZone_error.phpt index be9585a8217c3..11bc5631c8b1d 100644 --- a/ext/intl/tests/calendar_getTimeZone_error.phpt +++ b/ext/intl/tests/calendar_getTimeZone_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_time_zone(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_time_zone() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_time_zone(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_time_zone(1) #1 {main} diff --git a/ext/intl/tests/calendar_getTime_error.phpt b/ext/intl/tests/calendar_getTime_error.phpt index 6c917103cb941..6018cd7c92706 100644 --- a/ext/intl/tests/calendar_getTime_error.phpt +++ b/ext/intl/tests/calendar_getTime_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_time(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_time() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_time(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_getType_error.phpt b/ext/intl/tests/calendar_getType_error.phpt index f623bd3e8bc2b..83bf072508417 100644 --- a/ext/intl/tests/calendar_getType_error.phpt +++ b/ext/intl/tests/calendar_getType_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_type(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_get_type() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_type(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_type(1) #1 {main} diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt index b9d7f30299a63..3be22cfc9c872 100644 --- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt +++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt @@ -18,7 +18,7 @@ var_dump(intlcal_get_weekend_transition(1, 1)); Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_get_weekend_transition() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_weekend_transition(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_weekend_transition(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt index 7392294b961df..318738f0941f5 100644 --- a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt +++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt @@ -71,10 +71,10 @@ bool(false) Warning: intlcal_get_minimum(): intlcal_get_minimum: invalid field in %s on line %d bool(false) -error: 0, intlcal_get_least_maximum() expects argument #1 ($calendar) to be of type IntlCalendar, int given +error: 0, intlcal_get_least_maximum(): Argument #1 ($calendar) must be of type IntlCalendar, int given -error: 0, intlcal_get_maximum() expects argument #1 ($calendar) to be of type IntlCalendar, int given +error: 0, intlcal_get_maximum(): Argument #1 ($calendar) must be of type IntlCalendar, int given -error: 0, intlcal_get_greatest_minimum() expects argument #1 ($calendar) to be of type IntlCalendar, int given +error: 0, intlcal_get_greatest_minimum(): Argument #1 ($calendar) must be of type IntlCalendar, int given -error: 0, intlcal_get_minimum() expects argument #1 ($calendar) to be of type IntlCalendar, int given +error: 0, intlcal_get_minimum(): Argument #1 ($calendar) must be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt index 5fe75fe17a4dc..207d9e5cdb795 100644 --- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt +++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt @@ -93,11 +93,11 @@ error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: invalid fiel bool(false) error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: invalid field bool(false) -error: 0, intlcal_get() expects argument #2 ($field) to be of type int, string given +error: 0, intlcal_get(): Argument #2 ($field) must be of type int, string given -error: 0, intlcal_get_actual_maximum() expects argument #2 ($field) to be of type int, string given +error: 0, intlcal_get_actual_maximum(): Argument #2 ($field) must be of type int, string given -error: 0, intlcal_get_actual_minimum() expects argument #2 ($field) to be of type int, string given +error: 0, intlcal_get_actual_minimum(): Argument #2 ($field) must be of type int, string given error: 0, intlcal_get() expects exactly 2 parameters, 1 given diff --git a/ext/intl/tests/calendar_inDaylightTime_error.phpt b/ext/intl/tests/calendar_inDaylightTime_error.phpt index fb4492cb08b57..4b6d88aa4cb5e 100644 --- a/ext/intl/tests/calendar_inDaylightTime_error.phpt +++ b/ext/intl/tests/calendar_inDaylightTime_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_in_daylight_time(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_in_daylight_time() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_in_daylight_time(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_in_daylight_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt index 4acb3b6143e7f..a801bba952370 100644 --- a/ext/intl/tests/calendar_isEquivalentTo_error.phpt +++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt @@ -49,14 +49,14 @@ try { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } --EXPECT-- -error: 0, IntlCalendar::isEquivalentTo() expects argument #1 ($calendar) to be of type IntlCalendar, int given +error: 0, IntlCalendar::isEquivalentTo(): Argument #1 ($calendar) must be of type IntlCalendar, int given error: 0, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given -error: 0, IntlCalendar::isEquivalentTo() expects argument #1 ($calendar) to be of type IntlCalendar, int given +error: 0, IntlCalendar::isEquivalentTo(): Argument #1 ($calendar) must be of type IntlCalendar, int given error: 0, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given -error: 0, intlcal_is_equivalent_to() expects argument #2 ($calendar) to be of type IntlCalendar, int given +error: 0, intlcal_is_equivalent_to(): Argument #2 ($calendar) must be of type IntlCalendar, int given -error: 0, intlcal_is_equivalent_to() expects argument #1 ($calendarObject) to be of type IntlCalendar, int given +error: 0, intlcal_is_equivalent_to(): Argument #1 ($calendarObject) must be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_isLenient_error.phpt b/ext/intl/tests/calendar_isLenient_error.phpt index 9e4a573908ac4..dafefcc640948 100644 --- a/ext/intl/tests/calendar_isLenient_error.phpt +++ b/ext/intl/tests/calendar_isLenient_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_is_lenient(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_is_lenient() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_is_lenient(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_is_lenient(1) #1 {main} diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt index 905e7c082d912..969a5130a599d 100644 --- a/ext/intl/tests/calendar_isSet_error.phpt +++ b/ext/intl/tests/calendar_isSet_error.phpt @@ -19,7 +19,7 @@ var_dump(intlcal_is_set(1, 2)); Warning: IntlCalendar::isSet(): intlcal_is_set: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_is_set() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_is_set(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_is_set(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt index 138939d61ef73..aed66aefda959 100644 --- a/ext/intl/tests/calendar_isWeekend_error.phpt +++ b/ext/intl/tests/calendar_isWeekend_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_is_weekend(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_is_weekend() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_is_weekend(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_is_weekend(1) #1 {main} diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt index e37c6d24b2da7..de110a864cb05 100644 --- a/ext/intl/tests/calendar_roll_error.phpt +++ b/ext/intl/tests/calendar_roll_error.phpt @@ -19,7 +19,7 @@ var_dump(intlcal_roll(1, 2, 3)); Warning: IntlCalendar::roll(): intlcal_roll: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_roll() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_roll(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_roll(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt index abaad1570849f..163e41fe48286 100644 --- a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: intlcal_set_first_day_of_week(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_set_first_day_of_week() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_first_day_of_week(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_first_day_of_week(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_setLenient_error.phpt b/ext/intl/tests/calendar_setLenient_error.phpt index 7e16004dc25dc..4dadb15c9f23a 100644 --- a/ext/intl/tests/calendar_setLenient_error.phpt +++ b/ext/intl/tests/calendar_setLenient_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_set_lenient(1, false)); --EXPECTF-- -Fatal error: Uncaught TypeError: intlcal_set_lenient() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_lenient(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_lenient(1, false) #1 {main} diff --git a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt index 1973018628865..c1b1a944fb87f 100644 --- a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: intlcal_set_minimal_days_in_first_week(): intlcal_set_minimal_days_in_first_week: invalid number of days; must be between 1 and 7 in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_set_minimal_days_in_first_week() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_minimal_days_in_first_week(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_minimal_days_in_first_week(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt index 795d5d56f9e8e..c89e502e7a7a3 100644 --- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: invalid option in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_set_repeated_wall_time_option() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_repeated_wall_time_option(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_repeated_wall_time_option(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt index e8204c0d9f3cb..722b876ec370c 100644 --- a/ext/intl/tests/calendar_setTimeZone_error.phpt +++ b/ext/intl/tests/calendar_setTimeZone_error.phpt @@ -47,4 +47,4 @@ error: 0, IntlCalendar::setTimeZone() expects exactly 1 parameter, 0 given error: 0, intlcal_set_time_zone() expects exactly 2 parameters, 3 given -error: 0, intlcal_set_time_zone() expects argument #1 ($calendar) to be of type IntlCalendar, int given +error: 0, intlcal_set_time_zone(): Argument #1 ($calendar) must be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt index 397deb48da0e7..21133536049ce 100644 --- a/ext/intl/tests/calendar_set_error.phpt +++ b/ext/intl/tests/calendar_set_error.phpt @@ -38,7 +38,7 @@ bool(false) Warning: intlcal_set(): intlcal_set: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intlcal_set() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_toDateTime_error.phpt b/ext/intl/tests/calendar_toDateTime_error.phpt index e6ed8faf9c102..20f45ef6d24de 100644 --- a/ext/intl/tests/calendar_toDateTime_error.phpt +++ b/ext/intl/tests/calendar_toDateTime_error.phpt @@ -21,7 +21,7 @@ var_dump(intlcal_to_date_time(3)); Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: DateTimeZone constructor threw exception in %s on line %d string(77) "exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)" -Fatal error: Uncaught TypeError: intlcal_to_date_time() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_to_date_time(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_to_date_time(3) #1 {main} diff --git a/ext/intl/tests/formatter_fail.phpt b/ext/intl/tests/formatter_fail.phpt index 8103f1f1a350e..3201c9a82b108 100644 --- a/ext/intl/tests/formatter_fail.phpt +++ b/ext/intl/tests/formatter_fail.phpt @@ -100,13 +100,13 @@ IntlException: Constructor failed in %s on line %d 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR' 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR' -TypeError: NumberFormatter::__construct() expects argument #1 ($locale) to be of type string, array given in %s on line %d +TypeError: NumberFormatter::__construct(): Argument #1 ($locale) must be of type string, array given in %s on line %d 'U_ZERO_ERROR' -TypeError: NumberFormatter::create() expects argument #1 ($locale) to be of type string, array given in %s on line %d +TypeError: NumberFormatter::create(): Argument #1 ($locale) must be of type string, array given in %s on line %d 'U_ZERO_ERROR' -TypeError: numfmt_create() expects argument #1 ($locale) to be of type string, array given in %s on line %d +TypeError: numfmt_create(): Argument #1 ($locale) must be of type string, array given in %s on line %d 'U_ZERO_ERROR' IntlException: Constructor failed in %s on line %d diff --git a/ext/intl/tests/gregoriancalendar___construct_error.phpt b/ext/intl/tests/gregoriancalendar___construct_error.phpt index 83de556587162..1f8d90b518b74 100644 --- a/ext/intl/tests/gregoriancalendar___construct_error.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_error.phpt @@ -38,4 +38,4 @@ Too many arguments Too many arguments No variant with 4 arguments (excluding trailing NULLs) No variant with 4 arguments (excluding trailing NULLs) -IntlGregorianCalendar::__construct() expects argument #6 to be of type int, array given +IntlGregorianCalendar::__construct(): Argument #6 must be of type int, array given diff --git a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt index 2caa05538819c..3fe4faf46417e 100644 --- a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt +++ b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt @@ -14,7 +14,7 @@ var_dump(intlgregcal_get_gregorian_change(1)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intlgregcal_get_gregorian_change() expects argument #1 ($calendar) to be of type IntlGregorianCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlgregcal_get_gregorian_change(): Argument #1 ($calendar) must be of type IntlGregorianCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlgregcal_get_gregorian_change(1) #1 {main} diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt index 6223256deff7d..9cee3881f3f18 100644 --- a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt +++ b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt @@ -14,7 +14,7 @@ var_dump(intlgregcal_is_leap_year(1, 2)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intlgregcal_is_leap_year() expects argument #1 ($calendar) to be of type IntlGregorianCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlgregcal_is_leap_year(): Argument #1 ($calendar) must be of type IntlGregorianCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlgregcal_is_leap_year(1, 2) #1 {main} diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt index c02fcb35c39e5..b53e70e8ea280 100644 --- a/ext/intl/tests/msgfmt_fail2.phpt +++ b/ext/intl/tests/msgfmt_fail2.phpt @@ -136,13 +136,13 @@ IntlException: Constructor failed in %s on line %d 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR' 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR' -TypeError: MessageFormatter::__construct() expects argument #1 ($locale) to be of type string, array given in %s on line %d +TypeError: MessageFormatter::__construct(): Argument #1 ($locale) must be of type string, array given in %s on line %d 'U_ZERO_ERROR' -TypeError: MessageFormatter::create() expects argument #1 ($locale) to be of type string, array given in %s on line %d +TypeError: MessageFormatter::create(): Argument #1 ($locale) must be of type string, array given in %s on line %d 'U_ZERO_ERROR' -TypeError: msgfmt_create() expects argument #1 ($locale) to be of type string, array given in %s on line %d +TypeError: msgfmt_create(): Argument #1 ($locale) must be of type string, array given in %s on line %d 'U_ZERO_ERROR' IntlException: Constructor failed in %s on line %d diff --git a/ext/intl/tests/timezone_getDSTSavings_error.phpt b/ext/intl/tests/timezone_getDSTSavings_error.phpt index e5802d1ef46ed..fe59f3cae4435 100644 --- a/ext/intl/tests/timezone_getDSTSavings_error.phpt +++ b/ext/intl/tests/timezone_getDSTSavings_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intltz_get_dst_savings(null)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_dst_savings() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_dst_savings(): Argument #1 ($tz) must be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_dst_savings(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getDisplayName_error.phpt b/ext/intl/tests/timezone_getDisplayName_error.phpt index 7861f25fe6c54..0a76fcf1e93e7 100644 --- a/ext/intl/tests/timezone_getDisplayName_error.phpt +++ b/ext/intl/tests/timezone_getDisplayName_error.phpt @@ -16,7 +16,7 @@ var_dump(intltz_get_display_name(null, IntlTimeZone::DISPLAY_SHORT, false, 'pt_P Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: wrong display type in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intltz_get_display_name() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_display_name(): Argument #1 ($tz) must be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT') #1 {main} diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt index 91d0167b8a52a..c20e3c666a020 100644 --- a/ext/intl/tests/timezone_getErrorCode_error.phpt +++ b/ext/intl/tests/timezone_getErrorCode_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intltz_get_error_code(null)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_error_code() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_error_code(): Argument #1 ($tz) must be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_error_code(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getErrorMessage_error.phpt b/ext/intl/tests/timezone_getErrorMessage_error.phpt index d492a956ea2d6..9cd26d4f4545b 100644 --- a/ext/intl/tests/timezone_getErrorMessage_error.phpt +++ b/ext/intl/tests/timezone_getErrorMessage_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intltz_get_error_message(null)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_error_message() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_error_message(): Argument #1 ($tz) must be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_error_message(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getID_error.phpt b/ext/intl/tests/timezone_getID_error.phpt index 23c4cd172660f..da79d7c1bb7ea 100644 --- a/ext/intl/tests/timezone_getID_error.phpt +++ b/ext/intl/tests/timezone_getID_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); intltz_get_id(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_id() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_id(): Argument #1 ($tz) must be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_id(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getOffset_error.phpt b/ext/intl/tests/timezone_getOffset_error.phpt index d9715b4998509..639b690595e71 100644 --- a/ext/intl/tests/timezone_getOffset_error.phpt +++ b/ext/intl/tests/timezone_getOffset_error.phpt @@ -23,7 +23,7 @@ intltz_get_offset(null, time()*1000, false, $a, $a); Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d bool(false) -Fatal error: Uncaught TypeError: intltz_get_offset() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_offset(): Argument #1 ($tz) must be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_offset(NULL, %d, false, NULL, NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getRawOffset_error.phpt b/ext/intl/tests/timezone_getRawOffset_error.phpt index 5b495322a1a8e..612fa9b39d58d 100644 --- a/ext/intl/tests/timezone_getRawOffset_error.phpt +++ b/ext/intl/tests/timezone_getRawOffset_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); intltz_get_raw_offset(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_get_raw_offset() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_raw_offset(): Argument #1 ($tz) must be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_raw_offset(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_hasSameRules_error.phpt b/ext/intl/tests/timezone_hasSameRules_error.phpt index 4f99dc6eb5ea6..99d2a2e21d2c5 100644 --- a/ext/intl/tests/timezone_hasSameRules_error.phpt +++ b/ext/intl/tests/timezone_hasSameRules_error.phpt @@ -31,7 +31,7 @@ try { } --EXPECT-- int(0) -string(106) "IntlTimeZone::hasSameRules() expects argument #1 ($otherTimeZone) to be of type IntlTimeZone, string given" +string(101) "IntlTimeZone::hasSameRules(): Argument #1 ($otherTimeZone) must be of type IntlTimeZone, string given" int(0) -string(88) "intltz_has_same_rules() expects argument #1 ($tz) to be of type IntlTimeZone, null given" +string(83) "intltz_has_same_rules(): Argument #1 ($tz) must be of type IntlTimeZone, null given" diff --git a/ext/intl/tests/timezone_toDateTimeZone_error.phpt b/ext/intl/tests/timezone_toDateTimeZone_error.phpt index fc07b16ad5033..530c73e3bee97 100644 --- a/ext/intl/tests/timezone_toDateTimeZone_error.phpt +++ b/ext/intl/tests/timezone_toDateTimeZone_error.phpt @@ -21,7 +21,7 @@ var_dump(intltz_to_date_time_zone(1)); Warning: IntlTimeZone::toDateTimeZone(): intltz_to_date_time_zone: DateTimeZone constructor threw exception in %s on line %d string(66) "DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)" -Fatal error: Uncaught TypeError: intltz_to_date_time_zone() expects argument #1 ($tz) to be of type IntlTimeZone, int given in %s:%d +Fatal error: Uncaught TypeError: intltz_to_date_time_zone(): Argument #1 ($tz) must be of type IntlTimeZone, int given in %s:%d Stack trace: #0 %s(%d): intltz_to_date_time_zone(1) #1 {main} diff --git a/ext/intl/tests/timezone_useDaylightTime_error.phpt b/ext/intl/tests/timezone_useDaylightTime_error.phpt index 283e42ea237e4..6f702848a94ee 100644 --- a/ext/intl/tests/timezone_useDaylightTime_error.phpt +++ b/ext/intl/tests/timezone_useDaylightTime_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); intltz_use_daylight_time(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: intltz_use_daylight_time() expects argument #1 ($tz) to be of type IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_use_daylight_time(): Argument #1 ($tz) must be of type IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_use_daylight_time(NULL) #1 {main} diff --git a/ext/intl/tests/transliterator_create_inverse_error.phpt b/ext/intl/tests/transliterator_create_inverse_error.phpt index 3b069cb230249..a93554043d4a2 100644 --- a/ext/intl/tests/transliterator_create_inverse_error.phpt +++ b/ext/intl/tests/transliterator_create_inverse_error.phpt @@ -10,7 +10,7 @@ ini_set("intl.error_level", E_WARNING); transliterator_create_inverse("jj"); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: transliterator_create_inverse() expects argument #1 ($orig_trans) to be of type Transliterator, string given in %s:%d +Fatal error: Uncaught TypeError: transliterator_create_inverse(): Argument #1 ($orig_trans) must be of type Transliterator, string given in %s:%d Stack trace: #0 %s(%d): transliterator_create_inverse('jj') #1 {main} diff --git a/ext/intl/tests/transliterator_get_error_code_error.phpt b/ext/intl/tests/transliterator_get_error_code_error.phpt index bfd3c1b118a3a..64f9ea5cc2a38 100644 --- a/ext/intl/tests/transliterator_get_error_code_error.phpt +++ b/ext/intl/tests/transliterator_get_error_code_error.phpt @@ -8,7 +8,7 @@ ini_set("intl.error_level", E_WARNING); echo transliterator_get_error_code(array()), "\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: transliterator_get_error_code() expects argument #1 ($trans) to be of type Transliterator, array given in %s:%d +Fatal error: Uncaught TypeError: transliterator_get_error_code(): Argument #1 ($trans) must be of type Transliterator, array given in %s:%d Stack trace: #0 %s(%d): transliterator_get_error_code(Array) #1 {main} diff --git a/ext/intl/tests/transliterator_get_error_message_error.phpt b/ext/intl/tests/transliterator_get_error_message_error.phpt index 543480d55e331..9c2e837da385a 100644 --- a/ext/intl/tests/transliterator_get_error_message_error.phpt +++ b/ext/intl/tests/transliterator_get_error_message_error.phpt @@ -8,7 +8,7 @@ ini_set("intl.error_level", E_WARNING); echo transliterator_get_error_message(array()), "\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: transliterator_get_error_message() expects argument #1 ($trans) to be of type Transliterator, array given in %s:%d +Fatal error: Uncaught TypeError: transliterator_get_error_message(): Argument #1 ($trans) must be of type Transliterator, array given in %s:%d Stack trace: #0 %s(%d): transliterator_get_error_message(Array) #1 {main} diff --git a/ext/libxml/tests/004.phpt b/ext/libxml/tests/004.phpt index ad05ca1b9f5a1..93c3c497a29df 100644 --- a/ext/libxml/tests/004.phpt +++ b/ext/libxml/tests/004.phpt @@ -28,15 +28,15 @@ echo "Done\n"; ?> --EXPECT-- -libxml_set_streams_context() expects argument #1 ($context) to be of type resource, null given +libxml_set_streams_context(): Argument #1 ($context) must be of type resource, null given bool(true) -libxml_set_streams_context() expects argument #1 ($context) to be of type resource, string given +libxml_set_streams_context(): Argument #1 ($context) must be of type resource, string given bool(true) -libxml_set_streams_context() expects argument #1 ($context) to be of type resource, int given +libxml_set_streams_context(): Argument #1 ($context) must be of type resource, int given bool(true) -libxml_set_streams_context() expects argument #1 ($context) to be of type resource, object given +libxml_set_streams_context(): Argument #1 ($context) must be of type resource, object given bool(true) -libxml_set_streams_context() expects argument #1 ($context) to be of type resource, array given +libxml_set_streams_context(): Argument #1 ($context) must be of type resource, array given bool(true) NULL bool(true) diff --git a/ext/libxml/tests/bug63389.phpt b/ext/libxml/tests/bug63389.phpt index 12b3a032a56f3..88fce5d115be4 100644 --- a/ext/libxml/tests/bug63389.phpt +++ b/ext/libxml/tests/bug63389.phpt @@ -14,5 +14,5 @@ try { echo "okey"; ?> --EXPECT-- -libxml_set_streams_context() expects argument #1 ($context) to be of type resource, string given +libxml_set_streams_context(): Argument #1 ($context) must be of type resource, string given okey diff --git a/ext/mbstring/tests/mb_ereg1.phpt b/ext/mbstring/tests/mb_ereg1.phpt index 3f6c1132d1fa3..27e321bb64036 100644 --- a/ext/mbstring/tests/mb_ereg1.phpt +++ b/ext/mbstring/tests/mb_ereg1.phpt @@ -45,7 +45,7 @@ array(3) { array(0) { } } -mb_ereg() expects argument #1 ($pattern) to be of type string, array given +mb_ereg(): Argument #1 ($pattern) must be of type string, array given array(3) { [0]=> array(0) { @@ -55,7 +55,7 @@ array(3) { [2]=> &string(0) "" } -mb_ereg() expects argument #2 ($string) to be of type string, array given +mb_ereg(): Argument #2 ($string) must be of type string, array given array(3) { [0]=> int(1) diff --git a/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt b/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt index 0cd2696c5aff4..f11984d0efb8b 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt @@ -96,7 +96,7 @@ if (!$TEST_EXPERIMENTAL) --EXPECTF-- Warning: Wrong parameter count for mysqli_warning::mysqli_warning() in %s on line %d -Warning: mysqli_warning::mysqli_warning() expects argument #1 to be of type object, null given in %s on line %d +Warning: mysqli_warning::mysqli_warning(): Argument #1 must be of type object, null given in %s on line %d Warning: Wrong parameter count for mysqli_warning::mysqli_warning() in %s on line %d diff --git a/ext/mysqli/tests/mysqli_embedded_connect.phpt b/ext/mysqli/tests/mysqli_embedded_connect.phpt index ecd096953fe54..aa970aaf74f02 100644 --- a/ext/mysqli/tests/mysqli_embedded_connect.phpt +++ b/ext/mysqli/tests/mysqli_embedded_connect.phpt @@ -28,5 +28,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> --EXPECTF-- -Warning: mysqli_embedded_connect() expects argument #1 to be of type mysqli, null given in %s on line %d +Warning: mysqli_embedded_connect(): Argument #1 must be of type mysqli, null given in %s on line %d done! diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index f1bbab7e39c2c..c3dde0e2f7c16 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -145,6 +145,6 @@ Exception: Too few arguments to function mysqli_fetch_object_construct::__constr NULL NULL mysqli_result object is already closed -[0] mysqli_fetch_object() expects argument #3 ($params) to be of type array, string given in %s on line %d +[0] mysqli_fetch_object(): Argument #3 ($params) must be of type array, string given in %s on line %d Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index 82e181405053a..341a08ef79236 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -130,9 +130,9 @@ require_once('skipifconnectfailure.inc'); ?> --EXPECTF-- mysqli object is not fully initialized -[0] mysqli_result::fetch_object() expects argument #1 ($class_name) to be of type string, object given in %s on line %d +[0] mysqli_result::fetch_object(): Argument #1 ($class_name) must be of type string, object given in %s on line %d [0] mysqli_result::fetch_object() expects at most 2 parameters, 3 given in %s on line %d -[0] mysqli_result::fetch_object() expects argument #2 ($params) to be of type array, null given in %s on line %d +[0] mysqli_result::fetch_object(): Argument #2 ($params) must be of type array, null given in %s on line %d Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 1 passed and exactly 2 expected NULL NULL diff --git a/ext/oci8/tests/bug51291_1.phpt b/ext/oci8/tests/bug51291_1.phpt index 4875b1dc17b01..fcb41dd7c9508 100644 --- a/ext/oci8/tests/bug51291_1.phpt +++ b/ext/oci8/tests/bug51291_1.phpt @@ -165,7 +165,7 @@ array(4) { Test 2 - Parse -Warning: oci_error() expects argument #1 to be of type resource, bool%sgiven in %sbug51291_1.php on line %d +Warning: oci_error(): Argument #1 must be of type resource, bool%sgiven in %sbug51291_1.php on line %d bool(false) array(4) { ["code"]=> @@ -180,7 +180,7 @@ array(4) { NULL 2nd call -Warning: oci_error() expects argument #1 to be of type resource, bool%sgiven in %sbug51291_1.php on line %d +Warning: oci_error(): Argument #1 must be of type resource, bool%sgiven in %sbug51291_1.php on line %d bool(false) array(4) { ["code"]=> diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index 14bdfb73d6128..72ed493d8a185 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -79,17 +79,17 @@ echo "Done\n"; Invalid Connection resource -Warning: oci_set_action() expects argument #1 to be of type resource, null given in %s on line %d +Warning: oci_set_action(): Argument #1 must be of type resource, null given in %s on line %d NULL Invalid Connection resource 2 -Warning: oci_set_client_info() expects argument #1 to be of type resource, %s given in %s on line %d +Warning: oci_set_client_info(): Argument #1 must be of type resource, %s given in %s on line %d NULL Invalid Value -Warning: oci_set_action() expects argument #2 to be of type %s, resource given in %s on line %d +Warning: oci_set_action(): Argument #2 must be of type %s, resource given in %s on line %d NULL Set Values multiple times diff --git a/ext/oci8/tests/lob_002.phpt b/ext/oci8/tests/lob_002.phpt index e69de8e0db81f..426ab91cbaf31 100644 --- a/ext/oci8/tests/lob_002.phpt +++ b/ext/oci8/tests/lob_002.phpt @@ -60,13 +60,13 @@ object(OCI-Lob)#%d (1) { } int(0) -Warning: OCI-Lob::write() expects argument #2 to be of type int%s string given in %slob_002.php on line %d +Warning: OCI-Lob::write(): Argument #2 must be of type int%s string given in %slob_002.php on line %d NULL int(4) int(40000) int(40004) -Warning: OCI-Lob::seek() expects argument #1 to be of type int%s string given in %slob_002.php on line %d +Warning: OCI-Lob::seek(): Argument #1 must be of type int%s string given in %slob_002.php on line %d NULL bool(false) int(40004) diff --git a/ext/oci8/tests/lob_021.phpt b/ext/oci8/tests/lob_021.phpt index 0745c76c3c02f..3fbf4fab5a227 100644 --- a/ext/oci8/tests/lob_021.phpt +++ b/ext/oci8/tests/lob_021.phpt @@ -61,7 +61,7 @@ bool(false) Warning: oci_free_descriptor(): %s is not a valid oci8 descriptor resource in %s on line %d bool(false) -Warning: oci_free_descriptor() expects argument #1 to be of type OCI-Lob, object given in %s on line %d +Warning: oci_free_descriptor(): Argument #1 must be of type OCI-Lob, object given in %s on line %d NULL Warning: oci_free_descriptor(): Unable to find descriptor property in %s on line %d diff --git a/ext/oci8/tests/lob_026.phpt b/ext/oci8/tests/lob_026.phpt index 2a39db46d6aa5..301a8f4b62aaf 100644 --- a/ext/oci8/tests/lob_026.phpt +++ b/ext/oci8/tests/lob_026.phpt @@ -73,7 +73,7 @@ NULL bool(true) int(3) -Warning: oci_lob_seek() expects argument #1 to be of type OCI-Lob, int%sgiven in %s on line %d +Warning: oci_lob_seek(): Argument #1 must be of type OCI-Lob, int%sgiven in %s on line %d NULL bool(true) array(2) { diff --git a/ext/oci8/tests/null_byte_1.phpt b/ext/oci8/tests/null_byte_1.phpt index e5857450f8d83..4a69258ea3221 100644 --- a/ext/oci8/tests/null_byte_1.phpt +++ b/ext/oci8/tests/null_byte_1.phpt @@ -35,9 +35,9 @@ var_dump($r); --EXPECTF-- Test 1: Import -Warning: OCI-Lob::savefile() expects argument #1 ($function) to be a valid path, string given in %snull_byte_1.php on line %d +Warning: OCI-Lob::savefile(): Argument #1 ($function) must be a valid path, string given in %snull_byte_1.php on line %d NULL Test 2: Export -Warning: OCI-Lob::export() expects argument #1 ($function) to be a valid path, string given in %snull_byte_1.php on line %d +Warning: OCI-Lob::export(): Argument #1 ($function) must be a valid path, string given in %snull_byte_1.php on line %d NULL diff --git a/ext/oci8/tests/privileged_connect.phpt b/ext/oci8/tests/privileged_connect.phpt index ca785aa3618a2..26955d4b1729c 100644 --- a/ext/oci8/tests/privileged_connect.phpt +++ b/ext/oci8/tests/privileged_connect.phpt @@ -21,5 +21,5 @@ Warning: oci_connect(): Privileged connect is disabled. Enable oci8.privileged_c Warning: oci_connect(): Invalid session mode specified (-1) in %s on line %d -Warning: oci_connect() expects argument #5 to be of type int%s string given in %s on line %d +Warning: oci_connect(): Argument #5 must be of type int%s string given in %s on line %d Done diff --git a/ext/oci8/tests/privileged_connect1.phpt b/ext/oci8/tests/privileged_connect1.phpt index aaa819ca921f8..8093620168fb3 100644 --- a/ext/oci8/tests/privileged_connect1.phpt +++ b/ext/oci8/tests/privileged_connect1.phpt @@ -23,5 +23,5 @@ Warning: oci_connect(): ORA-%d: %s in %s on line %d Warning: oci_connect(): Invalid session mode specified (-1) in %s on line %d -Warning: oci_connect() expects argument #5 to be of type int%s string given in %s on line %d +Warning: oci_connect(): Argument #5 must be of type int%s string given in %s on line %d Done diff --git a/ext/odbc/tests/odbc_exec_001.phpt b/ext/odbc/tests/odbc_exec_001.phpt index 195520484fbcb..b288bcd2d0e4a 100644 --- a/ext/odbc/tests/odbc_exec_001.phpt +++ b/ext/odbc/tests/odbc_exec_001.phpt @@ -28,11 +28,11 @@ odbc_exec($conn, NULL); ?> --EXPECTF-- -Warning: odbc_exec() expects argument #3 to be of type int, string given in %s on line %d +Warning: odbc_exec(): Argument #3 must be of type int, string given in %s on line %d Warning: odbc_exec(): SQL error: %s in %s on line %d -Warning: odbc_exec() expects argument #3 to be of type int, string given in %s on line %d +Warning: odbc_exec(): Argument #3 must be of type int, string given in %s on line %d Warning: odbc_exec(): SQL error: %s in %s on line %d diff --git a/ext/openssl/tests/openssl_csr_export_bacis.phpt b/ext/openssl/tests/openssl_csr_export_bacis.phpt index 714b9f7092b30..f0a258dd15557 100644 --- a/ext/openssl/tests/openssl_csr_export_bacis.phpt +++ b/ext/openssl/tests/openssl_csr_export_bacis.phpt @@ -41,6 +41,6 @@ var_dump(openssl_csr_export($csr, $output, false)); ?> --EXPECT-- bool(true) -openssl_csr_export() expects argument #1 ($csr) to be of type resource, string given +openssl_csr_export(): Argument #1 ($csr) must be of type resource, string given openssl_csr_export(): supplied resource is not a valid OpenSSL X.509 CSR resource bool(true) diff --git a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt index 907b7fd84430b..7f6347840de5c 100644 --- a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt +++ b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt @@ -76,6 +76,6 @@ sfBgVeqg0P4SWez5fHXqBNcjMdMI5f0bikcDZSIfTHS8FX+PMurLBC8UPB0YNIOl JViHkCA9x6m8RJXAFvqmgLlWlUzbDv/cRrDfjWjR -----END CERTIFICATE REQUEST----- " -openssl_csr_export_to_file() expects argument #1 ($csr) to be of type resource, string given +openssl_csr_export_to_file(): Argument #1 ($csr) must be of type resource, string given openssl_csr_export_to_file(): supplied resource is not a valid OpenSSL X.509 CSR resource bool(true) diff --git a/ext/openssl/tests/openssl_pkey_new_error.phpt b/ext/openssl/tests/openssl_pkey_new_error.phpt index 1a6235db702cc..4bed65278c767 100644 --- a/ext/openssl/tests/openssl_pkey_new_error.phpt +++ b/ext/openssl/tests/openssl_pkey_new_error.phpt @@ -28,6 +28,6 @@ try { } ?> --EXPECT-- -openssl_pkey_get_details() expects argument #1 ($key) to be of type resource, bool given -openssl_pkey_get_details() expects argument #1 ($key) to be of type resource, bool given -openssl_pkey_get_details() expects argument #1 ($key) to be of type resource, bool given +openssl_pkey_get_details(): Argument #1 ($key) must be of type resource, bool given +openssl_pkey_get_details(): Argument #1 ($key) must be of type resource, bool given +openssl_pkey_get_details(): Argument #1 ($key) must be of type resource, bool given diff --git a/ext/pcre/tests/preg_grep_error1.phpt b/ext/pcre/tests/preg_grep_error1.phpt index 5b191a72dc59a..b3450beff71a2 100644 --- a/ext/pcre/tests/preg_grep_error1.phpt +++ b/ext/pcre/tests/preg_grep_error1.phpt @@ -57,7 +57,7 @@ Warning: preg_grep(): Unknown modifier 'F' in %spreg_grep_error1.php on line %d bool(false) Arg value is Array -preg_grep() expects argument #1 ($regex) to be of type string, array given +preg_grep(): Argument #1 ($regex) must be of type string, array given Arg value is /[a-zA-Z]/ array(2) { @@ -66,5 +66,5 @@ array(2) { [2]=> string(4) "test" } -preg_grep() expects argument #1 ($regex) to be of type string, object given +preg_grep(): Argument #1 ($regex) must be of type string, object given Done diff --git a/ext/pcre/tests/preg_match_all_error1.phpt b/ext/pcre/tests/preg_match_all_error1.phpt index 3a65fca852fd8..e052327ceab97 100644 --- a/ext/pcre/tests/preg_match_all_error1.phpt +++ b/ext/pcre/tests/preg_match_all_error1.phpt @@ -62,7 +62,7 @@ bool(false) NULL Arg value is Array -preg_match_all() expects argument #1 ($pattern) to be of type string, array given +preg_match_all(): Argument #1 ($pattern) must be of type string, array given NULL Arg value is /[a-zA-Z]/ @@ -80,5 +80,5 @@ array(1) { string(1) "t" } } -preg_match_all() expects argument #1 ($pattern) to be of type string, object given +preg_match_all(): Argument #1 ($pattern) must be of type string, object given NULL diff --git a/ext/pcre/tests/preg_match_all_error2.phpt b/ext/pcre/tests/preg_match_all_error2.phpt index 98e70385c0bf9..a2254555bb5a5 100644 --- a/ext/pcre/tests/preg_match_all_error2.phpt +++ b/ext/pcre/tests/preg_match_all_error2.phpt @@ -27,7 +27,7 @@ echo "Done"; *** Testing preg_match_all() : error conditions *** Arg value is: Array -preg_match_all() expects argument #2 ($subject) to be of type string, array given +preg_match_all(): Argument #2 ($subject) must be of type string, array given NULL Arg value is: test diff --git a/ext/pcre/tests/preg_match_error1.phpt b/ext/pcre/tests/preg_match_error1.phpt index 3dbb7c2f038af..b4540bf5da159 100644 --- a/ext/pcre/tests/preg_match_error1.phpt +++ b/ext/pcre/tests/preg_match_error1.phpt @@ -56,8 +56,8 @@ Warning: preg_match(): Unknown modifier 'F' in %spreg_match_error1.php on line % bool(false) Arg value is Array -preg_match() expects argument #1 ($pattern) to be of type string, array given +preg_match(): Argument #1 ($pattern) must be of type string, array given Arg value is /[a-zA-Z]/ int(1) -preg_match() expects argument #1 ($pattern) to be of type string, object given +preg_match(): Argument #1 ($pattern) must be of type string, object given diff --git a/ext/pcre/tests/preg_match_error2.phpt b/ext/pcre/tests/preg_match_error2.phpt index bc48facc0a0bf..a03bcf4417b01 100644 --- a/ext/pcre/tests/preg_match_error2.phpt +++ b/ext/pcre/tests/preg_match_error2.phpt @@ -35,6 +35,6 @@ Arg value is: this is a string int(1) Arg value is: Array -preg_match() expects argument #2 ($subject) to be of type string, array given -preg_match() expects argument #2 ($subject) to be of type string, object given +preg_match(): Argument #2 ($subject) must be of type string, array given +preg_match(): Argument #2 ($subject) must be of type string, object given Done diff --git a/ext/pcre/tests/preg_split_error1.phpt b/ext/pcre/tests/preg_split_error1.phpt index 0ec80d99f1bc2..daf7852767027 100644 --- a/ext/pcre/tests/preg_split_error1.phpt +++ b/ext/pcre/tests/preg_split_error1.phpt @@ -56,7 +56,7 @@ Warning: preg_split(): Unknown modifier 'F' in %spreg_split_error1.php on line % bool(false) Arg value is Array -preg_split() expects argument #1 ($pattern) to be of type string, array given +preg_split(): Argument #1 ($pattern) must be of type string, array given Arg value is /[a-zA-Z]/ array(3) { @@ -67,4 +67,4 @@ array(3) { [2]=> string(4) " 5 6" } -preg_split() expects argument #1 ($pattern) to be of type string, object given +preg_split(): Argument #1 ($pattern) must be of type string, object given diff --git a/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt b/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt index b2ee84a9458fc..1b566be3e3b83 100644 --- a/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt +++ b/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt @@ -47,7 +47,7 @@ SQL if (false !== ($tmp = @$stmt->getColumnMeta(-1))) printf("[004] Expecting false got %s\n", var_export($tmp, true)); - // Warning: PDOStatement::getColumnMeta() expects argument #1 to be of type int, array given in + // Warning: PDOStatement::getColumnMeta(): Argument #1 must be of type int, array given in if (false !== ($tmp = @$stmt->getColumnMeta(array()))) printf("[005] Expecting false got %s\n", var_export($tmp, true)); diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt index e086e89c2866d..f2aee2082871a 100644 --- a/ext/phar/tests/badparameters.phpt +++ b/ext/phar/tests/badparameters.phpt @@ -228,40 +228,40 @@ try { } ?> --EXPECTF-- -Phar::mungServer() expects argument #1 ($munglist) to be of type array, string given -Phar::createDefaultStub() expects argument #1 ($index) to be a valid path, array given -Phar::loadPhar() expects argument #1 ($filename) to be a valid path, array given -Phar::canCompress() expects argument #1 ($method) to be of type int, string given -Phar::__construct() expects argument #1 ($filename) to be a valid path, array given -Phar::convertToExecutable() expects argument #1 ($format) to be of type int, array given -Phar::convertToData() expects argument #1 ($format) to be of type int, array given -PharData::delete() expects argument #1 ($entry) to be a valid path, array given +Phar::mungServer(): Argument #1 ($munglist) must be of type array, string given +Phar::createDefaultStub(): Argument #1 ($index) must be a valid path, array given +Phar::loadPhar(): Argument #1 ($filename) must be a valid path, array given +Phar::canCompress(): Argument #1 ($method) must be of type int, string given +Phar::__construct(): Argument #1 ($filename) must be a valid path, array given +Phar::convertToExecutable(): Argument #1 ($format) must be of type int, array given +Phar::convertToData(): Argument #1 ($format) must be of type int, array given +PharData::delete(): Argument #1 ($entry) must be a valid path, array given Cannot write out phar archive, phar is read-only Entry oops does not exist and cannot be deleted %sfrontcontroller10.phar Cannot write out phar archive, phar is read-only A Phar alias cannot be set in a plain tar archive -Phar::setAlias() expects argument #1 ($alias) to be of type string, array given +Phar::setAlias(): Argument #1 ($alias) must be of type string, array given Cannot change stub, phar is read-only A Phar stub cannot be set in a plain tar archive -Phar::setStub() expects argument #1 ($newstub) to be of type string, array given +Phar::setStub(): Argument #1 ($newstub) must be of type string, array given A Phar stub cannot be set in a plain tar archive -Phar::setDefaultStub() expects argument #1 ($index) to be of type string, array given +Phar::setDefaultStub(): Argument #1 ($index) must be of type string, array given Cannot change stub: phar.readonly=1 Cannot set signature algorithm, phar is read-only -Phar::compress() expects argument #1 ($compression_type) to be of type int, array given +Phar::compress(): Argument #1 ($compression_type) must be of type int, array given Cannot compress phar archive, phar is read-only -Phar::compressFiles() expects argument #1 ($compression_type) to be of type int, array given +Phar::compressFiles(): Argument #1 ($compression_type) must be of type int, array given Phar is readonly, cannot change compression Phar::copy() expects exactly 2 parameters, 1 given Cannot copy "a" to "b", phar is read-only -Phar::offsetExists() expects argument #1 ($entry) to be a valid path, array given -Phar::offsetGet() expects argument #1 ($entry) to be a valid path, array given +Phar::offsetExists(): Argument #1 ($entry) must be a valid path, array given +Phar::offsetGet(): Argument #1 ($entry) must be a valid path, array given Phar::offsetSet() expects exactly 2 parameters, 1 given -PharData::offsetUnset() expects argument #1 ($entry) to be a valid path, array given +PharData::offsetUnset(): Argument #1 ($entry) must be a valid path, array given Write operations disabled by the php.ini setting phar.readonly -Phar::addEmptyDir() expects argument #1 ($dirname) to be a valid path, array given -Phar::addFile() expects argument #1 ($filename) to be a valid path, array given +Phar::addEmptyDir(): Argument #1 ($dirname) must be a valid path, array given +Phar::addFile(): Argument #1 ($filename) must be a valid path, array given Phar::addFromString() expects exactly 2 parameters, 1 given Write operations disabled by the php.ini setting phar.readonly Phar::setMetadata() expects exactly 1 parameter, 2 given diff --git a/ext/phar/tests/bug64931/bug64931.phpt b/ext/phar/tests/bug64931/bug64931.phpt index 8c25692c3f4bb..2b4b17051ea28 100644 --- a/ext/phar/tests/bug64931/bug64931.phpt +++ b/ext/phar/tests/bug64931/bug64931.phpt @@ -53,4 +53,4 @@ CAUGHT: Cannot create any files in magic ".phar" directory CAUGHT: Cannot create any files in magic ".phar" directory CAUGHT: Cannot create any files in magic ".phar" directory CAUGHT: Cannot create any files in magic ".phar" directory -CAUGHT: Phar::addFromString() expects argument #1 ($localname) to be a valid path, string given +CAUGHT: Phar::addFromString(): Argument #1 ($localname) must be a valid path, string given diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt index 458ec8b6f51e2..ce0b8a59a2f3c 100644 --- a/ext/phar/tests/create_path_error.phpt +++ b/ext/phar/tests/create_path_error.phpt @@ -78,4 +78,4 @@ string(5) "query" 11:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character 12:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character 13:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character -Exception: Phar::offsetSet() expects argument #1 ($entry) to be a valid path, string given +Exception: Phar::offsetSet(): Argument #1 ($entry) must be a valid path, string given diff --git a/ext/phar/tests/fgc_edgecases.phpt b/ext/phar/tests/fgc_edgecases.phpt index 861933ba4e7a6..8f4b40c72b19b 100644 --- a/ext/phar/tests/fgc_edgecases.phpt +++ b/ext/phar/tests/fgc_edgecases.phpt @@ -49,7 +49,7 @@ include $pname . '/foo/hi'; --EXPECTF-- -file_get_contents() expects argument #1 ($filename) to be a valid path, array given +file_get_contents(): Argument #1 ($filename) must be a valid path, array given blah --EXPECTF-- -fopen() expects argument #1 ($filename) to be a valid path, array given +fopen(): Argument #1 ($filename) must be a valid path, array given blah test diff --git a/ext/phar/tests/opendir_edgecases.phpt b/ext/phar/tests/opendir_edgecases.phpt index 59deca53c8fce..14f7f5dae0cdb 100644 --- a/ext/phar/tests/opendir_edgecases.phpt +++ b/ext/phar/tests/opendir_edgecases.phpt @@ -55,7 +55,7 @@ include $pname . '/foo'; --EXPECTF-- -SplFileInfo::setFileClass() expects argument #1 ($class_name) to be a class name derived from SplFileObject, 'SplFileInfo' given +SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, 'SplFileInfo' given MyFile::__construct(phar://%s/a.php) a.php MyFile::__construct(phar://%s/b/c.php) diff --git a/ext/phar/tests/phar_unlinkarchive.phpt b/ext/phar/tests/phar_unlinkarchive.phpt index 70b251257d11e..5dc55ce487265 100644 --- a/ext/phar/tests/phar_unlinkarchive.phpt +++ b/ext/phar/tests/phar_unlinkarchive.phpt @@ -92,7 +92,7 @@ __HALT_COMPILER(); Unknown phar archive "" Unknown phar archive "%sphar_unlinkarchive.phar" Unknown phar archive "%sphar_unlinkarchive.phar.tar": internal corruption of phar "%sphar_unlinkarchive.phar.tar" (truncated entry) -Phar::unlinkArchive() expects argument #1 ($archive) to be a valid path, array given +Phar::unlinkArchive(): Argument #1 ($archive) must be a valid path, array given bool(false) string(48) "" phar archive "%sphar_unlinkarchive.phar" has open file handles or objects. fclose() all file handles, and unset() all objects prior to calling unlinkArchive() diff --git a/ext/phar/tests/pharfileinfo_construct.phpt b/ext/phar/tests/pharfileinfo_construct.phpt index 5ac63d82f59d9..5f22264423257 100644 --- a/ext/phar/tests/pharfileinfo_construct.phpt +++ b/ext/phar/tests/pharfileinfo_construct.phpt @@ -49,7 +49,7 @@ echo $e->getMessage() . "\n"; --EXPECTF-- Cannot open phar file 'phar://%spharfileinfo_construct.phar/oops': internal corruption of phar "%spharfileinfo_construct.phar" (truncated entry) -PharFileInfo::__construct() expects argument #1 ($filename) to be a valid path, array given +PharFileInfo::__construct(): Argument #1 ($filename) must be a valid path, array given Cannot access phar file entry '%s' in archive '%s' Cannot call constructor twice '%s' is not a valid phar archive URL (must have at least phar://filename.phar) diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt index 721ad337ccdc8..e48d43587e520 100644 --- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt @@ -62,5 +62,5 @@ Method does not exist Method 1 does not exist Method 1.5 does not exist Method 1 does not exist -ReflectionClass::getMethod() expects argument #1 ($name) to be of type string, array given -ReflectionClass::getMethod() expects argument #1 ($name) to be of type string, object given +ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, array given +ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, object given diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt index dd3b5f33a2bb2..86060c8acf119 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt @@ -60,5 +60,5 @@ Property does not exist Property 1 does not exist Property 1.5 does not exist Property 1 does not exist -ReflectionClass::getProperty() expects argument #1 ($name) to be of type string, array given -ReflectionClass::getProperty() expects argument #1 ($name) to be of type string, object given +ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, array given +ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, object given diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt index 2cdbcebefb3a3..e034e082158ea 100644 --- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt @@ -43,4 +43,4 @@ ReflectionClass::getStaticPropertyValue() expects at most 2 parameters, 3 given ReflectionClass::getStaticPropertyValue() expects at least 1 parameter, 0 given Class C does not have a property named string(3) "def" -ReflectionClass::getStaticPropertyValue() expects argument #1 ($name) to be of type string, array given +ReflectionClass::getStaticPropertyValue(): Argument #1 ($name) must be of type string, array given diff --git a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt index 1805607e192fc..e7256ea2cbc79 100644 --- a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt +++ b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt @@ -16,7 +16,7 @@ var_dump($a); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: ReflectionClass::newInstanceArgs() expects argument #1 ($args) to be of type array, string given in %s:%d +Fatal error: Uncaught TypeError: ReflectionClass::newInstanceArgs(): Argument #1 ($args) must be of type array, string given in %s:%d Stack trace: #0 %s(%d): ReflectionClass->newInstanceArgs('x') #1 {main} diff --git a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt index 87cb894ea8aca..b9bb76c786e01 100644 --- a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt +++ b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt @@ -49,4 +49,4 @@ ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 0 given ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 1 given Class C does not have a property named Class C does not have a property named 1.5 -ReflectionClass::setStaticPropertyValue() expects argument #1 ($name) to be of type string, array given +ReflectionClass::setStaticPropertyValue(): Argument #1 ($name) must be of type string, array given diff --git a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt index 1047c927dc99f..ccf2414e43e8e 100644 --- a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt +++ b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt @@ -28,4 +28,4 @@ try { --EXPECTF-- Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given -Ok - ReflectionExtension::__construct() expects argument #1 ($name) to be of type string, array given +Ok - ReflectionExtension::__construct(): Argument #1 ($name) must be of type string, array given diff --git a/ext/reflection/tests/ReflectionFunction_construct.001.phpt b/ext/reflection/tests/ReflectionFunction_construct.001.phpt index dbd829252b1d9..1772ba5b68184 100644 --- a/ext/reflection/tests/ReflectionFunction_construct.001.phpt +++ b/ext/reflection/tests/ReflectionFunction_construct.001.phpt @@ -35,8 +35,8 @@ try { ?> --EXPECT-- -Ok - ReflectionFunction::__construct() expects argument #1 ($name) to be of type string, array given +Ok - ReflectionFunction::__construct(): Argument #1 ($name) must be of type string, array given Function nonExistentFunction() does not exist Ok - ReflectionFunction::__construct() expects exactly 1 parameter, 0 given Ok - ReflectionFunction::__construct() expects exactly 1 parameter, 2 given -Ok - ReflectionFunction::__construct() expects argument #1 ($name) to be of type string, array given +Ok - ReflectionFunction::__construct(): Argument #1 ($name) must be of type string, array given diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt index 0d585d2a73bc7..869682ccdd451 100644 --- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt +++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt @@ -24,4 +24,4 @@ try { ?> --EXPECT-- -string(90) "ReflectionMethod::invokeArgs() expects argument #2 ($args) to be of type array, bool given" +string(85) "ReflectionMethod::invokeArgs(): Argument #2 ($args) must be of type array, bool given" diff --git a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt index 3dc0ed626e4ce..5ff9d2e50df3a 100644 --- a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt @@ -103,7 +103,7 @@ NULL Static method: ReflectionMethod::invoke() expects at least 1 parameter, 0 given -ReflectionMethod::invoke() expects argument #1 ($object) to be of type object, bool given +ReflectionMethod::invoke(): Argument #1 ($object) must be of type object, bool given Called staticMethod() Exception: Using $this when not in object context NULL diff --git a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt index 8788370b2fe16..2b50fa81318e3 100644 --- a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt +++ b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt @@ -59,7 +59,7 @@ try { ?> --EXPECT-- invoke() on a non-object: -string(89) "ReflectionMethod::invoke() expects argument #1 ($object) to be of type object, bool given" +string(84) "ReflectionMethod::invoke(): Argument #1 ($object) must be of type object, bool given" invoke() on a non-instance: string(72) "Given object is not an instance of the class this method was declared in" diff --git a/ext/reflection/tests/ReflectionReference_errors.phpt b/ext/reflection/tests/ReflectionReference_errors.phpt index e70348cba1ba4..33154ba22ee5d 100644 --- a/ext/reflection/tests/ReflectionReference_errors.phpt +++ b/ext/reflection/tests/ReflectionReference_errors.phpt @@ -41,7 +41,7 @@ var_dump(unserialize('O:19:"ReflectionReference":0:{}')); ?> --EXPECTF-- Call to private ReflectionReference::__construct() from invalid context -ReflectionReference::fromArrayElement() expects argument #1 ($array) to be of type array, object given +ReflectionReference::fromArrayElement(): Argument #1 ($array) must be of type array, object given Key must be array or string Array key not found Serialization of 'ReflectionReference' is not allowed diff --git a/ext/reflection/tests/bug42976.phpt b/ext/reflection/tests/bug42976.phpt index 014d0d0321508..5e5c3c5be5db9 100644 --- a/ext/reflection/tests/bug42976.phpt +++ b/ext/reflection/tests/bug42976.phpt @@ -26,9 +26,9 @@ echo "Done\n"; --EXPECTF-- string(9) "x.changed" -Warning: C::__construct() expects argument #1 ($x) to be passed by reference, value given in %s on line %d +Warning: C::__construct(): Argument #1 ($x) must be passed by reference, value given in %s on line %d string(10) "x.original" -Warning: C::__construct() expects argument #1 ($x) to be passed by reference, value given in %s on line %d +Warning: C::__construct(): Argument #1 ($x) must be passed by reference, value given in %s on line %d string(10) "x.original" Done diff --git a/ext/reflection/tests/request38992.phpt b/ext/reflection/tests/request38992.phpt index 0266cee430f37..b7cd212551b84 100644 --- a/ext/reflection/tests/request38992.phpt +++ b/ext/reflection/tests/request38992.phpt @@ -23,5 +23,5 @@ try { } ?> --EXPECT-- -ReflectionMethod::invoke() expects argument #1 ($object) to be of type object, string given -ReflectionMethod::invokeArgs() expects argument #1 ($object) to be of type object, string given +ReflectionMethod::invoke(): Argument #1 ($object) must be of type object, string given +ReflectionMethod::invokeArgs(): Argument #1 ($object) must be of type object, string given diff --git a/ext/session/tests/session_set_save_handler_iface_002.phpt b/ext/session/tests/session_set_save_handler_iface_002.phpt index 269005565d911..6c1184995678c 100644 --- a/ext/session/tests/session_set_save_handler_iface_002.phpt +++ b/ext/session/tests/session_set_save_handler_iface_002.phpt @@ -86,5 +86,5 @@ session_start(); --EXPECT-- *** Testing session_set_save_handler() function: interface wrong *** bool(true) -session_set_save_handler() expects argument #1 ($open) to be of type SessionHandlerInterface, object given +session_set_save_handler(): Argument #1 ($open) must be of type SessionHandlerInterface, object given good handler writing diff --git a/ext/snmp/tests/snmp-object-error.phpt b/ext/snmp/tests/snmp-object-error.phpt index c7adf8f25cc0f..20901ce702365 100644 --- a/ext/snmp/tests/snmp-object-error.phpt +++ b/ext/snmp/tests/snmp-object-error.phpt @@ -70,8 +70,8 @@ var_dump($session->max_oids); ?> --EXPECTF-- SNMP::__construct() expects at least 3 parameters, 2 given -SNMP::__construct() expects argument #4 to be of type int, string given -SNMP::__construct() expects argument #5 to be of type int, string given +SNMP::__construct(): Argument #4 must be of type int, string given +SNMP::__construct(): Argument #5 must be of type int, string given Unknown SNMP protocol version Exception handling diff --git a/ext/soap/tests/bug77088.phpt b/ext/soap/tests/bug77088.phpt index ed2bea1465417..46d2e1d987074 100644 --- a/ext/soap/tests/bug77088.phpt +++ b/ext/soap/tests/bug77088.phpt @@ -21,7 +21,7 @@ catch(TypeError $e) --EXPECTF-- object(TypeError)#%d (%d) { ["message":protected]=> - string(%d) "SoapClient::__construct() expects argument #2 ($options) to be of type array, null given" + string(%d) "SoapClient::__construct(): Argument #2 ($options) must be of type array, null given" ["string":"Error":private]=> string(0) "" ["code":protected]=> diff --git a/ext/sodium/tests/sodium_error_001.phpt b/ext/sodium/tests/sodium_error_001.phpt index b5b19b1d12941..5ebcb8e80ef1a 100644 --- a/ext/sodium/tests/sodium_error_001.phpt +++ b/ext/sodium/tests/sodium_error_001.phpt @@ -15,7 +15,7 @@ $key = random_bytes(SODIUM_CRYPTO_SHORTHASH_KEYBYTES); $hash = do_crypto_shorthash($m, $key); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: sodium_crypto_shorthash() expects argument #1 ($string) to be of type string, int given in %s:%d +Fatal error: Uncaught TypeError: sodium_crypto_shorthash(): Argument #1 ($string) must be of type string, int given in %s:%d Stack trace: #0 %s(%d): sodium_crypto_shorthash() #1 %s(%d): do_crypto_shorthash() diff --git a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt index e1d37ecce59de..11529cfee0eb2 100644 --- a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt +++ b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt @@ -43,6 +43,6 @@ try { --EXPECT-- CallbackFilterIterator::__construct() expects exactly 2 parameters, 0 given CallbackFilterIterator::__construct() expects exactly 2 parameters, 1 given -CallbackFilterIterator::__construct() expects argument #2 ($callback) to be a valid callback, no array or string given -CallbackFilterIterator::__construct() expects argument #2 ($callback) to be a valid callback, array must have exactly two members +CallbackFilterIterator::__construct(): Argument #2 ($callback) must be a valid callback, no array or string given +CallbackFilterIterator::__construct(): Argument #2 ($callback) must be a valid callback, array must have exactly two members some message diff --git a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt index b8aea64ea2f26..c1b373cebe25f 100644 --- a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt +++ b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -SplFileInfo::setFileClass() expects argument #1 ($class_name) to be a class name derived from SplFileObject, 'stdClass' given +SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, 'stdClass' given diff --git a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt index b0a358a9b3bff..f9ef81aeeb4d7 100644 --- a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt +++ b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -SplFileInfo::setInfoClass() expects argument #1 ($class_name) to be a class name derived from SplFileInfo, 'stdClass' given +SplFileInfo::setInfoClass(): Argument #1 ($class_name) must be a class name derived from SplFileInfo, 'stdClass' given diff --git a/ext/spl/tests/SplFixedArray__construct_param_array.phpt b/ext/spl/tests/SplFixedArray__construct_param_array.phpt index f4fb329989abb..76f32855b2a2e 100644 --- a/ext/spl/tests/SplFixedArray__construct_param_array.phpt +++ b/ext/spl/tests/SplFixedArray__construct_param_array.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, array given +Ok - SplFixedArray::__construct(): Argument #1 ($size) must be of type int, array given diff --git a/ext/spl/tests/SplFixedArray__construct_param_string.phpt b/ext/spl/tests/SplFixedArray__construct_param_string.phpt index 240631cc88b2d..1c9a681e82a15 100644 --- a/ext/spl/tests/SplFixedArray__construct_param_string.phpt +++ b/ext/spl/tests/SplFixedArray__construct_param_string.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given +Ok - SplFixedArray::__construct(): Argument #1 ($size) must be of type int, string given diff --git a/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt index cfb0ca79a995c..12e632514e2b4 100644 --- a/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt +++ b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt @@ -12,4 +12,4 @@ try { ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, object given +Ok - SplFixedArray::__construct(): Argument #1 ($size) must be of type int, object given diff --git a/ext/spl/tests/SplTempFileObject_constructor_error.phpt b/ext/spl/tests/SplTempFileObject_constructor_error.phpt index aaf2738915779..855479c54afa4 100644 --- a/ext/spl/tests/SplTempFileObject_constructor_error.phpt +++ b/ext/spl/tests/SplTempFileObject_constructor_error.phpt @@ -9,4 +9,4 @@ try { } ?> --EXPECT-- -SplTempFileObject::__construct() expects argument #1 ($max_memory) to be of type int, string given +SplTempFileObject::__construct(): Argument #1 ($max_memory) must be of type int, string given diff --git a/ext/spl/tests/arrayObject___construct_error1.phpt b/ext/spl/tests/arrayObject___construct_error1.phpt index b7700e4e315ac..3ac214260ac9e 100644 --- a/ext/spl/tests/arrayObject___construct_error1.phpt +++ b/ext/spl/tests/arrayObject___construct_error1.phpt @@ -20,6 +20,6 @@ try { ?> --EXPECT-- Bad iterator type: -ArrayObject::__construct() expects argument #3 ($iterator_class) to be a class name derived from Iterator, 'Exception' given(6) +ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'Exception' given(6) Non-existent class: -ArrayObject::__construct() expects argument #3 ($iterator_class) to be a class name derived from Iterator, 'nonExistentClassName' given(13) +ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'nonExistentClassName' given(13) diff --git a/ext/spl/tests/arrayObject_asort_basic1.phpt b/ext/spl/tests/arrayObject_asort_basic1.phpt index db751c6fbacb5..042e317273203 100644 --- a/ext/spl/tests/arrayObject_asort_basic1.phpt +++ b/ext/spl/tests/arrayObject_asort_basic1.phpt @@ -38,7 +38,7 @@ object(ArrayObject)#%d (1) { int(4) } } -asort() expects argument #2 ($sort_flags) to be of type int, string given +asort(): Argument #2 ($sort_flags) must be of type int, string given object(ArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(3) { diff --git a/ext/spl/tests/arrayObject_ksort_basic1.phpt b/ext/spl/tests/arrayObject_ksort_basic1.phpt index 6e20013177882..892e392b8becc 100644 --- a/ext/spl/tests/arrayObject_ksort_basic1.phpt +++ b/ext/spl/tests/arrayObject_ksort_basic1.phpt @@ -37,7 +37,7 @@ object(ArrayObject)#%d (1) { int(3) } } -ksort() expects argument #2 ($sort_flags) to be of type int, string given +ksort(): Argument #2 ($sort_flags) must be of type int, string given object(ArrayObject)#2 (1) { ["storage":"ArrayObject":private]=> array(4) { diff --git a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt index a80c8cbb0ddd4..918dcbee960ca 100644 --- a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt +++ b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt @@ -43,7 +43,7 @@ try { ?> --EXPECT-- -string(135) "ArrayObject::setIteratorClass() expects argument #1 ($iteratorClass) to be a class name derived from Iterator, 'nonExistentClass' given" -string(127) "ArrayObject::setIteratorClass() expects argument #1 ($iteratorClass) to be a class name derived from Iterator, 'stdClass' given" -string(131) "ArrayObject::__construct() expects argument #3 ($iterator_class) to be a class name derived from Iterator, 'nonExistentClass' given" -string(123) "ArrayObject::__construct() expects argument #3 ($iterator_class) to be a class name derived from Iterator, 'stdClass' given" +string(130) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, 'nonExistentClass' given" +string(122) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, 'stdClass' given" +string(126) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'nonExistentClass' given" +string(118) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'stdClass' given" diff --git a/ext/spl/tests/bug54291.phpt b/ext/spl/tests/bug54291.phpt index e48f80fe00c61..2521c50223eea 100644 --- a/ext/spl/tests/bug54291.phpt +++ b/ext/spl/tests/bug54291.phpt @@ -5,7 +5,7 @@ Bug #54291 (Crash iterating DirectoryIterator for dir name starting with \0) $dir = new DirectoryIterator("\x00/abc"); $dir->isFile(); --EXPECTF-- -Fatal error: Uncaught TypeError: DirectoryIterator::__construct() expects argument #1 ($path) to be a valid path, string given in %s:%d +Fatal error: Uncaught TypeError: DirectoryIterator::__construct(): Argument #1 ($path) must be a valid path, string given in %s:%d Stack trace: #0 %s(%d): DirectoryIterator->__construct('\x00/abc') #1 {main} diff --git a/ext/spl/tests/bug54292.phpt b/ext/spl/tests/bug54292.phpt index 9355ef440827b..27bd706ad8225 100644 --- a/ext/spl/tests/bug54292.phpt +++ b/ext/spl/tests/bug54292.phpt @@ -11,4 +11,4 @@ try { ?> --EXPECT-- -string(95) "SplFileObject::__construct() expects argument #2 ($open_mode) to be of type string, array given" +string(90) "SplFileObject::__construct(): Argument #2 ($open_mode) must be of type string, array given" diff --git a/ext/spl/tests/bug77431.phpt b/ext/spl/tests/bug77431.phpt index 20545fb141017..75d5c2d600da4 100644 --- a/ext/spl/tests/bug77431.phpt +++ b/ext/spl/tests/bug77431.phpt @@ -5,5 +5,8 @@ Bug #77431 (SplFileInfo::__construct() accepts NUL bytes) new SplFileInfo("bad\0good"); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: SplFileInfo::__construct() expects argument #1 ($file_name) to be a valid path, string given in %s:%d -Stack trace:%A +Fatal error: Uncaught TypeError: SplFileInfo::__construct(): Argument #1 ($file_name) must be a valid path, string given in %s:%d +Stack trace: +#0 %s(%d): SplFileInfo->__construct('bad\x00good') +#1 {main} + thrown in %s on line %d diff --git a/ext/spl/tests/bug78863.phpt b/ext/spl/tests/bug78863.phpt index 4db36c202e512..ad18f49689fee 100644 --- a/ext/spl/tests/bug78863.phpt +++ b/ext/spl/tests/bug78863.phpt @@ -16,7 +16,7 @@ foreach ($it as $fileinfo) { } ?> --EXPECTF-- -Fatal error: Uncaught TypeError: DirectoryIterator::__construct() expects argument #1 ($path) to be a valid path, string given in %s:%d +Fatal error: Uncaught TypeError: DirectoryIterator::__construct(): Argument #1 ($path) must be a valid path, string given in %s:%d Stack trace: #0 %s(%d): DirectoryIterator->__construct('%s') #1 {main} diff --git a/ext/spl/tests/fixedarray_005.phpt b/ext/spl/tests/fixedarray_005.phpt index 80fffd1566610..573a995cb1fcd 100644 --- a/ext/spl/tests/fixedarray_005.phpt +++ b/ext/spl/tests/fixedarray_005.phpt @@ -23,6 +23,6 @@ try { ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, object given -Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given -Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given +Ok - SplFixedArray::__construct(): Argument #1 ($size) must be of type int, object given +Ok - SplFixedArray::__construct(): Argument #1 ($size) must be of type int, string given +Ok - SplFixedArray::__construct(): Argument #1 ($size) must be of type int, string given diff --git a/ext/spl/tests/fixedarray_009.phpt b/ext/spl/tests/fixedarray_009.phpt index 6dc6e4cbca5bf..9cc684ce03648 100644 --- a/ext/spl/tests/fixedarray_009.phpt +++ b/ext/spl/tests/fixedarray_009.phpt @@ -10,4 +10,4 @@ try { } ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given +Ok - SplFixedArray::__construct(): Argument #1 ($size) must be of type int, string given diff --git a/ext/spl/tests/fixedarray_015.phpt b/ext/spl/tests/fixedarray_015.phpt index 74814268e7799..1936cc962b9ad 100644 --- a/ext/spl/tests/fixedarray_015.phpt +++ b/ext/spl/tests/fixedarray_015.phpt @@ -12,5 +12,5 @@ try { echo "Done\n"; ?> --EXPECT-- -Ok - SplFixedArray::__construct() expects argument #1 ($size) to be of type int, string given +Ok - SplFixedArray::__construct(): Argument #1 ($size) must be of type int, string given Done diff --git a/ext/spl/tests/iterator_042.phpt b/ext/spl/tests/iterator_042.phpt index f768e4707732f..4ede8afa59824 100644 --- a/ext/spl/tests/iterator_042.phpt +++ b/ext/spl/tests/iterator_042.phpt @@ -39,7 +39,7 @@ foreach($it as $k => $v) ?> --EXPECTF-- -Error AppendIterator::append() expects argument #1 ($iterator) to be of type Iterator, array given in %s on line %d +Error AppendIterator::append(): Argument #1 ($iterator) must be of type Iterator, array given in %s on line %d object(ArrayIterator)#%d (1) { %s"storage"%s"ArrayIterator":private]=> array(2) { diff --git a/ext/spl/tests/iterator_044.phpt b/ext/spl/tests/iterator_044.phpt index c62abb5c1a111..21ab075cc92d0 100644 --- a/ext/spl/tests/iterator_044.phpt +++ b/ext/spl/tests/iterator_044.phpt @@ -83,8 +83,8 @@ NULL ===1=== object(stdClass)#%d (0) { } -CachingIterator::offsetExists() expects argument #1 ($index) to be of type string, object given -CachingIterator::offsetGet() expects argument #1 ($index) to be of type string, object given +CachingIterator::offsetExists(): Argument #1 ($index) must be of type string, object given +CachingIterator::offsetGet(): Argument #1 ($index) must be of type string, object given ===2=== object(MyFoo)#%d (0) { } @@ -124,8 +124,8 @@ int(0) ===1=== object(stdClass)#1 (0) { } -CachingIterator::offsetExists() expects argument #1 ($index) to be of type string, object given -CachingIterator::offsetGet() expects argument #1 ($index) to be of type string, object given +CachingIterator::offsetExists(): Argument #1 ($index) must be of type string, object given +CachingIterator::offsetGet(): Argument #1 ($index) must be of type string, object given ===2=== object(MyFoo)#2 (0) { } diff --git a/ext/spl/tests/iterator_count.phpt b/ext/spl/tests/iterator_count.phpt index 3071f9b06cb8b..62f9ee8334406 100644 --- a/ext/spl/tests/iterator_count.phpt +++ b/ext/spl/tests/iterator_count.phpt @@ -13,7 +13,7 @@ iterator_count('1'); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: iterator_count() expects argument #1 ($iterator) to be of type Traversable, string given in %s:%d +Fatal error: Uncaught TypeError: iterator_count(): Argument #1 ($iterator) must be of type Traversable, string given in %s:%d Stack trace: #0 %s(%d): iterator_count('1') #1 {main} diff --git a/ext/spl/tests/iterator_to_array.phpt b/ext/spl/tests/iterator_to_array.phpt index 09dcf5d02fb18..a754c9da6fbe4 100644 --- a/ext/spl/tests/iterator_to_array.phpt +++ b/ext/spl/tests/iterator_to_array.phpt @@ -13,7 +13,7 @@ iterator_to_array('test','test'); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: iterator_to_array() expects argument #1 ($iterator) to be of type Traversable, string given in %s:%d +Fatal error: Uncaught TypeError: iterator_to_array(): Argument #1 ($iterator) must be of type Traversable, string given in %s:%d Stack trace: #0 %s(%d): iterator_to_array('test', 'test') #1 {main} diff --git a/ext/spl/tests/recursive_tree_iterator_003.phpt b/ext/spl/tests/recursive_tree_iterator_003.phpt index 0f4fed97b398c..39a94ba8d32c8 100644 --- a/ext/spl/tests/recursive_tree_iterator_003.phpt +++ b/ext/spl/tests/recursive_tree_iterator_003.phpt @@ -9,4 +9,4 @@ try { } ?> --EXPECT-- -RecursiveCachingIterator::__construct() expects argument #1 ($iterator) to be of type RecursiveIterator, object given +RecursiveCachingIterator::__construct(): Argument #1 ($iterator) must be of type RecursiveIterator, object given diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt index 0b628d3ee1d57..0aca8398e6a53 100644 --- a/ext/spl/tests/spl_004.phpt +++ b/ext/spl/tests/spl_004.phpt @@ -84,6 +84,6 @@ int(5) int(6) int(4) ===ERRORS=== -iterator_apply() expects argument #3 ($args) to be of type array, int given -iterator_apply() expects argument #2 ($function) to be a valid callback, function 'non_existing_function' not found or invalid function name +iterator_apply(): Argument #3 ($args) must be of type array, int given +iterator_apply(): Argument #2 ($function) must be a valid callback, function 'non_existing_function' not found or invalid function name iterator_apply() expects at most 3 parameters, 4 given diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index c391cef48a388..5aad3d990a824 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -353,7 +353,7 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */ option = PHP_STREAM_META_GROUP_NAME; value = Z_STRVAL_P(group); } else { - zend_type_error("chgrp() expects argument #2 ($group) to be of type string|int, %s given", zend_zval_type_name(group)); + zend_type_error("chgrp(): Argument #2 ($group) must be of type string|int, %s given", zend_zval_type_name(group)); RETURN_THROWS(); } if(wrapper->wops->stream_metadata(wrapper, filename, option, value, NULL)) { @@ -382,7 +382,7 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */ RETURN_FALSE; } } else { - zend_type_error("chgrp() expects argument #2 ($group) to be of type string|int, %s given", zend_zval_type_name(group)); + zend_type_error("chgrp(): Argument #2 ($group) must be of type string|int, %s given", zend_zval_type_name(group)); RETURN_THROWS(); } diff --git a/ext/standard/string.c b/ext/standard/string.c index bd68a6c08b10a..ec397fe97c216 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1276,7 +1276,7 @@ PHP_FUNCTION(implode) if (pieces == NULL) { if (arg1_array == NULL) { - zend_type_error("%s() expects argument #1 ($pieces) to be of type array, string given", get_active_function_name()); + zend_type_error("%s(): Argument #1 ($pieces) must be of type array, string given", get_active_function_name()); RETURN_THROWS(); } @@ -1284,7 +1284,7 @@ PHP_FUNCTION(implode) pieces = arg1_array; } else { if (arg1_str == NULL) { - zend_type_error("%s() expects argument #1 ($glue) to be of type string, array given", get_active_function_name()); + zend_type_error("%s(): Argument #1 ($glue) must be of type string, array given", get_active_function_name()); RETURN_THROWS(); } } diff --git a/ext/standard/tests/array/array_change_key_case_variation.phpt b/ext/standard/tests/array/array_change_key_case_variation.phpt index e8b8fe174d8c4..c221a3f34101a 100644 --- a/ext/standard/tests/array/array_change_key_case_variation.phpt +++ b/ext/standard/tests/array/array_change_key_case_variation.phpt @@ -24,7 +24,7 @@ var_dump( array_change_key_case( array("ONE" => 1, "one" => 1, "One" => 2), 5 ) echo "end\n"; ?> --EXPECT-- -array_change_key_case() expects argument #2 ($case) to be of type int, string given +array_change_key_case(): Argument #2 ($case) must be of type int, string given array(4) { ["ONE"]=> int(1) diff --git a/ext/standard/tests/array/array_diff_uassoc_error.phpt b/ext/standard/tests/array/array_diff_uassoc_error.phpt index 7cd0c1a1fa713..afc72f777a959 100644 --- a/ext/standard/tests/array/array_diff_uassoc_error.phpt +++ b/ext/standard/tests/array/array_diff_uassoc_error.phpt @@ -51,8 +51,8 @@ try { *** Testing array_diff_uassoc() : error conditions *** -- Testing array_diff_uassoc() function with more than expected no. of arguments -- -array_diff_uassoc() expects argument #4 to be a valid callback, array must have exactly two members -array_diff_uassoc() expects argument #6 to be a valid callback, array must have exactly two members +array_diff_uassoc(): Argument #4 must be a valid callback, array must have exactly two members +array_diff_uassoc(): Argument #6 must be a valid callback, array must have exactly two members -- Testing array_diff_uassoc() function with less than expected no. of arguments -- At least 3 parameters are required, 2 given diff --git a/ext/standard/tests/array/array_diff_ukey_variation10.phpt b/ext/standard/tests/array/array_diff_ukey_variation10.phpt index a3be16c21c772..94ae1bbc0a247 100644 --- a/ext/standard/tests/array/array_diff_ukey_variation10.phpt +++ b/ext/standard/tests/array/array_diff_ukey_variation10.phpt @@ -30,5 +30,5 @@ try { ?> --EXPECT-- *** Testing array_diff_ukey() : usage variation *** -array_diff_ukey() expects argument #3 to be a valid callback, function 'unknown_function' not found or invalid function name -array_diff_ukey() expects argument #3 to be a valid callback, function 'unknown_function' not found or invalid function name +array_diff_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name +array_diff_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name diff --git a/ext/standard/tests/array/array_filter_variation9.phpt b/ext/standard/tests/array/array_filter_variation9.phpt index cedaf840dfb0c..90454e855e71c 100644 --- a/ext/standard/tests/array/array_filter_variation9.phpt +++ b/ext/standard/tests/array/array_filter_variation9.phpt @@ -69,6 +69,6 @@ array(7) { [6]=> NULL } -array_filter() expects argument #2 ($callback) to be a valid callback, function 'echo' not found or invalid function name -array_filter() expects argument #2 ($callback) to be a valid callback, function 'exit' not found or invalid function name +array_filter(): Argument #2 ($callback) must be a valid callback, function 'echo' not found or invalid function name +array_filter(): Argument #2 ($callback) must be a valid callback, function 'exit' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt index f277285cb62e7..a6eccc5bd52c2 100644 --- a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt +++ b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt @@ -28,7 +28,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing array_intersect_ukey() : usage variation *** -array_intersect_ukey() expects argument #3 to be a valid callback, function 'unknown_function' not found or invalid function name -array_intersect_ukey() expects argument #3 to be a valid callback, function 'unknown_function' not found or invalid function name +array_intersect_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name +array_intersect_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name diff --git a/ext/standard/tests/array/array_key_exists.phpt b/ext/standard/tests/array/array_key_exists.phpt index 0e6c6a5263a34..0024ae18672be 100644 --- a/ext/standard/tests/array/array_key_exists.phpt +++ b/ext/standard/tests/array/array_key_exists.phpt @@ -224,5 +224,5 @@ bool(true) Illegal offset type *** Testing operation on objects *** -array_key_exists() expects argument #2 ($array) to be of type array, object given +array_key_exists(): Argument #2 ($array) must be of type array, object given Done diff --git a/ext/standard/tests/array/array_map_object1.phpt b/ext/standard/tests/array/array_map_object1.phpt index 46fed2769148d..7976f7048e4d4 100644 --- a/ext/standard/tests/array/array_map_object1.phpt +++ b/ext/standard/tests/array/array_map_object1.phpt @@ -137,15 +137,15 @@ array(2) { -- simple class with private variable and method -- SimpleClassPri::add -array_map() expects argument #1 ($callback) to be a valid callback, cannot access private method SimpleClassPri::add() +array_map(): Argument #1 ($callback) must be a valid callback, cannot access private method SimpleClassPri::add() -- simple class with protected variable and method -- SimpleClassPro::mul -array_map() expects argument #1 ($callback) to be a valid callback, cannot access protected method SimpleClassPro::mul() +array_map(): Argument #1 ($callback) must be a valid callback, cannot access protected method SimpleClassPro::mul() -- class without members -- EmptyClass -array_map() expects argument #1 ($callback) to be a valid callback, array must have exactly two members +array_map(): Argument #1 ($callback) must be a valid callback, array must have exactly two members -- abstract class -- ChildClass::emptyFunction @@ -178,9 +178,9 @@ array(2) { int(4) } StaticClass::cube -array_map() expects argument #1 ($callback) to be a valid callback, cannot access private method StaticClass::cube() +array_map(): Argument #1 ($callback) must be a valid callback, cannot access private method StaticClass::cube() StaticClass::retVal -array_map() expects argument #1 ($callback) to be a valid callback, cannot access protected method StaticClass::retVal() +array_map(): Argument #1 ($callback) must be a valid callback, cannot access protected method StaticClass::retVal() -- class implementing an interface -- InterClass::square array(2) { diff --git a/ext/standard/tests/array/array_map_object2.phpt b/ext/standard/tests/array/array_map_object2.phpt index de43ff2c934e9..92dbc02181868 100644 --- a/ext/standard/tests/array/array_map_object2.phpt +++ b/ext/standard/tests/array/array_map_object2.phpt @@ -44,7 +44,7 @@ echo "Done"; --EXPECT-- *** Testing array_map() : with non-existent class and method *** -- with non-existent class -- -array_map() expects argument #1 ($callback) to be a valid callback, class 'non-existent' not found +array_map(): Argument #1 ($callback) must be a valid callback, class 'non-existent' not found -- with existent class and non-existent method -- -array_map() expects argument #1 ($callback) to be a valid callback, class 'SimpleClass' does not have a method 'non-existent' +array_map(): Argument #1 ($callback) must be a valid callback, class 'SimpleClass' does not have a method 'non-existent' Done diff --git a/ext/standard/tests/array/array_map_object3.phpt b/ext/standard/tests/array/array_map_object3.phpt index 98f14789b92ea..387e95ed0b125 100644 --- a/ext/standard/tests/array/array_map_object3.phpt +++ b/ext/standard/tests/array/array_map_object3.phpt @@ -81,7 +81,7 @@ array(3) { int(7) } -- accessing child method from parent class -- -array_map() expects argument #1 ($callback) to be a valid callback, class 'ParentClass' does not have a method 'staticChild' +array_map(): Argument #1 ($callback) must be a valid callback, class 'ParentClass' does not have a method 'staticChild' -- accessing parent method using child class object -- array(3) { [0]=> @@ -92,5 +92,5 @@ array(3) { int(7) } -- accessing child method using parent class object -- -array_map() expects argument #1 ($callback) to be a valid callback, class 'ParentClass' does not have a method 'staticChild' +array_map(): Argument #1 ($callback) must be a valid callback, class 'ParentClass' does not have a method 'staticChild' Done diff --git a/ext/standard/tests/array/array_map_variation12.phpt b/ext/standard/tests/array/array_map_variation12.phpt index 4f1dba9c85157..e662d4913c0aa 100644 --- a/ext/standard/tests/array/array_map_variation12.phpt +++ b/ext/standard/tests/array/array_map_variation12.phpt @@ -49,5 +49,5 @@ array(3) { -- with built-in function 'pow' and one parameter -- pow() expects exactly 2 parameters, 1 given -- with language construct -- -array_map() expects argument #1 ($callback) to be a valid callback, function 'echo' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'echo' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_map_variation14.phpt b/ext/standard/tests/array/array_map_variation14.phpt index f0b931eddb748..bffb42dbeb955 100644 --- a/ext/standard/tests/array/array_map_variation14.phpt +++ b/ext/standard/tests/array/array_map_variation14.phpt @@ -123,7 +123,7 @@ array(2) { int(2) } -- with empty string -- -array_map() expects argument #1 ($callback) to be a valid callback, function '' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function '' not found or invalid function name -- with empty array -- -array_map() expects argument #1 ($callback) to be a valid callback, array must have exactly two members +array_map(): Argument #1 ($callback) must be a valid callback, array must have exactly two members Done diff --git a/ext/standard/tests/array/array_map_variation15.phpt b/ext/standard/tests/array/array_map_variation15.phpt index f352fabc71a26..0478fb26c2c04 100644 --- a/ext/standard/tests/array/array_map_variation15.phpt +++ b/ext/standard/tests/array/array_map_variation15.phpt @@ -28,5 +28,5 @@ echo "Done"; ?> --EXPECT-- *** Testing array_map() : non existent 'callback' function *** -array_map() expects argument #1 ($callback) to be a valid callback, function 'non_existent' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'non_existent' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_map_variation16.phpt b/ext/standard/tests/array/array_map_variation16.phpt index b9d9b51b14731..96bad882b26d3 100644 --- a/ext/standard/tests/array/array_map_variation16.phpt +++ b/ext/standard/tests/array/array_map_variation16.phpt @@ -43,19 +43,19 @@ echo "Done"; --EXPECT-- *** Testing array_map() : non-permmited built-in functions *** -- Iteration 1 -- -array_map() expects argument #1 ($callback) to be a valid callback, function 'echo' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'echo' not found or invalid function name -- Iteration 2 -- -array_map() expects argument #1 ($callback) to be a valid callback, function 'array' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'array' not found or invalid function name -- Iteration 3 -- -array_map() expects argument #1 ($callback) to be a valid callback, function 'empty' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'empty' not found or invalid function name -- Iteration 4 -- -array_map() expects argument #1 ($callback) to be a valid callback, function 'eval' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'eval' not found or invalid function name -- Iteration 5 -- -array_map() expects argument #1 ($callback) to be a valid callback, function 'exit' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'exit' not found or invalid function name -- Iteration 6 -- -array_map() expects argument #1 ($callback) to be a valid callback, function 'isset' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'isset' not found or invalid function name -- Iteration 7 -- -array_map() expects argument #1 ($callback) to be a valid callback, function 'list' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'list' not found or invalid function name -- Iteration 8 -- -array_map() expects argument #1 ($callback) to be a valid callback, function 'print' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function 'print' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_map_variation17.phpt b/ext/standard/tests/array/array_map_variation17.phpt index 65268ac9142d4..549afdc21ad1e 100644 --- a/ext/standard/tests/array/array_map_variation17.phpt +++ b/ext/standard/tests/array/array_map_variation17.phpt @@ -81,62 +81,62 @@ echo "Done"; *** Testing array_map() : unexpected values for 'callback' argument *** -- Iteration 1 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 2 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 3 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 4 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 5 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 6 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 7 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 8 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 9 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 10 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 11 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 12 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 13 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 14 -- -array_map() expects argument #1 ($callback) to be a valid callback, function '' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function '' not found or invalid function name -- Iteration 15 -- -array_map() expects argument #1 ($callback) to be a valid callback, function '' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function '' not found or invalid function name -- Iteration 16 -- -array_map() expects argument #1 ($callback) to be a valid callback, array must have exactly two members +array_map(): Argument #1 ($callback) must be a valid callback, array must have exactly two members -- Iteration 17 -- -array_map() expects argument #1 ($callback) to be a valid callback, first array member is not a valid class name or object +array_map(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object -- Iteration 18 -- -array_map() expects argument #1 ($callback) to be a valid callback, first array member is not a valid class name or object +array_map(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object -- Iteration 19 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 20 -- -array_map() expects argument #1 ($callback) to be a valid callback, no array or string given +array_map(): Argument #1 ($callback) must be a valid callback, no array or string given Done diff --git a/ext/standard/tests/array/array_search_variation3.phpt b/ext/standard/tests/array/array_search_variation3.phpt index ad356ba01dbd3..4ff919d8a830d 100644 --- a/ext/standard/tests/array/array_search_variation3.phpt +++ b/ext/standard/tests/array/array_search_variation3.phpt @@ -56,7 +56,7 @@ string(5) "three" int(5) *** Testing objects with array_search() *** -array_search() expects argument #2 ($haystack) to be of type array, object given -array_search() expects argument #2 ($haystack) to be of type array, object given +array_search(): Argument #2 ($haystack) must be of type array, object given +array_search(): Argument #2 ($haystack) must be of type array, object given int(1) Done diff --git a/ext/standard/tests/array/array_slice_variation1.phpt b/ext/standard/tests/array/array_slice_variation1.phpt index 270206a747317..7769f32e41ac5 100644 --- a/ext/standard/tests/array/array_slice_variation1.phpt +++ b/ext/standard/tests/array/array_slice_variation1.phpt @@ -61,6 +61,6 @@ array(1) { [2]=> int(3) } -array_slice() expects argument #3 ($length) to be of type int, string given -array_slice() expects argument #3 ($length) to be of type int, string given +array_slice(): Argument #3 ($length) must be of type int, string given +array_slice(): Argument #3 ($length) must be of type int, string given string(3) "foo" diff --git a/ext/standard/tests/array/array_walk_objects.phpt b/ext/standard/tests/array/array_walk_objects.phpt index 7800a9f6f5493..2c95b5a6d0a9d 100644 --- a/ext/standard/tests/array/array_walk_objects.phpt +++ b/ext/standard/tests/array/array_walk_objects.phpt @@ -43,5 +43,5 @@ string(10) "%r\0%r*%r\0%rvar_pro" string(14) "test_protected" string(7) "var_pub" string(11) "test_public" -array_walk() expects argument #1 ($input) to be of type array, string given +array_walk(): Argument #1 ($input) must be of type array, string given Done diff --git a/ext/standard/tests/array/array_walk_rec_objects.phpt b/ext/standard/tests/array/array_walk_rec_objects.phpt index 0d0cdcbdc849593347296ffc200cd23082e403dc..4577e1af0c62c2a0743100a524d3d67a169395aa 100644 GIT binary patch delta 62 zcmdnYK9hYz7SrTxCVw`DlGNf7hRLUx^qCp77$&nZXGmKqI2NUs=BDPAC@32$XsBf7 S6_l1}D&&?HmrU+sRs{e$P!etc delta 89 zcmbQqzL|YP789e}ptM9&p(KBD39~8y_plt6 diff --git a/ext/standard/tests/array/array_walk_recursive_variation8.phpt b/ext/standard/tests/array/array_walk_recursive_variation8.phpt index 2d80cf9e240be..8fc09f562c590 100644 --- a/ext/standard/tests/array/array_walk_recursive_variation8.phpt +++ b/ext/standard/tests/array/array_walk_recursive_variation8.phpt @@ -40,5 +40,5 @@ bool(true) -- With 'min' built-in function -- bool(true) -- With 'echo' language construct -- -array_walk_recursive() expects argument #2 ($funcname) to be a valid callback, function 'echo' not found or invalid function name +array_walk_recursive(): Argument #2 ($funcname) must be a valid callback, function 'echo' not found or invalid function name Done diff --git a/ext/standard/tests/array/array_walk_variation8.phpt b/ext/standard/tests/array/array_walk_variation8.phpt index f95bc43e9d60a..0a311dd6133c4 100644 --- a/ext/standard/tests/array/array_walk_variation8.phpt +++ b/ext/standard/tests/array/array_walk_variation8.phpt @@ -40,5 +40,5 @@ bool(true) -- With 'min' built-in function -- bool(true) -- With 'echo' language construct -- -array_walk() expects argument #2 ($funcname) to be a valid callback, function 'echo' not found or invalid function name +array_walk(): Argument #2 ($funcname) must be a valid callback, function 'echo' not found or invalid function name Done diff --git a/ext/standard/tests/array/bug40191.phpt b/ext/standard/tests/array/bug40191.phpt index a87c5098ab602..9ad8f7e280295 100644 --- a/ext/standard/tests/array/bug40191.phpt +++ b/ext/standard/tests/array/bug40191.phpt @@ -17,5 +17,5 @@ try { echo "Done\n"; ?> --EXPECT-- -array_unique() expects argument #1 ($arg) to be of type array, object given +array_unique(): Argument #1 ($arg) must be of type array, object given Done diff --git a/ext/standard/tests/array/in_array_variation3.phpt b/ext/standard/tests/array/in_array_variation3.phpt index 09549d94c3b83..2e6bd0330ef8a 100644 --- a/ext/standard/tests/array/in_array_variation3.phpt +++ b/ext/standard/tests/array/in_array_variation3.phpt @@ -59,7 +59,7 @@ bool(true) bool(true) *** Testing objects with in_array() *** -in_array() expects argument #2 ($haystack) to be of type array, object given -in_array() expects argument #2 ($haystack) to be of type array, object given +in_array(): Argument #2 ($haystack) must be of type array, object given +in_array(): Argument #2 ($haystack) must be of type array, object given bool(true) Done diff --git a/ext/standard/tests/array/range_errors.phpt b/ext/standard/tests/array/range_errors.phpt index 73a02697e7da5..0bb336558282c 100644 --- a/ext/standard/tests/array/range_errors.phpt +++ b/ext/standard/tests/array/range_errors.phpt @@ -105,15 +105,15 @@ Step exceeds the specified range -- Testing other conditions -- Step exceeds the specified range -range() expects argument #3 ($step) to be of type int|float, string given +range(): Argument #3 ($step) must be of type int|float, string given Step exceeds the specified range Notice: A non well formed numeric value encountered in %s on line %d Step exceeds the specified range -- Testing Invalid steps -- -range() expects argument #3 ($step) to be of type int|float, string given +range(): Argument #3 ($step) must be of type int|float, string given Step exceeds the specified range Step exceeds the specified range -range() expects argument #3 ($step) to be of type int|float, string given -range() expects argument #3 ($step) to be of type int|float, string given +range(): Argument #3 ($step) must be of type int|float, string given +range(): Argument #3 ($step) must be of type int|float, string given diff --git a/ext/standard/tests/array/range_variation.phpt b/ext/standard/tests/array/range_variation.phpt index e924a2784a040..0459634b5405d 100644 --- a/ext/standard/tests/array/range_variation.phpt +++ b/ext/standard/tests/array/range_variation.phpt @@ -615,5 +615,5 @@ array(5) { [4]=> int(5) } -range() expects argument #3 ($step) to be of type int|float, array given +range(): Argument #3 ($step) must be of type int|float, array given Done diff --git a/ext/standard/tests/class_object/get_class_variation_001.phpt b/ext/standard/tests/class_object/get_class_variation_001.phpt index b7ae000c0124f..985a4686801e8 100644 --- a/ext/standard/tests/class_object/get_class_variation_001.phpt +++ b/ext/standard/tests/class_object/get_class_variation_001.phpt @@ -85,80 +85,80 @@ Warning: Undefined variable: undefined_var in %s on line %d Warning: Undefined variable: unset_var in %s on line %d Arg value: 0 (type: integer) -get_class() expects argument #1 ($object) to be of type object, int given +get_class(): Argument #1 ($object) must be of type object, int given Arg value: 1 (type: integer) -get_class() expects argument #1 ($object) to be of type object, int given +get_class(): Argument #1 ($object) must be of type object, int given Arg value: 12345 (type: integer) -get_class() expects argument #1 ($object) to be of type object, int given +get_class(): Argument #1 ($object) must be of type object, int given Arg value: -2345 (type: integer) -get_class() expects argument #1 ($object) to be of type object, int given +get_class(): Argument #1 ($object) must be of type object, int given Arg value: 10.5 (type: double) -get_class() expects argument #1 ($object) to be of type object, float given +get_class(): Argument #1 ($object) must be of type object, float given Arg value: -10.5 (type: double) -get_class() expects argument #1 ($object) to be of type object, float given +get_class(): Argument #1 ($object) must be of type object, float given Arg value: 101234567000 (type: double) -get_class() expects argument #1 ($object) to be of type object, float given +get_class(): Argument #1 ($object) must be of type object, float given Arg value: 1.07654321E-9 (type: double) -get_class() expects argument #1 ($object) to be of type object, float given +get_class(): Argument #1 ($object) must be of type object, float given Arg value: 0.5 (type: double) -get_class() expects argument #1 ($object) to be of type object, float given +get_class(): Argument #1 ($object) must be of type object, float given Arg value: Array (type: array) -get_class() expects argument #1 ($object) to be of type object, array given +get_class(): Argument #1 ($object) must be of type object, array given Arg value: Array (type: array) -get_class() expects argument #1 ($object) to be of type object, array given +get_class(): Argument #1 ($object) must be of type object, array given Arg value: Array (type: array) -get_class() expects argument #1 ($object) to be of type object, array given +get_class(): Argument #1 ($object) must be of type object, array given Arg value: Array (type: array) -get_class() expects argument #1 ($object) to be of type object, array given +get_class(): Argument #1 ($object) must be of type object, array given Arg value: Array (type: array) -get_class() expects argument #1 ($object) to be of type object, array given +get_class(): Argument #1 ($object) must be of type object, array given Arg value: (type: NULL) -get_class() expects argument #1 ($object) to be of type object, null given +get_class(): Argument #1 ($object) must be of type object, null given Arg value: (type: NULL) -get_class() expects argument #1 ($object) to be of type object, null given +get_class(): Argument #1 ($object) must be of type object, null given Arg value: 1 (type: boolean) -get_class() expects argument #1 ($object) to be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, bool given Arg value: (type: boolean) -get_class() expects argument #1 ($object) to be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, bool given Arg value: 1 (type: boolean) -get_class() expects argument #1 ($object) to be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, bool given Arg value: (type: boolean) -get_class() expects argument #1 ($object) to be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, bool given Arg value: (type: string) -get_class() expects argument #1 ($object) to be of type object, string given +get_class(): Argument #1 ($object) must be of type object, string given Arg value: (type: string) -get_class() expects argument #1 ($object) to be of type object, string given +get_class(): Argument #1 ($object) must be of type object, string given Arg value: string (type: string) -get_class() expects argument #1 ($object) to be of type object, string given +get_class(): Argument #1 ($object) must be of type object, string given Arg value: string (type: string) -get_class() expects argument #1 ($object) to be of type object, string given +get_class(): Argument #1 ($object) must be of type object, string given Arg value: (type: NULL) -get_class() expects argument #1 ($object) to be of type object, null given +get_class(): Argument #1 ($object) must be of type object, null given Arg value: (type: NULL) -get_class() expects argument #1 ($object) to be of type object, null given +get_class(): Argument #1 ($object) must be of type object, null given Done diff --git a/ext/standard/tests/file/006_variation2.phpt b/ext/standard/tests/file/006_variation2.phpt index 18d63b8a4409f..1195d422a4cf6 100644 --- a/ext/standard/tests/file/006_variation2.phpt +++ b/ext/standard/tests/file/006_variation2.phpt @@ -146,15 +146,15 @@ bool(true) bool(true) 43567 -- Iteration 12 -- -chmod() expects argument #2 ($mode) to be of type int, string given -chmod() expects argument #2 ($mode) to be of type int, string given +chmod(): Argument #2 ($mode) must be of type int, string given +chmod(): Argument #2 ($mode) must be of type int, string given -- Iteration 13 -- -chmod() expects argument #2 ($mode) to be of type int, string given -chmod() expects argument #2 ($mode) to be of type int, string given +chmod(): Argument #2 ($mode) must be of type int, string given +chmod(): Argument #2 ($mode) must be of type int, string given -- Iteration 14 -- -chmod() expects argument #2 ($mode) to be of type int, string given -chmod() expects argument #2 ($mode) to be of type int, string given +chmod(): Argument #2 ($mode) must be of type int, string given +chmod(): Argument #2 ($mode) must be of type int, string given -- Iteration 15 -- -chmod() expects argument #2 ($mode) to be of type int, string given -chmod() expects argument #2 ($mode) to be of type int, string given +chmod(): Argument #2 ($mode) must be of type int, string given +chmod(): Argument #2 ($mode) must be of type int, string given *** Done *** diff --git a/ext/standard/tests/file/bug39863.phpt b/ext/standard/tests/file/bug39863.phpt index a4eb48def331c..982367cccb459 100644 --- a/ext/standard/tests/file/bug39863.phpt +++ b/ext/standard/tests/file/bug39863.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -file_exists() expects argument #1 ($filename) to be a valid path, string given +file_exists(): Argument #1 ($filename) must be a valid path, string given diff --git a/ext/standard/tests/file/chgrp.phpt b/ext/standard/tests/file/chgrp.phpt index 9950c9e3fc79e..37ae20d40e1ae 100644 --- a/ext/standard/tests/file/chgrp.phpt +++ b/ext/standard/tests/file/chgrp.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -chgrp() expects argument #2 ($group) to be of type string|int, null given +chgrp(): Argument #2 ($group) must be of type string|int, null given diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt index 9e8d0cd180417..e7aacfdeac569 100644 --- a/ext/standard/tests/file/disk_free_space_variation.phpt +++ b/ext/standard/tests/file/disk_free_space_variation.phpt @@ -110,19 +110,19 @@ float(%d) float(%d) -- Iteration 9 -- -disk_free_space() expects argument #1 ($directory) to be a valid path, string given -diskfreespace() expects argument #1 ($directory) to be a valid path, string given +disk_free_space(): Argument #1 ($directory) must be a valid path, string given +diskfreespace(): Argument #1 ($directory) must be a valid path, string given -- Iteration 10 -- -disk_free_space() expects argument #1 ($directory) to be a valid path, string given -diskfreespace() expects argument #1 ($directory) to be a valid path, string given +disk_free_space(): Argument #1 ($directory) must be a valid path, string given +diskfreespace(): Argument #1 ($directory) must be a valid path, string given -- Iteration 11 -- -disk_free_space() expects argument #1 ($directory) to be a valid path, string given -diskfreespace() expects argument #1 ($directory) to be a valid path, string given +disk_free_space(): Argument #1 ($directory) must be a valid path, string given +diskfreespace(): Argument #1 ($directory) must be a valid path, string given -- Iteration 12 -- -disk_free_space() expects argument #1 ($directory) to be a valid path, string given -diskfreespace() expects argument #1 ($directory) to be a valid path, string given +disk_free_space(): Argument #1 ($directory) must be a valid path, string given +diskfreespace(): Argument #1 ($directory) must be a valid path, string given --- Done --- diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt index b5f5119c03613..16275e7f39c97 100644 --- a/ext/standard/tests/file/disk_total_space_variation.phpt +++ b/ext/standard/tests/file/disk_total_space_variation.phpt @@ -102,16 +102,16 @@ float(%d) float(%d) -- Iteration 9 -- -disk_total_space() expects argument #1 ($directory) to be a valid path, string given +disk_total_space(): Argument #1 ($directory) must be a valid path, string given -- Iteration 10 -- -disk_total_space() expects argument #1 ($directory) to be a valid path, string given +disk_total_space(): Argument #1 ($directory) must be a valid path, string given -- Iteration 11 -- -disk_total_space() expects argument #1 ($directory) to be a valid path, string given +disk_total_space(): Argument #1 ($directory) must be a valid path, string given -- Iteration 12 -- -disk_total_space() expects argument #1 ($directory) to be a valid path, string given +disk_total_space(): Argument #1 ($directory) must be a valid path, string given *** Testing with Binary Input *** float(%s) diff --git a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt index 878fa1a7c5f16..12814304d0a3a 100644 --- a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt @@ -82,10 +82,10 @@ Warning: file_get_contents( ): Failed to open stream: Permission denied in %s on bool(false) -- Filename: \0 -- -file_get_contents() expects argument #1 ($filename) to be a valid path, string given +file_get_contents(): Argument #1 ($filename) must be a valid path, string given -- Filename: array() -- -file_get_contents() expects argument #1 ($filename) to be a valid path, array given +file_get_contents(): Argument #1 ($filename) must be a valid path, array given -- Filename: /no/such/file/dir -- diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt index c2bb20946180a..058f3bf7e0c66 100644 --- a/ext/standard/tests/file/file_get_contents_variation8.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8.phpt @@ -75,9 +75,9 @@ bool(false) Warning: file_get_contents( ): Failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 6 -- -file_get_contents() expects argument #1 ($filename) to be a valid path, string given +file_get_contents(): Argument #1 ($filename) must be a valid path, string given -- Iteration 7 -- -file_get_contents() expects argument #1 ($filename) to be a valid path, array given +file_get_contents(): Argument #1 ($filename) must be a valid path, array given -- Iteration 8 -- Warning: file_get_contents(/no/such/file/dir): Failed to open stream: No such file or directory in %s on line %d diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt index 310d6abb86910..438fcb6903147 100644 --- a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt @@ -82,10 +82,10 @@ Warning: file_put_contents( ): Failed to open stream: Permission denied in %s on Failed to write data to: " " -- Filename: \0 -- -file_put_contents() expects argument #1 ($filename) to be a valid path, string given +file_put_contents(): Argument #1 ($filename) must be a valid path, string given -- Filename: array() -- -file_put_contents() expects argument #1 ($filename) to be a valid path, array given +file_put_contents(): Argument #1 ($filename) must be a valid path, array given -- Filename: /no/such/file/dir -- diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt index 5b8c156a94886..1a55621c3f398 100644 --- a/ext/standard/tests/file/file_put_contents_variation8.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8.phpt @@ -81,9 +81,9 @@ Failed to write data to: -- Iteration 5 -- 9 bytes written to: -- Iteration 6 -- -file_put_contents() expects argument #1 ($filename) to be a valid path, string given +file_put_contents(): Argument #1 ($filename) must be a valid path, string given -- Iteration 7 -- -file_put_contents() expects argument #1 ($filename) to be a valid path, array given +file_put_contents(): Argument #1 ($filename) must be a valid path, array given -- Iteration 8 -- Warning: file_put_contents(%sdir): Failed to open stream: %s in %s on line %d diff --git a/ext/standard/tests/file/filegroup_variation3.phpt b/ext/standard/tests/file/filegroup_variation3.phpt index aff47ef1c94d5..51c0a338610d9 100644 --- a/ext/standard/tests/file/filegroup_variation3.phpt +++ b/ext/standard/tests/file/filegroup_variation3.phpt @@ -78,8 +78,8 @@ bool(false) Warning: filegroup(): stat failed for %s/filegroup_variation3/filegroup*.tmp in %s on line %d bool(false) - Iteration 7 - -filegroup() expects argument #1 ($filename) to be a valid path, string given +filegroup(): Argument #1 ($filename) must be a valid path, string given - Iteration 8 - -filegroup() expects argument #1 ($filename) to be a valid path, string given +filegroup(): Argument #1 ($filename) must be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/fileinode_variation3.phpt b/ext/standard/tests/file/fileinode_variation3.phpt index b8ed3962dfb35..bb3dafd52dd76 100644 --- a/ext/standard/tests/file/fileinode_variation3.phpt +++ b/ext/standard/tests/file/fileinode_variation3.phpt @@ -79,8 +79,8 @@ bool(false) Warning: fileinode(): stat failed for %s/fileinode_variation3/fileinode*.tmp in %s on line %d bool(false) - Iteration 7 - -fileinode() expects argument #1 ($filename) to be a valid path, string given +fileinode(): Argument #1 ($filename) must be a valid path, string given - Iteration 8 - -fileinode() expects argument #1 ($filename) to be a valid path, string given +fileinode(): Argument #1 ($filename) must be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/fileowner_variation3.phpt b/ext/standard/tests/file/fileowner_variation3.phpt index 8768f9d69b0df..b7de38ec6f39f 100644 --- a/ext/standard/tests/file/fileowner_variation3.phpt +++ b/ext/standard/tests/file/fileowner_variation3.phpt @@ -79,8 +79,8 @@ bool(false) Warning: fileowner(): stat failed for %s/fileowner_variation3/fileowner*.tmp in %s on line %d bool(false) - Iteration 7 - -fileowner() expects argument #1 ($filename) to be a valid path, string given +fileowner(): Argument #1 ($filename) must be a valid path, string given - Iteration 8 - -fileowner() expects argument #1 ($filename) to be a valid path, string given +fileowner(): Argument #1 ($filename) must be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/fileperms_variation3.phpt b/ext/standard/tests/file/fileperms_variation3.phpt index e58594e7d143a..73c00130d1928 100644 --- a/ext/standard/tests/file/fileperms_variation3.phpt +++ b/ext/standard/tests/file/fileperms_variation3.phpt @@ -78,8 +78,8 @@ bool(false) Warning: fileperms(): stat failed for %s/fileperms_variation3/fileperms*.tmp in %s on line %d bool(false) - Iteration 7 - -fileperms() expects argument #1 ($filename) to be a valid path, string given +fileperms(): Argument #1 ($filename) must be a valid path, string given - Iteration 8 - -fileperms() expects argument #1 ($filename) to be a valid path, string given +fileperms(): Argument #1 ($filename) must be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt index 9eb5958dbb6c9..dc9123543d0dc 100644 --- a/ext/standard/tests/file/flock_error.phpt +++ b/ext/standard/tests/file/flock_error.phpt @@ -65,13 +65,13 @@ Illegal operation argument --- Iteration 3 --- Illegal operation argument --- Iteration 4 --- -flock() expects argument #2 ($operation) to be of type int, array given +flock(): Argument #2 ($operation) must be of type int, array given --- Iteration 5 --- -flock() expects argument #2 ($operation) to be of type int, array given +flock(): Argument #2 ($operation) must be of type int, array given --- Iteration 6 --- -flock() expects argument #2 ($operation) to be of type int, string given +flock(): Argument #2 ($operation) must be of type int, string given --- Iteration 7 --- -flock() expects argument #2 ($operation) to be of type int, string given +flock(): Argument #2 ($operation) must be of type int, string given --- Iteration 8 --- -flock() expects argument #2 ($operation) to be of type int, string given +flock(): Argument #2 ($operation) must be of type int, string given flock(): supplied resource is not a valid stream resource diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index 32bb6b32a698f..746d49747dd07 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -191,9 +191,9 @@ bool(false) -- Iteration 22 -- bool(false) -- Iteration 23 -- -fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 24 -- -fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 25 -- bool(false) -- Iteration 26 -- @@ -267,44 +267,44 @@ bool(true) --- With Strings --- -- Iteration 0 -- bool(true) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(true) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(false) bool(true) -- Iteration 1 -- -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 2 -- bool(true) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(true) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(false) bool(true) -- Iteration 3 -- -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 4 -- bool(false) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(false) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(true) bool(false) -- Iteration 5 -- bool(true) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(true) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(false) bool(true) @@ -405,42 +405,42 @@ bool(true) bool(true) bool(true) bool(true) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(false) bool(false) -- Iteration 1 -- bool(true) bool(true) bool(true) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(false) bool(false) -- Iteration 2 -- bool(true) bool(true) bool(true) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(false) bool(false) -- Iteration 3 -- -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given -fnmatch() expects argument #1 ($pattern) to be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given +fnmatch(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 4 -- bool(false) bool(false) bool(false) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(true) bool(false) -- Iteration 5 -- bool(false) bool(false) bool(false) -fnmatch() expects argument #2 ($filename) to be a valid path, string given +fnmatch(): Argument #2 ($filename) must be a valid path, string given bool(false) bool(true) diff --git a/ext/standard/tests/file/fopen_variation10-win32.phpt b/ext/standard/tests/file/fopen_variation10-win32.phpt index 234022dd6b9fa..10a43df24a0a9 100644 --- a/ext/standard/tests/file/fopen_variation10-win32.phpt +++ b/ext/standard/tests/file/fopen_variation10-win32.phpt @@ -97,21 +97,21 @@ file in root Warning: fopen(c\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d --\-- Warning: fopen(\\fopen_variation10.tmp): Failed to open stream: Invalid argument in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d --/-- Warning: fopen(/\fopen_variation10.tmp): Failed to open stream: Invalid argument in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d --c:fopen10.tmpdirTwo-- file in fopen10.tmpdirTwo @@ -121,7 +121,7 @@ file in fopen10.tmpdirTwo Warning: fopen(c:adir\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d --c:\/-- file in root @@ -143,4 +143,4 @@ file in fopen10.tmpDir Warning: fopen(/sortout\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/standard/tests/file/fopen_variation11-win32.phpt b/ext/standard/tests/file/fopen_variation11-win32.phpt index 61879edf76b47..91c3cf1cd6ce9 100644 --- a/ext/standard/tests/file/fopen_variation11-win32.phpt +++ b/ext/standard/tests/file/fopen_variation11-win32.phpt @@ -95,21 +95,21 @@ file in root Warning: fopen(c\fopen_variation11.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d --\-- Warning: fopen(\\FOPEN_VARIATION11.TMP): Failed to open stream: Invalid argument in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d --/-- Warning: fopen(\\FOPEN_VARIATION11.TMP): Failed to open stream: Invalid argument in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d --c:fopen11.tmpdirTwo-- file in fopen11.tmpdirTwo @@ -119,7 +119,7 @@ file in fopen11.tmpdirTwo Warning: fopen(c:adir\fopen_variation11.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d --c:\/-- file in root @@ -141,4 +141,4 @@ file in fopen11.tmpDir Warning: fopen(/sortout\fopen_variation11.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose() expects argument #1 to be of type resource, bool given in %s on line %d +Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/standard/tests/file/glob_variation-win32-mb.phpt b/ext/standard/tests/file/glob_variation-win32-mb.phpt index 814f18a71dad6..0997eb30e0cbe 100644 --- a/ext/standard/tests/file/glob_variation-win32-mb.phpt +++ b/ext/standard/tests/file/glob_variation-win32-mb.phpt @@ -334,7 +334,7 @@ array(0) { } -- Iteration 8 -- -glob() expects argument #1 ($pattern) to be a valid path, string given +glob(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 9 -- array(0) { @@ -437,7 +437,7 @@ array(1) { array(0) { } -- Iteration 8 -- -glob() expects argument #1 ($pattern) to be a valid path, string given +glob(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 9 -- array(0) { } diff --git a/ext/standard/tests/file/glob_variation-win32.phpt b/ext/standard/tests/file/glob_variation-win32.phpt index 966d2b28e003a..eb30a139236ac 100644 --- a/ext/standard/tests/file/glob_variation-win32.phpt +++ b/ext/standard/tests/file/glob_variation-win32.phpt @@ -333,7 +333,7 @@ array(0) { } -- Iteration 8 -- -glob() expects argument #1 ($pattern) to be a valid path, string given +glob(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 9 -- array(0) { @@ -436,7 +436,7 @@ array(1) { array(0) { } -- Iteration 8 -- -glob() expects argument #1 ($pattern) to be a valid path, string given +glob(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 9 -- array(0) { } diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt index 655b3efe7810e..1fcd56eeafaf9 100644 --- a/ext/standard/tests/file/glob_variation.phpt +++ b/ext/standard/tests/file/glob_variation.phpt @@ -336,7 +336,7 @@ array(0) { } -- Iteration 8 -- -glob() expects argument #1 ($pattern) to be a valid path, string given +glob(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 9 -- array(0) { @@ -439,7 +439,7 @@ array(1) { array(0) { } -- Iteration 8 -- -glob() expects argument #1 ($pattern) to be a valid path, string given +glob(): Argument #1 ($pattern) must be a valid path, string given -- Iteration 9 -- array(0) { } diff --git a/ext/standard/tests/file/is_dir_variation4.phpt b/ext/standard/tests/file/is_dir_variation4.phpt index f527974d90a2d..111699bd86810 100644 --- a/ext/standard/tests/file/is_dir_variation4.phpt +++ b/ext/standard/tests/file/is_dir_variation4.phpt @@ -81,9 +81,9 @@ bool(true) bool(false) -- Iteration 9 -- -is_dir() expects argument #1 ($filename) to be a valid path, string given +is_dir(): Argument #1 ($filename) must be a valid path, string given -- Iteration 10 -- -is_dir() expects argument #1 ($filename) to be a valid path, string given +is_dir(): Argument #1 ($filename) must be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/is_executable_variation1.phpt b/ext/standard/tests/file/is_executable_variation1.phpt index 9dadbd6b0a0e2..0f7e5ba7b16ae 100644 --- a/ext/standard/tests/file/is_executable_variation1.phpt +++ b/ext/standard/tests/file/is_executable_variation1.phpt @@ -80,9 +80,9 @@ bool(false) -- Iteration 5 -- bool(false) -- Iteration 6 -- -is_executable() expects argument #1 ($filename) to be a valid path, string given +is_executable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 7 -- -is_executable() expects argument #1 ($filename) to be a valid path, string given +is_executable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 8 -- bool(false) -- Iteration 9 -- diff --git a/ext/standard/tests/file/is_file_variation4.phpt b/ext/standard/tests/file/is_file_variation4.phpt index 5651c5fc023da..81804030a067f 100644 --- a/ext/standard/tests/file/is_file_variation4.phpt +++ b/ext/standard/tests/file/is_file_variation4.phpt @@ -71,8 +71,8 @@ bool(false) - Iteration 6 - bool(false) - Iteration 7 - -is_file() expects argument #1 ($filename) to be a valid path, string given +is_file(): Argument #1 ($filename) must be a valid path, string given - Iteration 8 - -is_file() expects argument #1 ($filename) to be a valid path, string given +is_file(): Argument #1 ($filename) must be a valid path, string given *** Done *** diff --git a/ext/standard/tests/file/is_readable_variation1.phpt b/ext/standard/tests/file/is_readable_variation1.phpt index 102f9b177c549..95dd003874687 100644 --- a/ext/standard/tests/file/is_readable_variation1.phpt +++ b/ext/standard/tests/file/is_readable_variation1.phpt @@ -81,11 +81,11 @@ bool(false) -- Iteration 6 -- bool(false) -- Iteration 7 -- -is_readable() expects argument #1 ($filename) to be a valid path, string given +is_readable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 8 -- -is_readable() expects argument #1 ($filename) to be a valid path, string given +is_readable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 9 -- -is_readable() expects argument #1 ($filename) to be a valid path, string given +is_readable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 10 -- bool(true) -- Iteration 11 -- diff --git a/ext/standard/tests/file/is_writable_variation1.phpt b/ext/standard/tests/file/is_writable_variation1.phpt index 53090a9f8020e..333294e073a85 100644 --- a/ext/standard/tests/file/is_writable_variation1.phpt +++ b/ext/standard/tests/file/is_writable_variation1.phpt @@ -92,14 +92,14 @@ bool(false) bool(false) bool(false) -- Iteration 7 -- -is_writable() expects argument #1 ($filename) to be a valid path, string given -is_writeable() expects argument #1 ($filename) to be a valid path, string given +is_writable(): Argument #1 ($filename) must be a valid path, string given +is_writeable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 8 -- -is_writable() expects argument #1 ($filename) to be a valid path, string given -is_writeable() expects argument #1 ($filename) to be a valid path, string given +is_writable(): Argument #1 ($filename) must be a valid path, string given +is_writeable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 9 -- -is_writable() expects argument #1 ($filename) to be a valid path, string given -is_writeable() expects argument #1 ($filename) to be a valid path, string given +is_writable(): Argument #1 ($filename) must be a valid path, string given +is_writeable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 10 -- bool(true) bool(true) diff --git a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt index bcf83fb2bcb69..176ad79070889 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt @@ -63,8 +63,8 @@ Warning: rmdir(%s/mkdir_variation2/): %s on line %d bool(false) *** Testing mkdir() and rmdir() for binary safe functionality *** -mkdir() expects argument #1 ($pathname) to be a valid path, string given -rmdir() expects argument #1 ($dirname) to be a valid path, string given +mkdir(): Argument #1 ($pathname) must be a valid path, string given +rmdir(): Argument #1 ($dirname) must be a valid path, string given *** Testing mkdir() with miscellaneous input *** bool(true) diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt index 02fa1266fdaae..4934b8cf00834 100644 --- a/ext/standard/tests/file/readfile_variation10-win32.phpt +++ b/ext/standard/tests/file/readfile_variation10-win32.phpt @@ -75,10 +75,10 @@ Warning: readfile(): Filename cannot be empty in %s on line %d Warning: readfile( ): Failed to open stream: Permission denied in %s on line %d -- Filename: \0 -- -readfile() expects argument #1 ($filename) to be a valid path, string given +readfile(): Argument #1 ($filename) must be a valid path, string given -- Filename: array() -- -readfile() expects argument #1 ($filename) to be a valid path, array given +readfile(): Argument #1 ($filename) must be a valid path, array given -- Filename: /no/such/file/dir -- diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt index f735ba5b58a743044a49cf139cc17666747a168f..87892a4519c5304378a3f92a7eadd6ad8df213db 100644 GIT binary patch delta 42 ycmX@jdyIF(MOHa01;?WF(%jU%5(Q;L1r3$7%$(G`#N1R(h1}BOlF46KuLA%;ArFH9 delta 47 zcmX@cdzyE{MOI~n)QW=C@l+|;}h1!Y484VARaoYcI;+*D14lKjc --EXPECTF-- -file_get_contents() expects argument #1 ($filename) to be a valid path, string given -file_get_contents() expects argument #1 ($filename) to be a valid path, string given +file_get_contents(): Argument #1 ($filename) must be a valid path, string given +file_get_contents(): Argument #1 ($filename) must be a valid path, string given Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhcg==): Failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d bool(false) diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt index 1639cebe997b8..dafc626659b08 100644 --- a/ext/standard/tests/file/tempnam_variation3-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt @@ -110,9 +110,9 @@ Notice: tempnam(): file created in the system's temporary directory in %stempnam Failed, not created in the correct directory %s vs %s 0 -- Iteration 6 -- -tempnam() expects argument #2 ($prefix) to be a valid path, string given +tempnam(): Argument #2 ($prefix) must be a valid path, string given -- Iteration 7 -- -tempnam() expects argument #2 ($prefix) to be a valid path, array given +tempnam(): Argument #2 ($prefix) must be a valid path, array given -- Iteration 8 -- OK -- Iteration 9 -- diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt index b255b32f41655..a4271b13702a6 100644 --- a/ext/standard/tests/file/tempnam_variation3.phpt +++ b/ext/standard/tests/file/tempnam_variation3.phpt @@ -106,9 +106,9 @@ File name is => %s/%s File permissions are => 100600 File created in => directory specified -- Iteration 6 -- -tempnam() expects argument #2 ($prefix) to be a valid path, string given +tempnam(): Argument #2 ($prefix) must be a valid path, string given -- Iteration 7 -- -tempnam() expects argument #2 ($prefix) to be a valid path, array given +tempnam(): Argument #2 ($prefix) must be a valid path, array given -- Iteration 8 -- File name is => %s/dir%s File permissions are => 100600 diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt index 069b2f369d2b5..b9377e6c67d30 100644 --- a/ext/standard/tests/file/tempnam_variation7-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt @@ -100,9 +100,9 @@ File name is => %s%et%s File permissions are => 100666 File created in => temp dir -- Iteration 6 -- -tempnam() expects argument #1 ($dir) to be a valid path, string given +tempnam(): Argument #1 ($dir) must be a valid path, string given -- Iteration 7 -- -tempnam() expects argument #1 ($dir) to be a valid path, array given +tempnam(): Argument #1 ($dir) must be a valid path, array given -- Iteration 8 -- Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt index 5ee1d80c7d59a..a6895c706b18b 100644 --- a/ext/standard/tests/file/tempnam_variation7.phpt +++ b/ext/standard/tests/file/tempnam_variation7.phpt @@ -105,9 +105,9 @@ File name is => %s%etempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 6 -- -tempnam() expects argument #1 ($dir) to be a valid path, string given +tempnam(): Argument #1 ($dir) must be a valid path, string given -- Iteration 7 -- -tempnam() expects argument #1 ($dir) to be a valid path, array given +tempnam(): Argument #1 ($dir) must be a valid path, array given -- Iteration 8 -- Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d diff --git a/ext/standard/tests/file/windows_links/bug78862.phpt b/ext/standard/tests/file/windows_links/bug78862.phpt index 70a26c1d5fffe..ce4da1fc8c2ce 100644 --- a/ext/standard/tests/file/windows_links/bug78862.phpt +++ b/ext/standard/tests/file/windows_links/bug78862.phpt @@ -7,7 +7,7 @@ var_dump(link(__DIR__ . "/bug78862.target\0more", __DIR__ . "/bug78862.link\0mor var_dump(file_exists(__DIR__ . '/bug78862.link')); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: link() expects argument #1 ($target) to be a valid path, string given in %s:%d +Fatal error: Uncaught TypeError: link(): Argument #1 ($target) must be a valid path, string given in %s:%d Stack trace: #0 %s(%d): link('%s', '%s') #1 {main} diff --git a/ext/standard/tests/general_functions/bug41970.phpt b/ext/standard/tests/general_functions/bug41970.phpt index 211ad3b2d318b..87401fdc67281 100644 --- a/ext/standard/tests/general_functions/bug41970.phpt +++ b/ext/standard/tests/general_functions/bug41970.phpt @@ -21,11 +21,11 @@ try { echo "Done\n"; ?> --EXPECTF-- -Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d +Warning: sort(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d bool(true) -strlen() expects argument #1 ($str) to be of type string, array given +strlen(): Argument #1 ($str) must be of type string, array given -Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d +Warning: sort(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d bool(true) -strlen() expects argument #1 ($str) to be of type string, array given +strlen(): Argument #1 ($str) must be of type string, array given Done diff --git a/ext/standard/tests/general_functions/call_user_func_array_variation_001.phpt b/ext/standard/tests/general_functions/call_user_func_array_variation_001.phpt index 1f2abbae29b70..cd76dc79e3a6a 100644 --- a/ext/standard/tests/general_functions/call_user_func_array_variation_001.phpt +++ b/ext/standard/tests/general_functions/call_user_func_array_variation_001.phpt @@ -42,7 +42,7 @@ array(1) { } ------ Calling by_ref() with unreferenced argument ------ -Warning: by_ref() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d +Warning: by_ref(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d array(1) { [0]=> string(8) "original" diff --git a/ext/standard/tests/general_functions/callbacks_001.phpt b/ext/standard/tests/general_functions/callbacks_001.phpt index b667da66c9924..67afab634564d 100644 --- a/ext/standard/tests/general_functions/callbacks_001.phpt +++ b/ext/standard/tests/general_functions/callbacks_001.phpt @@ -83,7 +83,7 @@ $o = new P; $o->test(); ?> ---EXPECTF-- +--EXPECT-- parent|who B C|parent::who @@ -106,4 +106,4 @@ O $this|O::who O $this|B::who -call_user_func() expects argument #1 ($function) to be a valid callback, class 'P' is not a subclass of 'B' +call_user_func(): Argument #1 ($function) must be a valid callback, class 'P' is not a subclass of 'B' diff --git a/ext/standard/tests/general_functions/callbacks_002.phpt b/ext/standard/tests/general_functions/callbacks_002.phpt index 4f327e3b86fa6..f69a886ad392b 100644 --- a/ext/standard/tests/general_functions/callbacks_002.phpt +++ b/ext/standard/tests/general_functions/callbacks_002.phpt @@ -20,7 +20,7 @@ try { } ?> ---EXPECTF-- -call_user_func() expects argument #1 ($function) to be a valid callback, class 'Foo' not found -call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object -call_user_func() expects argument #1 ($function) to be a valid callback, second array member is not a valid method +--EXPECT-- +call_user_func(): Argument #1 ($function) must be a valid callback, class 'Foo' not found +call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object +call_user_func(): Argument #1 ($function) must be a valid callback, second array member is not a valid method diff --git a/ext/standard/tests/math/abs_variation.phpt b/ext/standard/tests/math/abs_variation.phpt index e635fa2fca191..f6ebeba2efd42 100644 --- a/ext/standard/tests/math/abs_variation.phpt +++ b/ext/standard/tests/math/abs_variation.phpt @@ -105,25 +105,25 @@ int(1) int(0) -- Iteration 7 -- -abs() expects argument #1 ($number) to be of type int|float, string given +abs(): Argument #1 ($number) must be of type int|float, string given -- Iteration 8 -- -abs() expects argument #1 ($number) to be of type int|float, string given +abs(): Argument #1 ($number) must be of type int|float, string given -- Iteration 9 -- -abs() expects argument #1 ($number) to be of type int|float, array given +abs(): Argument #1 ($number) must be of type int|float, array given -- Iteration 10 -- -abs() expects argument #1 ($number) to be of type int|float, string given +abs(): Argument #1 ($number) must be of type int|float, string given -- Iteration 11 -- -abs() expects argument #1 ($number) to be of type int|float, string given +abs(): Argument #1 ($number) must be of type int|float, string given -- Iteration 12 -- -abs() expects argument #1 ($number) to be of type int|float, string given +abs(): Argument #1 ($number) must be of type int|float, string given -- Iteration 13 -- -abs() expects argument #1 ($number) to be of type int|float, object given +abs(): Argument #1 ($number) must be of type int|float, object given -- Iteration 14 -- int(0) @@ -132,4 +132,4 @@ int(0) int(0) -- Iteration 16 -- -abs() expects argument #1 ($number) to be of type int|float, resource given +abs(): Argument #1 ($number) must be of type int|float, resource given diff --git a/ext/standard/tests/math/bindec_variation1.phpt b/ext/standard/tests/math/bindec_variation1.phpt index 9a29aa3480fd1..d219f31302541 100644 --- a/ext/standard/tests/math/bindec_variation1.phpt +++ b/ext/standard/tests/math/bindec_variation1.phpt @@ -151,7 +151,7 @@ int(0) int(0) -- Iteration 18 -- -bindec() expects argument #1 ($binary_string) to be of type string, array given +bindec(): Argument #1 ($binary_string) must be of type string, array given -- Iteration 19 -- @@ -175,4 +175,4 @@ int(0) int(0) -- Iteration 24 -- -bindec() expects argument #1 ($binary_string) to be of type string, resource given +bindec(): Argument #1 ($binary_string) must be of type string, resource given diff --git a/ext/standard/tests/math/bindec_variation1_64bit.phpt b/ext/standard/tests/math/bindec_variation1_64bit.phpt index 16f205f29f9d3..695c3f36ba9cf 100644 --- a/ext/standard/tests/math/bindec_variation1_64bit.phpt +++ b/ext/standard/tests/math/bindec_variation1_64bit.phpt @@ -151,7 +151,7 @@ int(0) int(0) -- Iteration 18 -- -bindec() expects argument #1 ($binary_string) to be of type string, array given +bindec(): Argument #1 ($binary_string) must be of type string, array given -- Iteration 19 -- @@ -175,4 +175,4 @@ int(0) int(0) -- Iteration 24 -- -bindec() expects argument #1 ($binary_string) to be of type string, resource given +bindec(): Argument #1 ($binary_string) must be of type string, resource given diff --git a/ext/standard/tests/math/ceil_variation1.phpt b/ext/standard/tests/math/ceil_variation1.phpt index 1946c77879b30..4140738e0248a 100644 --- a/ext/standard/tests/math/ceil_variation1.phpt +++ b/ext/standard/tests/math/ceil_variation1.phpt @@ -98,25 +98,25 @@ float(1) float(0) -- Iteration 7 -- -ceil() expects argument #1 ($number) to be of type int|float, string given +ceil(): Argument #1 ($number) must be of type int|float, string given -- Iteration 8 -- -ceil() expects argument #1 ($number) to be of type int|float, string given +ceil(): Argument #1 ($number) must be of type int|float, string given -- Iteration 9 -- -ceil() expects argument #1 ($number) to be of type int|float, array given +ceil(): Argument #1 ($number) must be of type int|float, array given -- Iteration 10 -- -ceil() expects argument #1 ($number) to be of type int|float, string given +ceil(): Argument #1 ($number) must be of type int|float, string given -- Iteration 11 -- -ceil() expects argument #1 ($number) to be of type int|float, string given +ceil(): Argument #1 ($number) must be of type int|float, string given -- Iteration 12 -- -ceil() expects argument #1 ($number) to be of type int|float, string given +ceil(): Argument #1 ($number) must be of type int|float, string given -- Iteration 13 -- -ceil() expects argument #1 ($number) to be of type int|float, object given +ceil(): Argument #1 ($number) must be of type int|float, object given -- Iteration 14 -- float(0) @@ -125,4 +125,4 @@ float(0) float(0) -- Iteration 16 -- -ceil() expects argument #1 ($number) to be of type int|float, resource given +ceil(): Argument #1 ($number) must be of type int|float, resource given diff --git a/ext/standard/tests/math/floor_variation1.phpt b/ext/standard/tests/math/floor_variation1.phpt index 2aa72337bbc22..f5b3e984618a1 100644 --- a/ext/standard/tests/math/floor_variation1.phpt +++ b/ext/standard/tests/math/floor_variation1.phpt @@ -98,25 +98,25 @@ float(1) float(0) -- Iteration 7 -- -floor() expects argument #1 ($number) to be of type int|float, string given +floor(): Argument #1 ($number) must be of type int|float, string given -- Iteration 8 -- -floor() expects argument #1 ($number) to be of type int|float, string given +floor(): Argument #1 ($number) must be of type int|float, string given -- Iteration 9 -- -floor() expects argument #1 ($number) to be of type int|float, array given +floor(): Argument #1 ($number) must be of type int|float, array given -- Iteration 10 -- -floor() expects argument #1 ($number) to be of type int|float, string given +floor(): Argument #1 ($number) must be of type int|float, string given -- Iteration 11 -- -floor() expects argument #1 ($number) to be of type int|float, string given +floor(): Argument #1 ($number) must be of type int|float, string given -- Iteration 12 -- -floor() expects argument #1 ($number) to be of type int|float, string given +floor(): Argument #1 ($number) must be of type int|float, string given -- Iteration 13 -- -floor() expects argument #1 ($number) to be of type int|float, object given +floor(): Argument #1 ($number) must be of type int|float, object given -- Iteration 14 -- float(0) @@ -125,4 +125,4 @@ float(0) float(0) -- Iteration 16 -- -floor() expects argument #1 ($number) to be of type int|float, resource given +floor(): Argument #1 ($number) must be of type int|float, resource given diff --git a/ext/standard/tests/math/hexdec_variation1.phpt b/ext/standard/tests/math/hexdec_variation1.phpt index 5df2c7ff06625..8b62d9458e023 100644 --- a/ext/standard/tests/math/hexdec_variation1.phpt +++ b/ext/standard/tests/math/hexdec_variation1.phpt @@ -157,7 +157,7 @@ int(0) int(0) -- Iteration 20 -- -hexdec() expects argument #1 ($hex_string) to be of type string, array given +hexdec(): Argument #1 ($hex_string) must be of type string, array given -- Iteration 21 -- @@ -181,4 +181,4 @@ int(0) int(0) -- Iteration 26 -- -hexdec() expects argument #1 ($hex_string) to be of type string, resource given +hexdec(): Argument #1 ($hex_string) must be of type string, resource given diff --git a/ext/standard/tests/math/hexdec_variation1_64bit.phpt b/ext/standard/tests/math/hexdec_variation1_64bit.phpt index 6d984502af358..86ed97987baa1 100644 --- a/ext/standard/tests/math/hexdec_variation1_64bit.phpt +++ b/ext/standard/tests/math/hexdec_variation1_64bit.phpt @@ -157,7 +157,7 @@ int(0) int(0) -- Iteration 20 -- -hexdec() expects argument #1 ($hex_string) to be of type string, array given +hexdec(): Argument #1 ($hex_string) must be of type string, array given -- Iteration 21 -- @@ -181,4 +181,4 @@ int(0) int(0) -- Iteration 26 -- -hexdec() expects argument #1 ($hex_string) to be of type string, resource given +hexdec(): Argument #1 ($hex_string) must be of type string, resource given diff --git a/ext/standard/tests/math/octdec_variation1.phpt b/ext/standard/tests/math/octdec_variation1.phpt index 18dfc698ce847..1c4ec0ec86555 100644 --- a/ext/standard/tests/math/octdec_variation1.phpt +++ b/ext/standard/tests/math/octdec_variation1.phpt @@ -160,7 +160,7 @@ int(0) int(0) -- Iteration 20 -- -octdec() expects argument #1 ($octal_string) to be of type string, array given +octdec(): Argument #1 ($octal_string) must be of type string, array given -- Iteration 21 -- @@ -184,5 +184,5 @@ int(0) int(0) -- Iteration 26 -- -octdec() expects argument #1 ($octal_string) to be of type string, resource given +octdec(): Argument #1 ($octal_string) must be of type string, resource given ---Done--- diff --git a/ext/standard/tests/math/round_variation1.phpt b/ext/standard/tests/math/round_variation1.phpt index add8cf76373d7..5371d0fb94e37 100644 --- a/ext/standard/tests/math/round_variation1.phpt +++ b/ext/standard/tests/math/round_variation1.phpt @@ -143,25 +143,25 @@ float(1) float(0) -- Iteration 17 -- -round() expects argument #1 ($number) to be of type int|float, string given +round(): Argument #1 ($number) must be of type int|float, string given -- Iteration 18 -- -round() expects argument #1 ($number) to be of type int|float, string given +round(): Argument #1 ($number) must be of type int|float, string given -- Iteration 19 -- -round() expects argument #1 ($number) to be of type int|float, array given +round(): Argument #1 ($number) must be of type int|float, array given -- Iteration 20 -- -round() expects argument #1 ($number) to be of type int|float, string given +round(): Argument #1 ($number) must be of type int|float, string given -- Iteration 21 -- -round() expects argument #1 ($number) to be of type int|float, string given +round(): Argument #1 ($number) must be of type int|float, string given -- Iteration 22 -- -round() expects argument #1 ($number) to be of type int|float, string given +round(): Argument #1 ($number) must be of type int|float, string given -- Iteration 23 -- -round() expects argument #1 ($number) to be of type int|float, object given +round(): Argument #1 ($number) must be of type int|float, object given -- Iteration 24 -- float(0) @@ -170,4 +170,4 @@ float(0) float(0) -- Iteration 26 -- -round() expects argument #1 ($number) to be of type int|float, resource given +round(): Argument #1 ($number) must be of type int|float, resource given diff --git a/ext/standard/tests/network/bug73594.phpt b/ext/standard/tests/network/bug73594.phpt index 370b6162fde9e..79607cacec0cd 100644 --- a/ext/standard/tests/network/bug73594.phpt +++ b/ext/standard/tests/network/bug73594.phpt @@ -24,4 +24,4 @@ $res = dns_get_record('php.net', DNS_MX, $auth, $additional); var_dump(!empty($res) && empty($additional)); ?> --EXPECT-- -bool(false) +bool(true) diff --git a/ext/standard/tests/password/password_hash_error.phpt b/ext/standard/tests/password/password_hash_error.phpt index dc8def5eefb95..c3c924b46b787 100644 --- a/ext/standard/tests/password/password_hash_error.phpt +++ b/ext/standard/tests/password/password_hash_error.phpt @@ -40,6 +40,6 @@ password_hash() expects at least 2 parameters, 1 given Warning: Array to string conversion in %s on line %d Unknown password hashing algorithm: Array -password_hash() expects argument #3 ($options) to be of type array, object given -password_hash() expects argument #3 ($options) to be of type array, string given -password_hash() expects argument #1 ($password) to be of type string, array given +password_hash(): Argument #3 ($options) must be of type array, object given +password_hash(): Argument #3 ($options) must be of type array, string given +password_hash(): Argument #1 ($password) must be of type string, array given diff --git a/ext/standard/tests/password/password_needs_rehash_error.phpt b/ext/standard/tests/password/password_needs_rehash_error.phpt index 688bbb4eb7852..0b64b0c82ee38 100644 --- a/ext/standard/tests/password/password_needs_rehash_error.phpt +++ b/ext/standard/tests/password/password_needs_rehash_error.phpt @@ -29,6 +29,6 @@ echo "OK!"; --EXPECT-- password_needs_rehash() expects at least 2 parameters, 1 given bool(false) -password_needs_rehash() expects argument #1 ($hash) to be of type string, array given -password_needs_rehash() expects argument #3 ($options) to be of type array, string given +password_needs_rehash(): Argument #1 ($hash) must be of type string, array given +password_needs_rehash(): Argument #3 ($options) must be of type array, string given OK! diff --git a/ext/standard/tests/strings/addcslashes_001.phpt b/ext/standard/tests/strings/addcslashes_001.phpt index 6b15319c0e0ba870145cf1b39355246afa574eaf..50a57129e5b36837e10656c9b15dc716818d88a9 100644 GIT binary patch delta 43 zcmaFI^O9%78fG~w1;?WF(%jU%5(Q-=1r3$tjKrdx%;FMFh1}BOlFjFt=Q9BSRnrfB delta 30 mcmaFK^Nwf38fGqq)QW=C --EXPECT-- -get_html_translation_table() expects argument #1 ($table) to be of type int, float given +get_html_translation_table(): Argument #1 ($table) must be of type int, float given diff --git a/ext/standard/tests/strings/chunk_split_variation5.phpt b/ext/standard/tests/strings/chunk_split_variation5.phpt index 85690a234ed998d8eed8289fc0a1147698924549..37af77afd8e1a149d494624f48e1ca17d8a0368a 100644 GIT binary patch delta 24 fcmdlaxK?n3IR~?qg5zXI4sn*;(&CcIQ5+EfS#Sp& delta 47 zcmZ20xJht>Ift@BYDGb6a!Ij5Vo`c&ZfahMg0hi7}`;c_j+Uh6)-g1(~VI zsl}QKU{wtw&r!5(ZWCS0NJxus delta 321 zcmZoPTxq!BnV`HvYDGb6a!Ij5Vo`c&ZfahMg0i84hDv%)X{x3|N&Y6GC?-W5Y6>z_ zlT(X9swO*#D@>jya-5K9lY|sDPZ#ZFB+5ihY^scaZbP!SRa}h-Rma6mh*0GqPK=E} MpR&5-=cRH10PpK+VgLXD diff --git a/ext/standard/tests/strings/join_error.phpt b/ext/standard/tests/strings/join_error.phpt index 976dd97242e61..e77b20c744292 100644 --- a/ext/standard/tests/strings/join_error.phpt +++ b/ext/standard/tests/strings/join_error.phpt @@ -26,5 +26,5 @@ echo "Done\n"; *** Testing join() : error conditions *** -- Testing join() with less than expected no. of arguments -- -join() expects argument #1 ($pieces) to be of type array, string given +join(): Argument #1 ($pieces) must be of type array, string given Done diff --git a/ext/standard/tests/strings/join_variation1.phpt b/ext/standard/tests/strings/join_variation1.phpt index 58cb3d2d11d33..970d5da3305c7 100644 --- a/ext/standard/tests/strings/join_variation1.phpt +++ b/ext/standard/tests/strings/join_variation1.phpt @@ -125,15 +125,15 @@ string(29) "element11.07654321E-9element2" -- Iteration 9 -- string(19) "element10.5element2" -- Iteration 10 -- -join() expects argument #1 ($glue) to be of type string, array given +join(): Argument #1 ($glue) must be of type string, array given -- Iteration 11 -- -join() expects argument #1 ($glue) to be of type string, array given +join(): Argument #1 ($glue) must be of type string, array given -- Iteration 12 -- -join() expects argument #1 ($glue) to be of type string, array given +join(): Argument #1 ($glue) must be of type string, array given -- Iteration 13 -- -join() expects argument #1 ($glue) to be of type string, array given +join(): Argument #1 ($glue) must be of type string, array given -- Iteration 14 -- -join() expects argument #1 ($glue) to be of type string, array given +join(): Argument #1 ($glue) must be of type string, array given -- Iteration 15 -- string(17) "element11element2" -- Iteration 16 -- @@ -153,7 +153,7 @@ string(16) "element1element2" -- Iteration 23 -- string(16) "element1element2" -- Iteration 24 -- -join() expects argument #1 ($glue) to be of type string|array, resource given +join(): Argument #1 ($glue) must be of type string|array, resource given -- Iteration 25 -- string(16) "element1element2" -- Iteration 26 -- diff --git a/ext/standard/tests/strings/join_variation2.phpt b/ext/standard/tests/strings/join_variation2.phpt index fe52aebeb7e13..37d9b64e1d93c 100644 --- a/ext/standard/tests/strings/join_variation2.phpt +++ b/ext/standard/tests/strings/join_variation2.phpt @@ -108,49 +108,49 @@ echo "Done\n"; --- Testing join() by supplying different values for 'pieces' argument --- -- Iteration 1 -- -join() expects argument #2 ($pieces) to be of type array, int given +join(): Argument #2 ($pieces) must be of type array, int given -- Iteration 2 -- -join() expects argument #2 ($pieces) to be of type array, int given +join(): Argument #2 ($pieces) must be of type array, int given -- Iteration 3 -- -join() expects argument #2 ($pieces) to be of type array, int given +join(): Argument #2 ($pieces) must be of type array, int given -- Iteration 4 -- -join() expects argument #2 ($pieces) to be of type array, int given +join(): Argument #2 ($pieces) must be of type array, int given -- Iteration 5 -- -join() expects argument #2 ($pieces) to be of type array, float given +join(): Argument #2 ($pieces) must be of type array, float given -- Iteration 6 -- -join() expects argument #2 ($pieces) to be of type array, float given +join(): Argument #2 ($pieces) must be of type array, float given -- Iteration 7 -- -join() expects argument #2 ($pieces) to be of type array, float given +join(): Argument #2 ($pieces) must be of type array, float given -- Iteration 8 -- -join() expects argument #2 ($pieces) to be of type array, float given +join(): Argument #2 ($pieces) must be of type array, float given -- Iteration 9 -- -join() expects argument #2 ($pieces) to be of type array, float given +join(): Argument #2 ($pieces) must be of type array, float given -- Iteration 10 -- -join() expects argument #2 ($pieces) to be of type array, bool given +join(): Argument #2 ($pieces) must be of type array, bool given -- Iteration 11 -- -join() expects argument #2 ($pieces) to be of type array, bool given +join(): Argument #2 ($pieces) must be of type array, bool given -- Iteration 12 -- -join() expects argument #2 ($pieces) to be of type array, bool given +join(): Argument #2 ($pieces) must be of type array, bool given -- Iteration 13 -- -join() expects argument #2 ($pieces) to be of type array, bool given +join(): Argument #2 ($pieces) must be of type array, bool given -- Iteration 14 -- -join() expects argument #2 ($pieces) to be of type array, string given +join(): Argument #2 ($pieces) must be of type array, string given -- Iteration 15 -- -join() expects argument #2 ($pieces) to be of type array, string given +join(): Argument #2 ($pieces) must be of type array, string given -- Iteration 16 -- -join() expects argument #2 ($pieces) to be of type array, object given +join(): Argument #2 ($pieces) must be of type array, object given -- Iteration 17 -- -join() expects argument #2 ($pieces) to be of type array, string given +join(): Argument #2 ($pieces) must be of type array, string given -- Iteration 18 -- -join() expects argument #2 ($pieces) to be of type array, string given +join(): Argument #2 ($pieces) must be of type array, string given -- Iteration 19 -- -join() expects argument #2 ($pieces) to be of type array, null given +join(): Argument #2 ($pieces) must be of type array, null given -- Iteration 20 -- -join() expects argument #2 ($pieces) to be of type array, null given +join(): Argument #2 ($pieces) must be of type array, null given -- Iteration 21 -- -join() expects argument #2 ($pieces) to be of type array, resource given +join(): Argument #2 ($pieces) must be of type array, resource given -- Iteration 22 -- -join() expects argument #2 ($pieces) to be of type array, null given +join(): Argument #2 ($pieces) must be of type array, null given -- Iteration 23 -- -join() expects argument #2 ($pieces) to be of type array, null given +join(): Argument #2 ($pieces) must be of type array, null given Done diff --git a/ext/standard/tests/strings/join_variation4.phpt b/ext/standard/tests/strings/join_variation4.phpt index 25ea7664217dfa055545818b09c9fe19b19c017c..162576bb93b59b0c6b5298594d64fad5b7c1394d 100644 GIT binary patch delta 39 ucmew)_*QU39;=jMv>iGs4Bf`&?ZPHC#9LT+hs$>v_xRAvAX(hVp8 delta 30 lcmaDW_(^a>9xInZYDGb6a!Ij5;^abBVWyJ&%^j?%%mA --EXPECTF-- *** Testing str_pad() function: with large value for for 'pad_length' argument *** -str_pad() expects argument #2 ($pad_length) to be of type int, float given +str_pad(): Argument #2 ($pad_length) must be of type int, float given Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d diff --git a/ext/standard/tests/strings/str_replace_basic.phpt b/ext/standard/tests/strings/str_replace_basic.phpt index 1a0b7d5531546..7de2d498bb5cd 100644 --- a/ext/standard/tests/strings/str_replace_basic.phpt +++ b/ext/standard/tests/strings/str_replace_basic.phpt @@ -47,5 +47,5 @@ string(1) "q" int(1) string(0) "" int(0) -str_replace() expects argument #3 ($subject) to be of type string|array, resource given +str_replace(): Argument #3 ($subject) must be of type string|array, resource given resource(%d) of type (stream) diff --git a/ext/standard/tests/strings/str_replace_variation3.phpt b/ext/standard/tests/strings/str_replace_variation3.phpt index d5d56b820846b..2245ca422c2c1 100644 --- a/ext/standard/tests/strings/str_replace_variation3.phpt +++ b/ext/standard/tests/strings/str_replace_variation3.phpt @@ -200,8 +200,8 @@ array(2) { int(1) -- Testing Resources -- -str_replace() expects argument #3 ($subject) to be of type string|array, resource given -str_replace() expects argument #3 ($subject) to be of type string|array, resource given +str_replace(): Argument #3 ($subject) must be of type string|array, resource given +str_replace(): Argument #3 ($subject) must be of type string|array, resource given -- Testing a longer and heredoc string -- string(623) "FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789 diff --git a/ext/standard/tests/strings/stripos_variation10.phpt b/ext/standard/tests/strings/stripos_variation10.phpt index f36c23dfbd3f6..92592de0f544d 100644 --- a/ext/standard/tests/strings/stripos_variation10.phpt +++ b/ext/standard/tests/strings/stripos_variation10.phpt @@ -126,19 +126,19 @@ bool(false) int(17) -- Iteration 10 -- -stripos() expects argument #2 ($needle) to be of type string, array given +stripos(): Argument #2 ($needle) must be of type string, array given -- Iteration 11 -- -stripos() expects argument #2 ($needle) to be of type string, array given +stripos(): Argument #2 ($needle) must be of type string, array given -- Iteration 12 -- -stripos() expects argument #2 ($needle) to be of type string, array given +stripos(): Argument #2 ($needle) must be of type string, array given -- Iteration 13 -- -stripos() expects argument #2 ($needle) to be of type string, array given +stripos(): Argument #2 ($needle) must be of type string, array given -- Iteration 14 -- -stripos() expects argument #2 ($needle) to be of type string, array given +stripos(): Argument #2 ($needle) must be of type string, array given -- Iteration 15 -- int(9) @@ -168,7 +168,7 @@ int(0) int(0) -- Iteration 24 -- -stripos() expects argument #2 ($needle) to be of type string, resource given +stripos(): Argument #2 ($needle) must be of type string, resource given -- Iteration 25 -- int(0) diff --git a/ext/standard/tests/strings/stripos_variation11.phpt b/ext/standard/tests/strings/stripos_variation11.phpt index 9746cdb59a2c1..9b7ff24350330 100644 --- a/ext/standard/tests/strings/stripos_variation11.phpt +++ b/ext/standard/tests/strings/stripos_variation11.phpt @@ -126,20 +126,20 @@ bool(false) int(0) bool(false) -- Iteration 10 -- -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 11 -- -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 12 -- -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 13 -- -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 14 -- -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given -TypeError: stripos() expects argument #1 ($haystack) to be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 15 -- int(0) bool(false) @@ -168,8 +168,8 @@ ValueError: Offset not contained in string int(0) ValueError: Offset not contained in string -- Iteration 24 -- -TypeError: stripos() expects argument #1 ($haystack) to be of type string, resource given -TypeError: stripos() expects argument #1 ($haystack) to be of type string, resource given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, resource given +TypeError: stripos(): Argument #1 ($haystack) must be of type string, resource given -- Iteration 25 -- int(0) ValueError: Offset not contained in string diff --git a/ext/standard/tests/strings/stristr_variation2.phpt b/ext/standard/tests/strings/stristr_variation2.phpt index 7c25c4032d57d..27cecec3c231f 100644 --- a/ext/standard/tests/strings/stristr_variation2.phpt +++ b/ext/standard/tests/strings/stristr_variation2.phpt @@ -100,11 +100,11 @@ bool(false) -- Iteration 7 -- bool(false) -- Iteration 8 -- -stristr() expects argument #2 ($needle) to be of type string, array given +stristr(): Argument #2 ($needle) must be of type string, array given -- Iteration 9 -- -stristr() expects argument #2 ($needle) to be of type string, array given +stristr(): Argument #2 ($needle) must be of type string, array given -- Iteration 10 -- -stristr() expects argument #2 ($needle) to be of type string, array given +stristr(): Argument #2 ($needle) must be of type string, array given -- Iteration 11 -- bool(false) -- Iteration 12 -- @@ -120,7 +120,7 @@ string(11) "Hello World" -- Iteration 17 -- bool(false) -- Iteration 18 -- -stristr() expects argument #2 ($needle) to be of type string, resource given +stristr(): Argument #2 ($needle) must be of type string, resource given -- Iteration 19 -- string(11) "Hello World" -- Iteration 20 -- diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt index 1929b83f74d80444f72e64b98e0bf3b150488d9e..59162e18222a294f56eef199ddb1a13344cf73c2 100644 GIT binary patch delta 77 zcmexl_tJ#46*sd9hR^Bc{}52^nu@ E0QJWluK)l5 diff --git a/ext/standard/tests/strings/strrchr_variation10.phpt b/ext/standard/tests/strings/strrchr_variation10.phpt index 04e96f971446d..269c2e09ccfbd 100644 --- a/ext/standard/tests/strings/strrchr_variation10.phpt +++ b/ext/standard/tests/strings/strrchr_variation10.phpt @@ -154,15 +154,15 @@ string(2) "10" -- Iteration 9 -- bool(false) -- Iteration 10 -- -strrchr() expects argument #2 ($needle) to be of type string, array given +strrchr(): Argument #2 ($needle) must be of type string, array given -- Iteration 11 -- -strrchr() expects argument #2 ($needle) to be of type string, array given +strrchr(): Argument #2 ($needle) must be of type string, array given -- Iteration 12 -- -strrchr() expects argument #2 ($needle) to be of type string, array given +strrchr(): Argument #2 ($needle) must be of type string, array given -- Iteration 13 -- -strrchr() expects argument #2 ($needle) to be of type string, array given +strrchr(): Argument #2 ($needle) must be of type string, array given -- Iteration 14 -- -strrchr() expects argument #2 ($needle) to be of type string, array given +strrchr(): Argument #2 ($needle) must be of type string, array given -- Iteration 15 -- bool(false) -- Iteration 16 -- @@ -182,7 +182,7 @@ bool(false) -- Iteration 23 -- bool(false) -- Iteration 24 -- -strrchr() expects argument #2 ($needle) to be of type string, resource given +strrchr(): Argument #2 ($needle) must be of type string, resource given -- Iteration 25 -- bool(false) -- Iteration 26 -- diff --git a/ext/standard/tests/strings/strrchr_variation11.phpt b/ext/standard/tests/strings/strrchr_variation11.phpt index 33a34e21aba16..7944ff82c6121 100644 --- a/ext/standard/tests/strings/strrchr_variation11.phpt +++ b/ext/standard/tests/strings/strrchr_variation11.phpt @@ -113,15 +113,15 @@ string(4) "1E-9" -- Iteration 9 -- string(3) "0.5" -- Iteration 10 -- -strrchr() expects argument #1 ($haystack) to be of type string, array given +strrchr(): Argument #1 ($haystack) must be of type string, array given -- Iteration 11 -- -strrchr() expects argument #1 ($haystack) to be of type string, array given +strrchr(): Argument #1 ($haystack) must be of type string, array given -- Iteration 12 -- -strrchr() expects argument #1 ($haystack) to be of type string, array given +strrchr(): Argument #1 ($haystack) must be of type string, array given -- Iteration 13 -- -strrchr() expects argument #1 ($haystack) to be of type string, array given +strrchr(): Argument #1 ($haystack) must be of type string, array given -- Iteration 14 -- -strrchr() expects argument #1 ($haystack) to be of type string, array given +strrchr(): Argument #1 ($haystack) must be of type string, array given -- Iteration 15 -- string(1) "1" -- Iteration 16 -- @@ -141,7 +141,7 @@ bool(false) -- Iteration 23 -- bool(false) -- Iteration 24 -- -strrchr() expects argument #1 ($haystack) to be of type string, resource given +strrchr(): Argument #1 ($haystack) must be of type string, resource given -- Iteration 25 -- bool(false) -- Iteration 26 -- diff --git a/ext/standard/tests/strings/strripos_offset.phpt b/ext/standard/tests/strings/strripos_offset.phpt index f2673ded5b641..39d0bf16f813e 100644 --- a/ext/standard/tests/strings/strripos_offset.phpt +++ b/ext/standard/tests/strings/strripos_offset.phpt @@ -36,7 +36,7 @@ try { echo "Done\n"; ?> --EXPECT-- -strripos() expects argument #3 ($offset) to be of type int, float given +strripos(): Argument #3 ($offset) must be of type int, float given Offset not contained in string Offset not contained in string Offset not contained in string diff --git a/ext/standard/tests/strings/strrpos_offset.phpt b/ext/standard/tests/strings/strrpos_offset.phpt index 21f0ea7745b7b..13df98e71c8ea 100644 --- a/ext/standard/tests/strings/strrpos_offset.phpt +++ b/ext/standard/tests/strings/strrpos_offset.phpt @@ -36,7 +36,7 @@ try { echo "Done\n"; ?> --EXPECT-- -strrpos() expects argument #3 ($offset) to be of type int, float given +strrpos(): Argument #3 ($offset) must be of type int, float given Offset not contained in string Offset not contained in string Offset not contained in string diff --git a/ext/standard/tests/strings/strrpos_variation10.phpt b/ext/standard/tests/strings/strrpos_variation10.phpt index c14c4643c1d5a..b16d946f6cf6d 100644 --- a/ext/standard/tests/strings/strrpos_variation10.phpt +++ b/ext/standard/tests/strings/strrpos_variation10.phpt @@ -116,15 +116,15 @@ bool(false) -- Iteration 9 -- int(28) -- Iteration 10 -- -strrpos() expects argument #2 ($needle) to be of type string, array given +strrpos(): Argument #2 ($needle) must be of type string, array given -- Iteration 11 -- -strrpos() expects argument #2 ($needle) to be of type string, array given +strrpos(): Argument #2 ($needle) must be of type string, array given -- Iteration 12 -- -strrpos() expects argument #2 ($needle) to be of type string, array given +strrpos(): Argument #2 ($needle) must be of type string, array given -- Iteration 13 -- -strrpos() expects argument #2 ($needle) to be of type string, array given +strrpos(): Argument #2 ($needle) must be of type string, array given -- Iteration 14 -- -strrpos() expects argument #2 ($needle) to be of type string, array given +strrpos(): Argument #2 ($needle) must be of type string, array given -- Iteration 15 -- int(41) -- Iteration 16 -- @@ -144,7 +144,7 @@ int(87) -- Iteration 23 -- int(87) -- Iteration 24 -- -strrpos() expects argument #2 ($needle) to be of type string, resource given +strrpos(): Argument #2 ($needle) must be of type string, resource given -- Iteration 25 -- int(87) -- Iteration 26 -- diff --git a/ext/standard/tests/strings/strrpos_variation11.phpt b/ext/standard/tests/strings/strrpos_variation11.phpt index 24d9828581179..df0aac0153a3f 100644 --- a/ext/standard/tests/strings/strrpos_variation11.phpt +++ b/ext/standard/tests/strings/strrpos_variation11.phpt @@ -127,20 +127,20 @@ bool(false) int(0) bool(false) -- Iteration 10 -- -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 11 -- -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 12 -- -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 13 -- -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 14 -- -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given -- Iteration 15 -- int(0) bool(false) @@ -169,8 +169,8 @@ ValueError: Offset not contained in string int(0) ValueError: Offset not contained in string -- Iteration 24 -- -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, resource given -TypeError: strrpos() expects argument #1 ($haystack) to be of type string, resource given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, resource given +TypeError: strrpos(): Argument #1 ($haystack) must be of type string, resource given -- Iteration 25 -- int(0) ValueError: Offset not contained in string diff --git a/ext/standard/tests/strings/strtr_variation6.phpt b/ext/standard/tests/strings/strtr_variation6.phpt index 0a44abbb80b06..785891e4220f6 100644 --- a/ext/standard/tests/strings/strtr_variation6.phpt +++ b/ext/standard/tests/strings/strtr_variation6.phpt @@ -125,7 +125,7 @@ string(6) "012atm" -- Iteration 16 -- string(6) "012ttm" -- Iteration 17 -- -strtr() expects argument #2 ($from) to be of type string|array, resource given +strtr(): Argument #2 ($from) must be of type string|array, resource given -- Iteration 18 -- string(6) "012atm" -- Iteration 19 -- diff --git a/ext/standard/tests/strings/strtr_variation8.phpt b/ext/standard/tests/strings/strtr_variation8.phpt index 5dc910e9be929..131682b9a87ad 100644 --- a/ext/standard/tests/strings/strtr_variation8.phpt +++ b/ext/standard/tests/strings/strtr_variation8.phpt @@ -142,7 +142,7 @@ If two arguments are passed, the second argument must be an array If two arguments are passed, the second argument must be an array -- Iteration 17 -- -strtr() expects argument #2 ($from) to be of type string|array, resource given +strtr(): Argument #2 ($from) must be of type string|array, resource given -- Iteration 18 -- If two arguments are passed, the second argument must be an array diff --git a/ext/standard/tests/strings/vfprintf_error3.phpt b/ext/standard/tests/strings/vfprintf_error3.phpt index 72866ef1a84ca..16dba223c3a38 100644 --- a/ext/standard/tests/strings/vfprintf_error3.phpt +++ b/ext/standard/tests/strings/vfprintf_error3.phpt @@ -43,6 +43,6 @@ unlink( $file ); ?> --EXPECT-- -- Testing vfprintf() function with wrong variable types as argument -- -vfprintf() expects argument #2 ($format) to be of type string, array given +vfprintf(): Argument #2 ($format) must be of type string, array given int(9) string(9) "Foo fake" diff --git a/ext/standard/tests/strings/vfprintf_error4.phpt b/ext/standard/tests/strings/vfprintf_error4.phpt index 1279ac3904aab..4c5fd92d78c06 100644 --- a/ext/standard/tests/strings/vfprintf_error4.phpt +++ b/ext/standard/tests/strings/vfprintf_error4.phpt @@ -40,5 +40,5 @@ unlink( $file ); ?> --EXPECT-- -- Testing vfprintf() function with other strangeties -- -vfprintf() expects argument #1 ($handle) to be of type resource, string given +vfprintf(): Argument #1 ($handle) must be of type resource, string given Error found: Argument number must be greater than zero. diff --git a/ext/standard/tests/strings/vfprintf_variation20.phpt b/ext/standard/tests/strings/vfprintf_variation20.phpt index d181e50eac2c8..f03b6879b151a 100644 --- a/ext/standard/tests/strings/vfprintf_variation20.phpt +++ b/ext/standard/tests/strings/vfprintf_variation20.phpt @@ -133,19 +133,19 @@ unlink($data_file); -- Iteration 9 -- 0.5 -- Iteration 10 -- -vfprintf() expects argument #2 ($format) to be of type string, array given +vfprintf(): Argument #2 ($format) must be of type string, array given -- Iteration 11 -- -vfprintf() expects argument #2 ($format) to be of type string, array given +vfprintf(): Argument #2 ($format) must be of type string, array given -- Iteration 12 -- -vfprintf() expects argument #2 ($format) to be of type string, array given +vfprintf(): Argument #2 ($format) must be of type string, array given -- Iteration 13 -- -vfprintf() expects argument #2 ($format) to be of type string, array given +vfprintf(): Argument #2 ($format) must be of type string, array given -- Iteration 14 -- -vfprintf() expects argument #2 ($format) to be of type string, array given +vfprintf(): Argument #2 ($format) must be of type string, array given -- Iteration 15 -- @@ -170,4 +170,4 @@ object -- Iteration 25 -- -- Iteration 26 -- -vfprintf() expects argument #2 ($format) to be of type string, resource given +vfprintf(): Argument #2 ($format) must be of type string, resource given diff --git a/ext/standard/tests/strings/vprintf_variation1.phpt b/ext/standard/tests/strings/vprintf_variation1.phpt index 51c3c8985e1e9..742c9cfadc3c2 100644 --- a/ext/standard/tests/strings/vprintf_variation1.phpt +++ b/ext/standard/tests/strings/vprintf_variation1.phpt @@ -143,19 +143,19 @@ int(13) int(3) -- Iteration 10 -- -vprintf() expects argument #1 ($format) to be of type string, array given +vprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 11 -- -vprintf() expects argument #1 ($format) to be of type string, array given +vprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 12 -- -vprintf() expects argument #1 ($format) to be of type string, array given +vprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 13 -- -vprintf() expects argument #1 ($format) to be of type string, array given +vprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 14 -- -vprintf() expects argument #1 ($format) to be of type string, array given +vprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 15 -- @@ -202,4 +202,4 @@ int(0) int(0) -- Iteration 26 -- -vprintf() expects argument #1 ($format) to be of type string, resource given +vprintf(): Argument #1 ($format) must be of type string, resource given diff --git a/ext/standard/tests/strings/vsprintf_variation1.phpt b/ext/standard/tests/strings/vsprintf_variation1.phpt index 15155a0626d9f..5366b403256cc 100644 --- a/ext/standard/tests/strings/vsprintf_variation1.phpt +++ b/ext/standard/tests/strings/vsprintf_variation1.phpt @@ -132,19 +132,19 @@ string(13) "1.07654321E-9" string(3) "0.5" -- Iteration 10 -- -vsprintf() expects argument #1 ($format) to be of type string, array given +vsprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 11 -- -vsprintf() expects argument #1 ($format) to be of type string, array given +vsprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 12 -- -vsprintf() expects argument #1 ($format) to be of type string, array given +vsprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 13 -- -vsprintf() expects argument #1 ($format) to be of type string, array given +vsprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 14 -- -vsprintf() expects argument #1 ($format) to be of type string, array given +vsprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 15 -- string(0) "" @@ -180,5 +180,5 @@ string(0) "" string(0) "" -- Iteration 26 -- -vsprintf() expects argument #1 ($format) to be of type string, resource given +vsprintf(): Argument #1 ($format) must be of type string, resource given Done diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt index ad9610138629e..cd8c5c7e36278 100644 --- a/tests/classes/abstract_user_call.phpt +++ b/tests/classes/abstract_user_call.phpt @@ -29,4 +29,4 @@ try { ?> --EXPECT-- test::func() -call_user_func() expects argument #1 ($function) to be a valid callback, cannot call abstract method test_base::func() +call_user_func(): Argument #1 ($function) must be a valid callback, cannot call abstract method test_base::func() diff --git a/tests/classes/autoload_009.phpt b/tests/classes/autoload_009.phpt index 7932fd4240fca..6903d9d8ba57f 100644 --- a/tests/classes/autoload_009.phpt +++ b/tests/classes/autoload_009.phpt @@ -13,7 +13,7 @@ function f(UndefClass $x) f(new stdClass); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: f() expects argument #1 ($x) to be of type UndefClass, stdClass given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: f(): Argument #1 ($x) must be of type UndefClass, stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): f(Object(stdClass)) #1 {main} diff --git a/tests/classes/autoload_012.phpt b/tests/classes/autoload_012.phpt index 7ed944dc4838c..7a168b3275a4a 100644 --- a/tests/classes/autoload_012.phpt +++ b/tests/classes/autoload_012.phpt @@ -14,4 +14,4 @@ try { ?> --EXPECT-- In autoload: string(6) "UndefC" -call_user_func() expects argument #1 ($function) to be a valid callback, class 'UndefC' not found +call_user_func(): Argument #1 ($function) must be a valid callback, class 'UndefC' not found diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt index a56efde2d96cc..74d14c8a40885 100644 --- a/tests/classes/bug27504.phpt +++ b/tests/classes/bug27504.phpt @@ -27,5 +27,5 @@ try { ?> --EXPECT-- Called function foo:bar(1) -call_user_func_array() expects argument #1 ($function) to be a valid callback, cannot access private method foo::bar() +call_user_func_array(): Argument #1 ($function) must be a valid callback, cannot access private method foo::bar() Call to private method foo::bar() from context '' diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt index 02968a9b3bbde..987298baa5fea 100644 --- a/tests/classes/tostring_004.phpt +++ b/tests/classes/tostring_004.phpt @@ -53,7 +53,7 @@ try { --EXPECT-- Object with no __toString(): Try 1: -printf() expects argument #1 ($format) to be of type string, object given +printf(): Argument #1 ($format) must be of type string, object given Try 2: diff --git a/tests/classes/type_hinting_001.phpt b/tests/classes/type_hinting_001.phpt index ca476187f3d6b..f1c1973cf3dcb 100644 --- a/tests/classes/type_hinting_001.phpt +++ b/tests/classes/type_hinting_001.phpt @@ -32,7 +32,7 @@ $a->b($b); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: FooBar::a() expects argument #1 ($foo) to be of type Foo, Blort given, called in %s on line 27 and defined in %s:12 +Fatal error: Uncaught TypeError: FooBar::a(): Argument #1 ($foo) must be of type Foo, Blort given, called in %s on line 27 and defined in %s:12 Stack trace: #0 %s(%d): FooBar->a(Object(Blort)) #1 {main} diff --git a/tests/classes/type_hinting_002.phpt b/tests/classes/type_hinting_002.phpt index a491a26a628b1..765de66bab0f5 100644 --- a/tests/classes/type_hinting_002.phpt +++ b/tests/classes/type_hinting_002.phpt @@ -11,7 +11,7 @@ $o = new Foo; $o->a($o); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Foo::a() expects argument #1 ($foo) to be of type NonExisting, Foo given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Foo::a(): Argument #1 ($foo) must be of type NonExisting, Foo given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): Foo->a(Object(Foo)) #1 {main} diff --git a/tests/classes/type_hinting_003.phpt b/tests/classes/type_hinting_003.phpt index c43f13dbef8c6..fab088daae8fa 100644 --- a/tests/classes/type_hinting_003.phpt +++ b/tests/classes/type_hinting_003.phpt @@ -57,7 +57,7 @@ array(1) { int(25) } -Fatal error: Uncaught TypeError: Test::f1() expects argument #1 ($ar) to be of type array, int given, called in %s on line %d and defined in %s:%d +Fatal error: Uncaught TypeError: Test::f1(): Argument #1 ($ar) must be of type array, int given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): Test::f1(1) #1 {main} diff --git a/tests/classes/type_hinting_004.phpt b/tests/classes/type_hinting_004.phpt index 299ec1dd46e6d..2ba8870b0a047 100644 --- a/tests/classes/type_hinting_004.phpt +++ b/tests/classes/type_hinting_004.phpt @@ -144,10 +144,10 @@ Ensure type hints are enforced for functions invoked as callbacks. ?> --EXPECTF-- ---> Type hints with callback function: -0: f1() expects argument #1 ($a) to be of type A, int given%s(%d) +0: f1(): Argument #1 ($a) must be of type A, int given%s(%d) in f1; -0: f2() expects argument #1 ($a) to be of type ?A, int given%s(%d) +0: f2(): Argument #1 ($a) must be of type ?A, int given%s(%d) in f2; in f2; @@ -155,10 +155,10 @@ in f2; ---> Type hints with callback static method: -0: C::f1() expects argument #1 ($a) to be of type A, int given%s(%d) +0: C::f1(): Argument #1 ($a) must be of type A, int given%s(%d) in C::f1 (static); -0: C::f2() expects argument #1 ($a) to be of type ?A, int given%s(%d) +0: C::f2(): Argument #1 ($a) must be of type ?A, int given%s(%d) in C::f2 (static); in C::f2 (static); @@ -166,10 +166,10 @@ in C::f2 (static); ---> Type hints with callback instance method: -0: D::f1() expects argument #1 ($a) to be of type A, int given%s(%d) +0: D::f1(): Argument #1 ($a) must be of type A, int given%s(%d) in C::f1 (instance); -0: D::f2() expects argument #1 ($a) to be of type ?A, int given%s(%d) +0: D::f2(): Argument #1 ($a) must be of type ?A, int given%s(%d) in C::f2 (instance); in C::f2 (instance); diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt index 5f35b3a229fb2..6b2804cfd4c52 100644 --- a/tests/lang/bug24658.phpt +++ b/tests/lang/bug24658.phpt @@ -53,7 +53,7 @@ int(2) object(foo)#%d (0) { } -Fatal error: Uncaught TypeError: typehint() expects argument #1 ($a) to be of type foo, int given in %s:%d +Fatal error: Uncaught TypeError: typehint(): Argument #1 ($a) must be of type foo, int given in %s:%d Stack trace: #0 [internal function]: typehint(1, 1) #1 %s(%d): array_walk(Array, 'typehint') diff --git a/tests/lang/catchable_error_001.phpt b/tests/lang/catchable_error_001.phpt index 4d785592d84df..a7481b6ea6c46 100644 --- a/tests/lang/catchable_error_001.phpt +++ b/tests/lang/catchable_error_001.phpt @@ -19,7 +19,7 @@ Catchable fatal error [1] echo "ALIVE!\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: blah() expects argument #1 ($a) to be of type Foo, stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5 +Fatal error: Uncaught TypeError: blah(): Argument #1 ($a) must be of type Foo, stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5 Stack trace: #0 %s(%d): blah(Object(stdClass)) #1 {main} diff --git a/tests/lang/catchable_error_002.phpt b/tests/lang/catchable_error_002.phpt index 70e054c698064..50f06051e303b 100644 --- a/tests/lang/catchable_error_002.phpt +++ b/tests/lang/catchable_error_002.phpt @@ -25,5 +25,5 @@ Catchable fatal error [2] echo "ALIVE!\n"; ?> --EXPECTF-- -blah() expects argument #1 ($a) to be of type Foo, stdClass given, called in %scatchable_error_002.php on line %d +blah(): Argument #1 ($a) must be of type Foo, stdClass given, called in %scatchable_error_002.php on line %d ALIVE! diff --git a/tests/lang/type_hints_001.phpt b/tests/lang/type_hints_001.phpt index eb17ff5b8d399..293b469cd27e9 100644 --- a/tests/lang/type_hints_001.phpt +++ b/tests/lang/type_hints_001.phpt @@ -20,7 +20,7 @@ type_hint_foo($bar); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: type_hint_foo() expects argument #1 ($a) to be of type Foo, Bar given, called in %s on line 16 and defined in %s:9 +Fatal error: Uncaught TypeError: type_hint_foo(): Argument #1 ($a) must be of type Foo, Bar given, called in %s on line 16 and defined in %s:9 Stack trace: #0 %s(%d): type_hint_foo(Object(Bar)) #1 {main} diff --git a/tests/output/sapi_windows_vt100_support_winko_err.phpt b/tests/output/sapi_windows_vt100_support_winko_err.phpt index 9041461150f9c..72b80891cd2be 100644 --- a/tests/output/sapi_windows_vt100_support_winko_err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_err.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winko_in-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt index 8e4509370e881..45d288f15be1a 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt index 4ee1fd0cd68ba..6e42372cb87eb 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt index f330e124c2f87..f3e0502460120 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-out.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winko_out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt index 82694ad5860ab..bd95ea7cb77d1 100644 --- a/tests/output/sapi_windows_vt100_support_winko_out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winko_out.phpt b/tests/output/sapi_windows_vt100_support_winko_out.phpt index a46f1767f3728..a937bb9ac853a 100644 --- a/tests/output/sapi_windows_vt100_support_winko_out.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_out.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winok_err.phpt b/tests/output/sapi_windows_vt100_support_winok_err.phpt index eca06f2819156..2cc9b94fa9e09 100644 --- a/tests/output/sapi_windows_vt100_support_winok_err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_err.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winok_in-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt index 366de4b0fe7ab..0f1a9f46254c4 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt index 9166cc47d029a..0355dc4091a04 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt index 526c0dd098f40..e75187702785d 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-out.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winok_out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt index 826aedb11498a..ce273f1780d39 100644 --- a/tests/output/sapi_windows_vt100_support_winok_out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : diff --git a/tests/output/sapi_windows_vt100_support_winok_out.phpt b/tests/output/sapi_windows_vt100_support_winok_out.phpt index b7b4ff34beb6d..0ca0cde849bd9 100644 --- a/tests/output/sapi_windows_vt100_support_winok_out.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_out.phpt @@ -78,19 +78,19 @@ STDERR (php://fd/2): - current value : bool(false) Not a stream: - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - enabling VT100 : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - disabling VT100: -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) - current value : -Warning: sapi_windows_vt100_support() expects argument #1 to be of type resource, string given in %s on line %d +Warning: sapi_windows_vt100_support(): Argument #1 must be of type resource, string given in %s on line %d bool(false) Invalid stream (php://temp): - current value : From 8c8f8c419378822f336aab13f301519cf2b95feb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 26 Feb 2020 16:48:03 +0100 Subject: [PATCH 094/201] Add test for bug #60161 This has been fixed in PHP 7.4, let's make sure it stays fixed. --- Zend/tests/bug60161.phpt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Zend/tests/bug60161.phpt diff --git a/Zend/tests/bug60161.phpt b/Zend/tests/bug60161.phpt new file mode 100644 index 0000000000000..0d71aaecb2d35 --- /dev/null +++ b/Zend/tests/bug60161.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #60161: Implementing an interface extending Traversable is order dependent +--FILE-- + +===DONE=== +--EXPECT-- +===DONE=== From 8654c32b584d448cbf9f341693b227db193fe155 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 26 Feb 2020 18:33:25 +0100 Subject: [PATCH 095/201] Fix #64032: mysqli reports different client_version While `mysqli_get_client_version()` calls `mysql_get_client_version()` to retrieve the client version, `mysql::$client_version` is initialized to `MYSQL_VERSION_ID`. Both should match though, and since the former is the more useful information, we fix `mysql::$client_version`. We do not add a regression test, because it would usually succeed anyway, and we already have several tests with respective `assert()`s. --- NEWS | 3 +++ ext/mysqli/mysqli_driver.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 12208cf46ab6d..353f7b0a13adf 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,9 @@ PHP NEWS cmb) . Fixed bug #79271 (DOMDocumentType::$childNodes is NULL). (cmb) +- MySQLi: + . Fixed bug #64032 (mysqli reports different client_version). (cmb) + - PCRE: . Fixed bug #79188 (Memory corruption in preg_replace/preg_replace_callback and unicode). (Nikita) diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c index 019e902391735..3464fccbc7d53 100644 --- a/ext/mysqli/mysqli_driver.c +++ b/ext/mysqli/mysqli_driver.c @@ -96,7 +96,7 @@ static zval *driver_embedded_read(mysqli_object *obj, zval *retval) /* {{{ property driver_client_version_read */ static zval *driver_client_version_read(mysqli_object *obj, zval *retval) { - ZVAL_LONG(retval, MYSQL_VERSION_ID); + ZVAL_LONG(retval, mysql_get_client_version()); return retval; } /* }}} */ From 45b4368d5c2354781a7b2f1cad86402658868e1d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 27 Feb 2020 12:27:22 +0300 Subject: [PATCH 096/201] Fixed incorrect behavior of internal memory debugger --- Zend/zend_alloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 0ccc004e14e78..25216898edb5f 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -2103,6 +2103,7 @@ static zend_long zend_mm_find_leaks(zend_mm_heap *heap, zend_mm_chunk *p, uint32 } } p = p->next; + i = ZEND_MM_FIRST_PAGE; } while (p != heap->main_chunk); return count; } From 0427ef91a677d10a022b82b3c96e02ba6520c4fa Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 27 Feb 2020 10:29:44 +0100 Subject: [PATCH 097/201] Avoid null arithmetic UB in EX_VAR_TO_NUM --- Zend/zend_compile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 6c438b6902b59..97ce2b9415f08 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -577,7 +577,7 @@ struct _zend_execute_data { #define EX_VAR(n) ZEND_CALL_VAR(execute_data, n) #define EX_VAR_NUM(n) ZEND_CALL_VAR_NUM(execute_data, n) -#define EX_VAR_TO_NUM(n) ((uint32_t)(ZEND_CALL_VAR(NULL, n) - ZEND_CALL_VAR_NUM(NULL, 0))) +#define EX_VAR_TO_NUM(n) ((uint32_t)((n) / sizeof(zval) - ZEND_CALL_FRAME_SLOT)) #define ZEND_OPLINE_TO_OFFSET(opline, target) \ ((char*)(target) - (char*)(opline)) From 49762c84e09c7b4287444bfa394f0147b9ada024 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 27 Feb 2020 10:32:24 +0100 Subject: [PATCH 098/201] Add upgrading node regarding fix for bug #79271 Cf. ff. --- UPGRADING | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPGRADING b/UPGRADING index f2dd1060d91a8..7944087c4374e 100644 --- a/UPGRADING +++ b/UPGRADING @@ -112,6 +112,12 @@ BCMath: . bcmul() and bcpow() now return numbers with the requested scale. Formerly, the returned numbers may have omitted trailing decimal zeroes. +DOM: + . As of PHP 7.3.16, the value of the $childNodes property of DOMDocument, + DOMNode, DOMProcessingInstruction, DOMComment, DOMText, DOMCdataSection and + DOMNotation is now an empty DOMNodeList instead of NULL, according to the + W3C and WHATWG standards and the PHP manual. + IMAP: rsh/ssh logins are disabled by default. Use imap.enable_insecure_rsh if you want to enable them. Note that the IMAP library does not filter mailbox names before From 84854a72c70b237f6d58ee148621b6e29ec406ba Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 27 Feb 2020 10:33:35 +0100 Subject: [PATCH 099/201] Remove mergesort implementation php_mergesort() isn't being used for anything, and hasn't been for a long time. Even if we wanted to use a stable sort, this isn't the implementation we'd use... --- configure.ac | 2 +- main/mergesort.c | 347 ----------------------------------------- main/php.h | 1 - win32/build/config.w32 | 2 +- 4 files changed, 2 insertions(+), 350 deletions(-) delete mode 100644 main/mergesort.c diff --git a/configure.ac b/configure.ac index 1733f6f6c794a..651fc9c194fb0 100644 --- a/configure.ac +++ b/configure.ac @@ -1439,7 +1439,7 @@ PHP_ADD_SOURCES(TSRM, TSRM.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c \ fopen_wrappers.c alloca.c php_scandir.c \ php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \ - strlcat.c explicit_bzero.c mergesort.c reentrancy.c php_variables.c php_ticks.c \ + strlcat.c explicit_bzero.c reentrancy.c php_variables.c php_ticks.c \ network.c php_open_temporary_file.c \ output.c getopt.c php_syslog.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) diff --git a/main/mergesort.c b/main/mergesort.c deleted file mode 100644 index da6d8560bf4a5..0000000000000 --- a/main/mergesort.c +++ /dev/null @@ -1,347 +0,0 @@ -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Peter McIlroy. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)merge.c 8.2 (Berkeley) 2/14/94"; -#endif /* LIBC_SCCS and not lint */ - -/* - * Hybrid exponential search/linear search merge sort with hybrid - * natural/pairwise first pass. Requires about .3% more comparisons - * for random data than LSMS with pairwise first pass alone. - * It works for objects as small as two bytes. - */ - -#define NATURAL -#define THRESHOLD 16 /* Best choice for natural merge cut-off. */ - -/* #define NATURAL to get hybrid natural merge. - * (The default is pairwise merging.) - */ - -#include - -#include -#include -#include - -#include "php.h" - -#ifdef PHP_WIN32 -#include /* Includes definition for u_char */ -#endif - -static void setup(u_char *list1, u_char *list2, size_t n, size_t size, int (*cmp)(const void *, const void *)); -static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const void *, const void *)); - -#define ISIZE sizeof(int) -#define PSIZE sizeof(u_char *) -#define ICOPY_LIST(src, dst, last) \ - do \ - *(int*)dst = *(int*)src, src += ISIZE, dst += ISIZE; \ - while(src < last) -#define ICOPY_ELT(src, dst, i) \ - do \ - *(int*) dst = *(int*) src, src += ISIZE, dst += ISIZE; \ - while (i -= ISIZE) - -#define CCOPY_LIST(src, dst, last) \ - do \ - *dst++ = *src++; \ - while (src < last) -#define CCOPY_ELT(src, dst, i) \ - do \ - *dst++ = *src++; \ - while (i -= 1) - -/* - * Find the next possible pointer head. (Trickery for forcing an array - * to do double duty as a linked list when objects do not align with word - * boundaries. - */ -/* Assumption: PSIZE is a power of 2. */ -#define EVAL(p) (u_char **) \ - ((u_char *)0 + \ - (((u_char *)p + PSIZE - 1 - (u_char *) 0) & ~(PSIZE - 1))) - -/* {{{ php_mergesort - * Arguments are as for qsort. - */ -PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *)) -{ - register size_t i; - register int sense; - int big, iflag; - register u_char *f1, *f2, *t, *b, *tp2, *q, *l1, *l2; - u_char *list2, *list1, *p2, *p, *last, **p1; - - if (size < PSIZE / 2) { /* Pointers must fit into 2 * size. */ - errno = EINVAL; - return (-1); - } - - if (nmemb == 0) - return (0); - - /* - * XXX - * Stupid subtraction for the Cray. - */ - iflag = 0; - if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE)) - iflag = 1; - - if ((list2 = malloc(nmemb * size + PSIZE)) == NULL) - return (-1); - - list1 = base; - setup(list1, list2, nmemb, size, cmp); - last = list2 + nmemb * size; - i = big = 0; - while (*EVAL(list2) != last) { - l2 = list1; - p1 = EVAL(list1); - for (tp2 = p2 = list2; p2 != last; p1 = EVAL(l2)) { - p2 = *EVAL(p2); - f1 = l2; - f2 = l1 = list1 + (p2 - list2); - if (p2 != last) - p2 = *EVAL(p2); - l2 = list1 + (p2 - list2); - while (f1 < l1 && f2 < l2) { - if ((*cmp)(f1, f2) <= 0) { - q = f2; - b = f1, t = l1; - sense = -1; - } else { - q = f1; - b = f2, t = l2; - sense = 0; - } - if (!big) { /* here i = 0 */ - while ((b += size) < t && cmp(q, b) >sense) - if (++i == 6) { - big = 1; - goto EXPONENTIAL; - } - } else { -EXPONENTIAL: for (i = size; ; i <<= 1) - if ((p = (b + i)) >= t) { - if ((p = t - size) > b && - (*cmp)(q, p) <= sense) - t = p; - else - b = p; - break; - } else if ((*cmp)(q, p) <= sense) { - t = p; - if (i == size) - big = 0; - goto FASTCASE; - } else - b = p; - while (t > b+size) { - i = (((t - b) / size) >> 1) * size; - if ((*cmp)(q, p = b + i) <= sense) - t = p; - else - b = p; - } - goto COPY; -FASTCASE: while (i > size) - if ((*cmp)(q, - p = b + (i >>= 1)) <= sense) - t = p; - else - b = p; -COPY: b = t; - } - i = size; - if (q == f1) { - if (iflag) { - ICOPY_LIST(f2, tp2, b); - ICOPY_ELT(f1, tp2, i); - } else { - CCOPY_LIST(f2, tp2, b); - CCOPY_ELT(f1, tp2, i); - } - } else { - if (iflag) { - ICOPY_LIST(f1, tp2, b); - ICOPY_ELT(f2, tp2, i); - } else { - CCOPY_LIST(f1, tp2, b); - CCOPY_ELT(f2, tp2, i); - } - } - } - if (f2 < l2) { - if (iflag) - ICOPY_LIST(f2, tp2, l2); - else - CCOPY_LIST(f2, tp2, l2); - } else if (f1 < l1) { - if (iflag) - ICOPY_LIST(f1, tp2, l1); - else - CCOPY_LIST(f1, tp2, l1); - } - *p1 = l2; - } - tp2 = list1; /* swap list1, list2 */ - list1 = list2; - list2 = tp2; - last = list2 + nmemb*size; - } - if (base == list2) { - memmove(list2, list1, nmemb*size); - list2 = list1; - } - free(list2); - return (0); -} -/* }}} */ - -#define swap(a, b) { \ - s = b; \ - i = size; \ - do { \ - tmp = *a; *a++ = *s; *s++ = tmp; \ - } while (--i); \ - a -= size; \ - } -#define reverse(bot, top) { \ - s = top; \ - do { \ - i = size; \ - do { \ - tmp = *bot; *bot++ = *s; *s++ = tmp; \ - } while (--i); \ - s -= size2; \ - } while(bot < s); \ -} - -/* {{{ setup - * Optional hybrid natural/pairwise first pass. Eats up list1 in runs of - * increasing order, list2 in a corresponding linked list. Checks for runs - * when THRESHOLD/2 pairs compare with same sense. (Only used when NATURAL - * is defined. Otherwise simple pairwise merging is used.) - */ -static void setup(u_char *list1, u_char *list2, size_t n, size_t size, int (*cmp)(const void *, const void *)) -{ - size_t i, length, size2, sense; - u_char *f1, *f2, *s, *l2, *last, *p2, tmp; - - size2 = size*2; - if (n <= 5) { - insertionsort(list1, n, size, cmp); - *EVAL(list2) = (u_char*) list2 + n*size; - return; - } - /* - * Avoid running pointers out of bounds; limit n to evens - * for simplicity. - */ - i = 4 + (n & 1); - insertionsort(list1 + (n - i) * size, i, size, cmp); - last = list1 + size * (n - i); - *EVAL(list2 + (last - list1)) = list2 + n * size; - -#ifdef NATURAL - p2 = list2; - f1 = list1; - sense = (cmp(f1, f1 + size) > 0); - for (; f1 < last; sense = !sense) { - length = 2; - /* Find pairs with same sense. */ - for (f2 = f1 + size2; f2 < last; f2 += size2) { - if ((cmp(f2, f2+ size) > 0) != sense) - break; - length += 2; - } - if (length < THRESHOLD) { /* Pairwise merge */ - do { - p2 = *EVAL(p2) = f1 + size2 - list1 + list2; - if (sense > 0) - swap (f1, f1 + size); - } while ((f1 += size2) < f2); - } else { /* Natural merge */ - l2 = f2; - for (f2 = f1 + size2; f2 < l2; f2 += size2) { - if ((cmp(f2-size, f2) > 0) != sense) { - p2 = *EVAL(p2) = f2 - list1 + list2; - if (sense > 0) - reverse(f1, f2-size); - f1 = f2; - } - } - if (sense > 0) - reverse (f1, f2-size); - f1 = f2; - if (f2 < last || cmp(f2 - size, f2) > 0) - p2 = *EVAL(p2) = f2 - list1 + list2; - else - p2 = *EVAL(p2) = list2 + n*size; - } - } -#else /* pairwise merge only. */ - for (f1 = list1, p2 = list2; f1 < last; f1 += size2) { - p2 = *EVAL(p2) = p2 + size2; - if (cmp (f1, f1 + size) > 0) - swap(f1, f1 + size); - } -#endif /* NATURAL */ -} -/* }}} */ - -/* {{{ insertionsort - * This is to avoid out-of-bounds addresses in sorting the - * last 4 elements. - */ -static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const void *, const void *)) -{ - u_char *ai, *s, *t, *u, tmp; - size_t i; - - for (ai = a+size; --n >= 1; ai += size) - for (t = ai; t > a; t -= size) { - u = t - size; - if (cmp(u, t) <= 0) - break; - swap(u, t); - } -} -/* }}} */ diff --git a/main/php.h b/main/php.h index 48c78291d7a64..a20b4a3bfc551 100644 --- a/main/php.h +++ b/main/php.h @@ -360,7 +360,6 @@ END_EXTERN_C() BEGIN_EXTERN_C() PHPAPI extern int (*php_register_internal_extensions_func)(void); PHPAPI int php_register_internal_extensions(void); -PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *)); PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata); PHPAPI void php_com_initialize(void); PHPAPI char *php_get_current_user(void); diff --git a/win32/build/config.w32 b/win32/build/config.w32 index a1aebb660358c..62dbeb40d9b08 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -248,7 +248,7 @@ if (VS_TOOLSET && VCVERS >= 1914) { ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \ php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \ - strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c network.c \ + strlcat.c reentrancy.c php_variables.c php_ticks.c network.c \ php_open_temporary_file.c output.c internal_functions.c \ php_syslog.c"); ADD_FLAG("CFLAGS_BD_MAIN", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); From 1949a26aaca692840a6f272b45bf1cc155ee4c73 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 27 Feb 2020 12:53:55 +0100 Subject: [PATCH 100/201] Remove more null arithmetic UB Introduce an EX_NUM_TO_VAR macro to mirror EX_VAR_TO_NUM and replace usages of the ZEND_CALL_VAR_NUM(NULL) pattern. --- Zend/zend_compile.h | 1 + Zend/zend_opcode.c | 6 +++--- ext/opcache/Optimizer/zend_optimizer_internal.h | 2 +- ext/opcache/jit/zend_jit_x86.dasc | 13 ++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 97ce2b9415f08..319ef51bcb7af 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -578,6 +578,7 @@ struct _zend_execute_data { #define EX_VAR_NUM(n) ZEND_CALL_VAR_NUM(execute_data, n) #define EX_VAR_TO_NUM(n) ((uint32_t)((n) / sizeof(zval) - ZEND_CALL_FRAME_SLOT)) +#define EX_NUM_TO_VAR(n) ((uint32_t)((n + ZEND_CALL_FRAME_SLOT) * sizeof(zval))) #define ZEND_OPLINE_TO_OFFSET(opline, target) \ ((char*)(target) - (char*)(opline)) diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 881626b71e487..4ebe92fa9511d 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -1035,15 +1035,15 @@ ZEND_API int pass_two(zend_op_array *op_array) if (opline->op1_type == IS_CONST) { ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, opline->op1); } else if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) { - opline->op1.var = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->op1.var); + opline->op1.var = EX_NUM_TO_VAR(op_array->last_var + opline->op1.var); } if (opline->op2_type == IS_CONST) { ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, opline->op2); } else if (opline->op2_type & (IS_VAR|IS_TMP_VAR)) { - opline->op2.var = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->op2.var); + opline->op2.var = EX_NUM_TO_VAR(op_array->last_var + opline->op2.var); } if (opline->result_type & (IS_VAR|IS_TMP_VAR)) { - opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->result.var); + opline->result.var = EX_NUM_TO_VAR(op_array->last_var + opline->result.var); } ZEND_VM_SET_OPCODE_HANDLER(opline); opline++; diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h index 270a85c89ae0f..5207e6cb749fa 100644 --- a/ext/opcache/Optimizer/zend_optimizer_internal.h +++ b/ext/opcache/Optimizer/zend_optimizer_internal.h @@ -31,7 +31,7 @@ #define ZEND_OP2_JMP_ADDR(opline) OP_JMP_ADDR(opline, (opline)->op2) #define VAR_NUM(v) EX_VAR_TO_NUM(v) -#define NUM_VAR(v) ((uint32_t)(zend_uintptr_t)ZEND_CALL_VAR_NUM(0, v)) +#define NUM_VAR(v) EX_NUM_TO_VAR(v) #define INV_COND(op) ((op) == ZEND_JMPZ ? ZEND_JMPNZ : ZEND_JMPZ) #define INV_EX_COND(op) ((op) == ZEND_JMPZ_EX ? ZEND_JMPNZ : ZEND_JMPZ) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 3b6e3b26f56ca..4140ea81dcfef 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -2718,7 +2718,7 @@ static int zend_jit_load_reg(dasm_State **Dst, zend_jit_addr src, zend_jit_addr static int zend_jit_store_var(dasm_State **Dst, uint32_t info, int var, zend_reg reg) { zend_jit_addr src = ZEND_ADDR_REG(reg); - zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (uint32_t)(uintptr_t)ZEND_CALL_VAR_NUM(NULL, var)); + zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, EX_NUM_TO_VAR(var)); return zend_jit_spill_store(Dst, src, dst, info, 1); } @@ -2751,7 +2751,7 @@ static int zend_jit_store_var_if_necessary_ex(dasm_State **Dst, int var, zend_ji static int zend_jit_load_var(dasm_State **Dst, uint32_t info, int var, zend_reg reg) { - zend_jit_addr src = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (uint32_t)(uintptr_t)ZEND_CALL_VAR_NUM(NULL, var)); + zend_jit_addr src = ZEND_ADDR_MEM_ZVAL(ZREG_FP, EX_NUM_TO_VAR(var)); zend_jit_addr dst = ZEND_ADDR_REG(reg); return zend_jit_load_reg(Dst, src, dst, info); @@ -6971,7 +6971,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend if (func) { for (i = call_info->num_args; i < func->op_array.last_var; i++) { - uint32_t n = (uint32_t)(uintptr_t)ZEND_CALL_VAR_NUM(NULL, i); + uint32_t n = EX_NUM_TO_VAR(i); | SET_Z_TYPE_INFO RX + n, IS_UNDEF } } @@ -7189,7 +7189,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend | // zend_vm_stack_free_args(call); if (func) { for (i = 0; i < call_info->num_args; i++ ) { - uint32_t offset = (uint32_t)(uintptr_t)ZEND_CALL_VAR_NUM(NULL, i); + uint32_t offset = EX_NUM_TO_VAR(i); | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_RX, offset), MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN, 0, 1, 0, opline } } else { @@ -7909,8 +7909,7 @@ static int zend_jit_free_compiled_variables(dasm_State **Dst, const zend_op *opl const zend_op *opline = op_array->opcodes + ssa->cfg.blocks[j].start + ssa->cfg.blocks[j].len - 1; if (opline->opcode == ZEND_RETURN) { - if (opline->op1_type == IS_CV && - opline->op1.var == (uint32_t)(uintptr_t)(ZEND_CALL_VAR_NUM(NULL, i))) { + if (opline->op1_type == IS_CV && opline->op1.var == EX_NUM_TO_VAR(i)) { info |= MAY_BE_RCN; break; } @@ -7921,7 +7920,7 @@ static int zend_jit_free_compiled_variables(dasm_State **Dst, const zend_op *opl #endif if (info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) { - uint32_t offset = (uint32_t)(uintptr_t)ZEND_CALL_VAR_NUM(NULL, i); + uint32_t offset = EX_NUM_TO_VAR(i); | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_FP, offset), info, 1, 1, 0, opline } } From 5a90392c6a86834d60385014fb5993849d684409 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 27 Feb 2020 13:13:01 +0100 Subject: [PATCH 101/201] Use EX_NUM_TO_VAR() in more places Not sure why I missed these before. --- Zend/zend_compile.c | 4 ++-- Zend/zend_opcode.c | 5 ++--- ext/opcache/Optimizer/dce.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 7ec740ae4e161..ae1fc8a7c0762 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -505,7 +505,7 @@ static int lookup_cv(zend_string *name) /* {{{ */{ while (i < op_array->last_var) { if (ZSTR_H(op_array->vars[i]) == hash_value && zend_string_equals(op_array->vars[i], name)) { - return (int)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, i); + return EX_NUM_TO_VAR(i); } i++; } @@ -517,7 +517,7 @@ static int lookup_cv(zend_string *name) /* {{{ */{ } op_array->vars[i] = zend_string_copy(name); - return (int)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, i); + return EX_NUM_TO_VAR(i); } /* }}} */ diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 4ebe92fa9511d..345e8cce42ea9 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -593,7 +593,7 @@ static void emit_live_range_raw( ZEND_ASSERT(start < end); range = &op_array->live_range[op_array->last_live_range - 1]; - range->var = (uint32_t) (intptr_t) ZEND_CALL_VAR_NUM(NULL, op_array->last_var + var_num); + range->var = EX_NUM_TO_VAR(op_array->last_var + var_num); range->var |= kind; range->start = start; range->end = end; @@ -698,8 +698,7 @@ static void emit_live_range( /* COPY_TMP has a split live-range: One from the definition until the use in * "null" branch, and another from the start of the "non-null" branch to the * FREE opcode. */ - uint32_t rt_var_num = - (uint32_t) (intptr_t) ZEND_CALL_VAR_NUM(NULL, op_array->last_var + var_num); + uint32_t rt_var_num = EX_NUM_TO_VAR(op_array->last_var + var_num); zend_op *block_start_op = use_opline; if (needs_live_range && !needs_live_range(op_array, orig_def_opline)) { diff --git a/ext/opcache/Optimizer/dce.c b/ext/opcache/Optimizer/dce.c index ea81687bf43a1..d5a7f5a192f74 100644 --- a/ext/opcache/Optimizer/dce.c +++ b/ext/opcache/Optimizer/dce.c @@ -416,7 +416,7 @@ static zend_bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { if (free_var >= 0) { opline->opcode = ZEND_FREE; - opline->op1.var = (uintptr_t) ZEND_CALL_VAR_NUM(NULL, ssa->vars[free_var].var); + opline->op1.var = EX_NUM_TO_VAR(ssa->vars[free_var].var); opline->op1_type = free_var_type; ssa_op->op1_use = free_var; From 819a872cfaee64d7cfe87867f65665fdb2ed3ebb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 27 Feb 2020 14:48:43 +0100 Subject: [PATCH 102/201] Avoid more null arithmetic --- Zend/zend_compile.c | 6 +++--- Zend/zend_compile.h | 2 +- ext/opcache/jit/zend_jit_x86.dasc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index ae1fc8a7c0762..f7ba3acf9d0e0 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3192,7 +3192,7 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */ zend_compile_expr(&arg_node, arg->child[0]); opline = zend_emit_op(NULL, ZEND_SEND_UNPACK, &arg_node, NULL); opline->op2.num = arg_count; - opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_ARG(NULL, arg_count); + opline->result.var = EX_NUM_TO_VAR(arg_count - 1); continue; } @@ -3286,7 +3286,7 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */ opline = zend_emit_op(NULL, opcode, &arg_node, NULL); opline->op2.opline_num = arg_num; - opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_ARG(NULL, arg_num); + opline->result.var = EX_NUM_TO_VAR(arg_num - 1); } return arg_count; @@ -3680,7 +3680,7 @@ int zend_compile_func_cuf(znode *result, zend_ast_list *args, zend_string *lcnam opline = zend_emit_op(NULL, ZEND_SEND_USER, &arg_node, NULL); opline->op2.num = i; - opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_ARG(NULL, i); + opline->result.var = EX_NUM_TO_VAR(i - 1); } zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 319ef51bcb7af..8a64ed86c3d03 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -578,7 +578,7 @@ struct _zend_execute_data { #define EX_VAR_NUM(n) ZEND_CALL_VAR_NUM(execute_data, n) #define EX_VAR_TO_NUM(n) ((uint32_t)((n) / sizeof(zval) - ZEND_CALL_FRAME_SLOT)) -#define EX_NUM_TO_VAR(n) ((uint32_t)((n + ZEND_CALL_FRAME_SLOT) * sizeof(zval))) +#define EX_NUM_TO_VAR(n) ((uint32_t)(((n) + ZEND_CALL_FRAME_SLOT) * sizeof(zval))) #define ZEND_OPLINE_TO_OFFSET(opline, target) \ ((char*)(target) - (char*)(opline)) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 4140ea81dcfef..1ba4a61b6eaa4 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -2726,7 +2726,7 @@ static int zend_jit_store_var(dasm_State **Dst, uint32_t info, int var, zend_reg static int zend_jit_store_var_if_necessary(dasm_State **Dst, int var, zend_jit_addr src, uint32_t info) { if (Z_MODE(src) == IS_REG && Z_STORE(src)) { - zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (uint32_t)(uintptr_t)ZEND_CALL_VAR(NULL, var)); + zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, var); return zend_jit_spill_store(Dst, src, dst, info, 1); } return 1; @@ -2735,7 +2735,7 @@ static int zend_jit_store_var_if_necessary(dasm_State **Dst, int var, zend_jit_a static int zend_jit_store_var_if_necessary_ex(dasm_State **Dst, int var, zend_jit_addr src, uint32_t info, zend_jit_addr old, uint32_t old_info) { if (Z_MODE(src) == IS_REG && Z_STORE(src)) { - zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (uint32_t)(uintptr_t)ZEND_CALL_VAR(NULL, var)); + zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, var); zend_bool set_type = 1; if ((info & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)) == From 5b51b633e2509852312328d360639dacb35d12e6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 27 Feb 2020 23:37:41 +0300 Subject: [PATCH 103/201] Fixed incorrect overflow detection --- ext/opcache/Optimizer/zend_inference.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 961740bd5c491..7bddb827052c1 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2626,10 +2626,10 @@ static int zend_update_type_info(const zend_op_array *op_array, } if ((t1 & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_LONG) { if (!ssa_var_info[ssa_ops[i].op1_use].has_range || - (opline->opcode == ZEND_PRE_DEC && + (opline->opcode == ZEND_POST_DEC && (ssa_var_info[ssa_ops[i].op1_use].range.underflow || ssa_var_info[ssa_ops[i].op1_use].range.min == ZEND_LONG_MIN)) || - (opline->opcode == ZEND_PRE_INC && + (opline->opcode == ZEND_POST_INC && (ssa_var_info[ssa_ops[i].op1_use].range.overflow || ssa_var_info[ssa_ops[i].op1_use].range.max == ZEND_LONG_MAX))) { /* may overflow */ From 5d62f95ec7738638ab16719800e0511891a4b434 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 27 Feb 2020 23:32:36 +0100 Subject: [PATCH 104/201] Use {0} to initialize instead of {NULL} Clang emits a [-Wmissing-field-initializers] when using {NULL} instead of {0} --- ext/phar/func_interceptors.c | 2 +- ext/standard/html.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 4e5115f8843e8..f0389bf2052e7 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -1100,7 +1100,7 @@ static struct _phar_orig_functions { zif_handler orig_lstat; zif_handler orig_readfile; zif_handler orig_stat; -} phar_orig_functions = {NULL}; +} phar_orig_functions = {0}; void phar_save_orig_functions(void) /* {{{ */ { diff --git a/ext/standard/html.c b/ext/standard/html.c index b7ca69d74e844..5eaf7c6711b6d 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1026,7 +1026,7 @@ static const entity_ht *unescape_inverse_map(int all, int flags) * unicode code points */ static entity_table_opt determine_entity_table(int all, int doctype) { - entity_table_opt retval = {NULL}; + entity_table_opt retval = {0}; assert(!(doctype == ENT_HTML_DOC_XML1 && all)); From 5b2d4c0eccafcd648e574012a1c5331d6e1b1a4f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 28 Feb 2020 10:21:19 +0100 Subject: [PATCH 105/201] Fix #79315 ZipArchive::addFile doesn't honor start/length parameters --- NEWS | 4 ++++ ext/zip/php_zip.c | 3 ++- ext/zip/tests/oo_addfile.phpt | 11 +++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a6c9cbf2b572d..0818f715c5d0a 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,10 @@ PHP NEWS - Standard: . Fixed bug #79254 (getenv() w/o arguments not showing changes). (cmb) +- Zip: + . Fixed bug #79315 (ZipArchive::addFile doesn't honor start/length + parameters). (Remi) + 20 Feb 2020, PHP 7.3.15 - Core: diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index e607f0f0771c3..f65f70621e84f 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1824,7 +1824,8 @@ static ZIPARCHIVE_METHOD(addFile) entry_name_len = ZSTR_LEN(filename); } - if (php_zip_add_file(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), entry_name, entry_name_len, 0, 0) < 0) { + if (php_zip_add_file(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), + entry_name, entry_name_len, offset_start, offset_len) < 0) { RETURN_FALSE; } else { RETURN_TRUE; diff --git a/ext/zip/tests/oo_addfile.phpt b/ext/zip/tests/oo_addfile.phpt index b41e3dbf2c16c..37320de6277d3 100644 --- a/ext/zip/tests/oo_addfile.phpt +++ b/ext/zip/tests/oo_addfile.phpt @@ -20,12 +20,20 @@ if (!$zip->open($file)) { if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) { echo "failed\n"; } +if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) { + echo "failed\n"; +} if ($zip->status == ZIPARCHIVE::ER_OK) { dump_entries_name($zip); $zip->close(); } else { echo "failed\n"; } +if (!$zip->open($file)) { + exit('failed'); +} +var_dump(strlen($zip->getFromName('test.php')) == filesize($dirname . 'utils.inc')); +var_dump(strlen($zip->getFromName('mini.txt')) == 34); @unlink($file); ?> --EXPECT-- @@ -34,3 +42,6 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { 2 foobar/baz 3 entry1.txt 4 test.php +5 mini.txt +bool(true) +bool(true) From 6d19acf54b1553f1f1e9156b85c22a53b10a9c8e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 10:21:50 +0100 Subject: [PATCH 106/201] Use type-checked ref assignment in UConverter --- ext/intl/converter/converter.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index 8c9377ecae84e..49d0d25ecf963 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -63,9 +63,6 @@ static inline void php_converter_throw_failure(php_converter_object *objval, UEr /* {{{ php_converter_default_callback */ static void php_converter_default_callback(zval *return_value, zval *zobj, zend_long reason, zval *error) { - ZVAL_DEREF(error); - zval_ptr_dtor(error); - ZVAL_LONG(error, U_ZERO_ERROR); /* Basic functionality so children can call parent::toUCallback() */ switch (reason) { case UCNV_UNASSIGNED: @@ -81,7 +78,7 @@ static void php_converter_default_callback(zval *return_value, zval *zobj, zend_ chars[0] = 0x1A; chars[1] = 0; chars_len = 1; - ZVAL_LONG(error, U_INVALID_STATE_ERROR); + ZEND_TRY_ASSIGN_REF_LONG(error, U_INVALID_STATE_ERROR); RETVAL_STRINGL(chars, chars_len); return; } @@ -99,8 +96,8 @@ static void php_converter_default_callback(zval *return_value, zval *zobj, zend_ chars[0] = 0x1A; chars[1] = 0; chars_len = 1; - ZVAL_LONG(error, uerror); } + ZEND_TRY_ASSIGN_REF_LONG(error, uerror); RETVAL_STRINGL(chars, chars_len); } } From 3725faa3dbb598e2fe7d522c69354f735ef99d9f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 28 Feb 2020 10:24:52 +0100 Subject: [PATCH 107/201] NEWS --- NEWS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2dcacc0be0920..6ed300daa0e8c 100644 --- a/NEWS +++ b/NEWS @@ -52,7 +52,11 @@ PHP NEWS . Fixed bug #79265 (Improper injection of Host header when using fopen for http requests). (Miguel Xavier Penha Neto) -?? ??? ????, PHP 7.4.3 +- Zip: + . Fixed bug #79315 (ZipArchive::addFile doesn't honor start/length + parameters). (Remi) + +20 Feb 2020, PHP 7.4.3 - Core: . Fixed bug #79146 (cscript can fail to run on some systems). (clarodeus) From d31fc591e0a852c69b81b3311b3609221f66c445 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 28 Feb 2020 10:21:19 +0100 Subject: [PATCH 108/201] Fix #79315 ZipArchive::addFile doesn't honor start/length parameters --- ext/zip/php_zip.c | 3 ++- ext/zip/tests/oo_addfile.phpt | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index e607f0f0771c3..f65f70621e84f 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1824,7 +1824,8 @@ static ZIPARCHIVE_METHOD(addFile) entry_name_len = ZSTR_LEN(filename); } - if (php_zip_add_file(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), entry_name, entry_name_len, 0, 0) < 0) { + if (php_zip_add_file(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), + entry_name, entry_name_len, offset_start, offset_len) < 0) { RETURN_FALSE; } else { RETURN_TRUE; diff --git a/ext/zip/tests/oo_addfile.phpt b/ext/zip/tests/oo_addfile.phpt index b41e3dbf2c16c..37320de6277d3 100644 --- a/ext/zip/tests/oo_addfile.phpt +++ b/ext/zip/tests/oo_addfile.phpt @@ -20,12 +20,20 @@ if (!$zip->open($file)) { if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) { echo "failed\n"; } +if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) { + echo "failed\n"; +} if ($zip->status == ZIPARCHIVE::ER_OK) { dump_entries_name($zip); $zip->close(); } else { echo "failed\n"; } +if (!$zip->open($file)) { + exit('failed'); +} +var_dump(strlen($zip->getFromName('test.php')) == filesize($dirname . 'utils.inc')); +var_dump(strlen($zip->getFromName('mini.txt')) == 34); @unlink($file); ?> --EXPECT-- @@ -34,3 +42,6 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { 2 foobar/baz 3 entry1.txt 4 test.php +5 mini.txt +bool(true) +bool(true) From 1b40bb76b9030c7eafc97aafa52ccc354e904311 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 28 Feb 2020 10:36:12 +0100 Subject: [PATCH 109/201] NEWS --- NEWS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2dcacc0be0920..6ed300daa0e8c 100644 --- a/NEWS +++ b/NEWS @@ -52,7 +52,11 @@ PHP NEWS . Fixed bug #79265 (Improper injection of Host header when using fopen for http requests). (Miguel Xavier Penha Neto) -?? ??? ????, PHP 7.4.3 +- Zip: + . Fixed bug #79315 (ZipArchive::addFile doesn't honor start/length + parameters). (Remi) + +20 Feb 2020, PHP 7.4.3 - Core: . Fixed bug #79146 (cscript can fail to run on some systems). (clarodeus) From 5b82fd491ac137723791ff31bcdc4e10de071100 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 28 Feb 2020 10:39:08 +0100 Subject: [PATCH 110/201] fix test --- ext/zip/tests/oo_addfile.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zip/tests/oo_addfile.phpt b/ext/zip/tests/oo_addfile.phpt index 84dea866142f9..a04751dcd4c74 100644 --- a/ext/zip/tests/oo_addfile.phpt +++ b/ext/zip/tests/oo_addfile.phpt @@ -34,7 +34,7 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { ])) { echo "failed\n"; } else { - echo "OK"; + echo "OK\n"; } $zip->close(); } else { From 06ac14f7f24e52af80baf5d0dbe1a9b137465837 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 12:16:41 +0100 Subject: [PATCH 111/201] Avoid duplicate calls to interface implementation handler --- Zend/zend_inheritance.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 587d4b2634991..c875427a70a55 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1531,7 +1531,9 @@ static void zend_do_implement_interfaces(zend_class_entry *ce, zend_class_entry ce->ce_flags |= ZEND_ACC_RESOLVED_INTERFACES; i = num_parent_interfaces; - for (; i < ce->num_interfaces; i++) { + /* Note that new interfaces can be added during this loop due to interface inheritance. + * Use num_interfaces rather than ce->num_interfaces to not re-process the new ones. */ + for (; i < num_interfaces; i++) { do_interface_implementation(ce, ce->interfaces[i]); } } From 30ee3f48d4046c48314ad4b6953dbaf54337fe6c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 12:47:56 +0100 Subject: [PATCH 112/201] Fixed bug #79252 --- NEWS | 4 ++++ ext/opcache/ZendAccelerator.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 6ed300daa0e8c..edafcc4171cfe 100644 --- a/NEWS +++ b/NEWS @@ -56,6 +56,10 @@ PHP NEWS . Fixed bug #79315 (ZipArchive::addFile doesn't honor start/length parameters). (Remi) +- Opcache: + . Fixed bug #79252 (preloading causes php-fpm to segfault during exit). + (Nikita) + 20 Feb 2020, PHP 7.4.3 - Core: diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index c7d73a999a929..0c8722418c7f8 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4233,9 +4233,11 @@ static void preload_load(void) EG(persistent_classes_count) = EG(class_table)->nNumUsed; } if (CG(map_ptr_last) != ZCSG(map_ptr_last)) { + size_t old_map_ptr_last = CG(map_ptr_last); CG(map_ptr_last) = ZCSG(map_ptr_last); CG(map_ptr_size) = ZEND_MM_ALIGNED_SIZE_EX(CG(map_ptr_last) + 1, 4096); CG(map_ptr_base) = perealloc(CG(map_ptr_base), CG(map_ptr_size) * sizeof(void*), 1); + memset(CG(map_ptr_base) + old_map_ptr_last, 0, (CG(map_ptr_last) - old_map_ptr_last) * sizeof(void *)); } } From 3c096b51f97e03e4cc19446d4dc937c8510d71c0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 13:19:10 +0100 Subject: [PATCH 113/201] Try to fix intermittent FPM failures Terminate only after expecting the log lines to avoid race condition. --- sapi/fpm/tests/log-bwd-msg-with-nl.phpt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapi/fpm/tests/log-bwd-msg-with-nl.phpt b/sapi/fpm/tests/log-bwd-msg-with-nl.phpt index 67a793f8a067c..0fdaf105493e6 100644 --- a/sapi/fpm/tests/log-bwd-msg-with-nl.phpt +++ b/sapi/fpm/tests/log-bwd-msg-with-nl.phpt @@ -29,10 +29,11 @@ $tester = new FPM\Tester($cfg, $code); $tester->start(); $tester->expectLogStartNotices(); $tester->request()->expectEmptyBody(); -$tester->terminate(); $tester->expectLogLine('msg 1'); $tester->expectLogLine('msg 2'); $tester->expectLogLine('msg 3'); +$tester->terminate(); +$tester->expectLogTerminatingNotices(); $tester->close(); ?> From 3ab75ac0198c8aeb05c6a9d5fb63ff737b9d8a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 26 Feb 2020 20:30:40 +0100 Subject: [PATCH 114/201] Update MySQLi function info Closes GH-5214 --- ext/mysqli/mysqli.stub.php | 4 +- ext/mysqli/mysqli_arginfo.h | 2 +- ext/opcache/Optimizer/zend_func_info.c | 122 ++++++++----------------- 3 files changed, 39 insertions(+), 89 deletions(-) diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 6df17ec47fd85..31cc7e648918b 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -91,7 +91,7 @@ public function prepare(string $query); /** @return mysqli_result|bool */ public function query(string $query, int $resultmode = MYSQLI_STORE_RESULT); - /** @return mysqli|bool */ + /** @return bool */ public function real_connect( ?string $host = null, ?string $user = null, @@ -422,7 +422,7 @@ function mysqli_real_connect( ?string $database = null, ?int $port = null, int $flags = 0 -): mysqli|bool {} +): bool {} function mysqli_real_escape_string(mysqli $mysqli_link, string $string_to_escape): string {} diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index a6abfc45ce30e..e20a7ed982911 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -480,7 +480,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_query, 0, 2, mysqli_r ZEND_ARG_TYPE_INFO(0, resultmode, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_real_connect, 0, 1, mysqli, MAY_BE_BOOL) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_real_connect, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 1) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index b57e5e65eff51..477f46adf169f 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -458,104 +458,54 @@ static const func_info_t func_infos[] = { /* ext/mysqli */ F1("mysqli_connect", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F0("mysqli_close", MAY_BE_NULL | MAY_BE_TRUE), + F0("mysqli_close", MAY_BE_TRUE), F1("mysqli_connect_error", MAY_BE_NULL | MAY_BE_STRING), - F0("mysqli_connect_errno", MAY_BE_LONG), F1("mysqli_get_client_stats", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING), - F1("mysqli_error_list", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY), - F1("mysqli_get_links_stats", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG), - F1("mysqli_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_OBJECT), - F0("mysqli_multi_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_set_charset", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), + F1("mysqli_error_list", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY), + F1("mysqli_get_links_stats", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG), + F1("mysqli_query", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_OBJECT), F1("mysqli_get_charset", MAY_BE_NULL | MAY_BE_OBJECT), - F0("mysqli_begin_transaction", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_savepoint", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_release_savepoint", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), F1("mysqli_fetch_array", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY), - F1("mysqli_fetch_assoc", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), - F1("mysqli_fetch_all", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY), - F1("mysqli_fetch_object", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F0("mysqli_free_result", MAY_BE_NULL), - F1("mysqli_affected_rows", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING), - F0("mysqli_autocommit", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_stmt_bind_param", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_stmt_bind_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_change_user", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), + F1("mysqli_fetch_assoc", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), + F1("mysqli_fetch_all", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY), + F1("mysqli_fetch_object", MAY_BE_NULL | MAY_BE_OBJECT), + F1("mysqli_affected_rows", MAY_BE_LONG | MAY_BE_STRING), F1("mysqli_character_set_name", MAY_BE_NULL | MAY_BE_STRING), - F0("mysqli_commit", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_data_seek", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_debug", MAY_BE_NULL | MAY_BE_TRUE), - F0("mysqli_dump_debug_info", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_errno", MAY_BE_NULL | MAY_BE_LONG), + F0("mysqli_debug", MAY_BE_TRUE), F1("mysqli_error", MAY_BE_NULL | MAY_BE_STRING), - F0("mysqli_stmt_execute", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_poll", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG), - F1("mysqli_reap_async_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_OBJECT), - F1("mysqli_stmt_get_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F1("mysqli_get_warnings", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F1("mysqli_stmt_error_list", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY), - F1("mysqli_stmt_get_warnings", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F0("mysqli_stmt_fetch", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F1("mysqli_fetch_field", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F1("mysqli_fetch_fields", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_OBJECT), - F1("mysqli_fetch_field_direct", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F1("mysqli_fetch_lengths", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG), - F1("mysqli_fetch_row", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY), - F0("mysqli_field_count", MAY_BE_NULL | MAY_BE_LONG), - F0("mysqli_field_seek", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_field_tell", MAY_BE_NULL | MAY_BE_LONG), - F1("mysqli_get_client_info", MAY_BE_STRING), - F0("mysqli_get_client_version", MAY_BE_LONG), - F1("mysqli_get_host_info", MAY_BE_NULL | MAY_BE_STRING), - F0("mysqli_get_proto_info", MAY_BE_NULL | MAY_BE_LONG), - F1("mysqli_get_server_info", MAY_BE_NULL | MAY_BE_STRING), - F0("mysqli_get_server_version", MAY_BE_NULL | MAY_BE_LONG), + F1("mysqli_reap_async_query", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_OBJECT), + F1("mysqli_stmt_get_result", MAY_BE_FALSE | MAY_BE_OBJECT), + F1("mysqli_get_warnings", MAY_BE_FALSE | MAY_BE_OBJECT), + F1("mysqli_stmt_error_list", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY), + F1("mysqli_stmt_get_warnings", MAY_BE_FALSE | MAY_BE_OBJECT), + F1("mysqli_fetch_field", MAY_BE_FALSE | MAY_BE_OBJECT), + F1("mysqli_fetch_fields", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_OBJECT), + F1("mysqli_fetch_field_direct", MAY_BE_FALSE | MAY_BE_OBJECT), + F1("mysqli_fetch_lengths", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG), + F1("mysqli_fetch_row", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY), + F1("mysqli_get_client_info", MAY_BE_NULL | MAY_BE_STRING), + F1("mysqli_get_host_info", MAY_BE_STRING), + F1("mysqli_get_server_info", MAY_BE_STRING), F1("mysqli_info", MAY_BE_NULL | MAY_BE_STRING), F1("mysqli_init", MAY_BE_FALSE | MAY_BE_OBJECT), - F1("mysqli_insert_id", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING), - F0("mysqli_kill", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_more_results", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_next_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_stmt_more_results", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_stmt_next_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_num_fields", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG), - F1("mysqli_num_rows", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING), - F0("mysqli_options", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_ping", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F1("mysqli_prepare", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F0("mysqli_real_connect", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_real_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F1("mysqli_real_escape_string", MAY_BE_NULL | MAY_BE_STRING), - F0("mysqli_rollback", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_stmt_send_long_data", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F1("mysqli_stmt_affected_rows", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING), - F0("mysqli_stmt_close", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), + F1("mysqli_insert_id", MAY_BE_LONG | MAY_BE_STRING), + F1("mysqli_num_rows", MAY_BE_LONG | MAY_BE_STRING), + F1("mysqli_prepare", MAY_BE_FALSE | MAY_BE_OBJECT), + F1("mysqli_real_escape_string", MAY_BE_STRING), + F1("mysqli_stmt_affected_rows", MAY_BE_LONG | MAY_BE_STRING), F0("mysqli_stmt_data_seek", MAY_BE_NULL | MAY_BE_FALSE), - F0("mysqli_stmt_field_count", MAY_BE_NULL | MAY_BE_LONG), - F0("mysqli_stmt_free_result", MAY_BE_NULL), - F1("mysqli_stmt_insert_id", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING), - F0("mysqli_stmt_param_count", MAY_BE_NULL | MAY_BE_LONG), - F0("mysqli_stmt_reset", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F1("mysqli_stmt_num_rows", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING), - F0("mysqli_select_db", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), + F1("mysqli_stmt_insert_id", MAY_BE_LONG | MAY_BE_STRING), + F1("mysqli_stmt_num_rows", MAY_BE_LONG | MAY_BE_STRING), + F0("mysqli_select_db", MAY_BE_FALSE | MAY_BE_TRUE), F1("mysqli_sqlstate", MAY_BE_NULL | MAY_BE_STRING), - F0("mysqli_ssl_set", MAY_BE_NULL | MAY_BE_TRUE), - F1("mysqli_stat", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING), - F0("mysqli_refresh", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_stmt_attr_set", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("mysqli_stmt_attr_get", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG), - F0("mysqli_stmt_errno", MAY_BE_NULL | MAY_BE_LONG), + F0("mysqli_ssl_set", MAY_BE_TRUE), + F1("mysqli_stat", MAY_BE_FALSE | MAY_BE_STRING), F1("mysqli_stmt_error", MAY_BE_NULL | MAY_BE_STRING), - F1("mysqli_stmt_init", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F0("mysqli_stmt_prepare", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F1("mysqli_stmt_result_metadata", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F0("mysqli_stmt_store_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), + F1("mysqli_stmt_init", MAY_BE_FALSE | MAY_BE_OBJECT), + F1("mysqli_stmt_result_metadata", MAY_BE_FALSE | MAY_BE_OBJECT), F1("mysqli_stmt_sqlstate", MAY_BE_NULL | MAY_BE_STRING), - F1("mysqli_store_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F0("mysqli_thread_id", MAY_BE_NULL | MAY_BE_LONG), - F0("mysqli_thread_safe", MAY_BE_FALSE | MAY_BE_TRUE), - F1("mysqli_use_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT), - F0("mysqli_warning_count", MAY_BE_NULL | MAY_BE_LONG), + F1("mysqli_store_result", MAY_BE_FALSE | MAY_BE_OBJECT), + F1("mysqli_use_result", MAY_BE_FALSE | MAY_BE_OBJECT), /* ext/curl */ F1("curl_init", MAY_BE_FALSE | MAY_BE_RESOURCE), From d70e6bdcde35c69e9d1c46324f6a3f5fa211c1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 27 Feb 2020 19:59:32 +0100 Subject: [PATCH 115/201] Add stubs for UConverter Closes GH-5218 --- ext/intl/converter/converter.c | 150 +++++++------------------ ext/intl/converter/converter.stub.php | 60 ++++++++++ ext/intl/converter/converter_arginfo.h | 69 ++++++++++++ 3 files changed, 170 insertions(+), 109 deletions(-) create mode 100644 ext/intl/converter/converter.stub.php create mode 100644 ext/intl/converter/converter_arginfo.h diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index 4d6531982609b..fa12e24cf79cb 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -13,6 +13,7 @@ */ #include "converter.h" +#include "converter_arginfo.h" #include "zend_exceptions.h" #include @@ -105,17 +106,12 @@ static void php_converter_default_callback(zval *return_value, zval *zobj, zend_ /* {{{ proto void UConverter::toUCallback(int $reason, string $source, string $codeUnits, int &$error) */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_toUCallback_arginfo, 0, ZEND_RETURN_VALUE, 4) - ZEND_ARG_INFO(0, reason) - ZEND_ARG_INFO(0, source) - ZEND_ARG_INFO(0, codeUnits) - ZEND_ARG_INFO(1, error) -ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, toUCallback) { zend_long reason; - zval *source, *codeUnits, *error; + zend_string *source, *codeUnits; + zval *error; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "lzzz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lSSz", &reason, &source, &codeUnits, &error) == FAILURE) { RETURN_THROWS(); } @@ -125,19 +121,14 @@ static PHP_METHOD(UConverter, toUCallback) { /* }}} */ /* {{{ proto void UConverter::fromUCallback(int $reason, - Array $source, int $codePoint, + array $source, int $codePoint, int &$error) */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_fromUCallback_arginfo, 0, ZEND_RETURN_VALUE, 4) - ZEND_ARG_INFO(0, reason) - ZEND_ARG_INFO(0, source) - ZEND_ARG_INFO(0, codePoint) - ZEND_ARG_INFO(1, error) -ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, fromUCallback) { zend_long reason; - zval *source, *codePoint, *error; + zval *source, *error; + zend_long codePoint; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "lzzz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lalz", &reason, &source, &codePoint, &error) == FAILURE) { RETURN_THROWS(); } @@ -413,17 +404,12 @@ static zend_bool php_converter_set_encoding(php_converter_object *objval, /* }}} */ /* {{{ php_converter_do_set_encoding */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_set_encoding_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, encoding) -ZEND_END_ARG_INFO(); static void php_converter_do_set_encoding(UConverter **pcnv, INTERNAL_FUNCTION_PARAMETERS) { php_converter_object *objval = CONV_GET(ZEND_THIS); char *enc; size_t enc_len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &enc, &enc_len) == FAILURE) { - intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "Bad arguments, " - "expected one string argument", 0); RETURN_THROWS(); } intl_errors_reset(&objval->error); @@ -447,13 +433,10 @@ static PHP_METHOD(UConverter, setDestinationEncoding) { /* }}} */ /* {{{ php_converter_do_get_encoding */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_get_encoding_arginfo, 0, ZEND_RETURN_VALUE, 0) -ZEND_END_ARG_INFO(); static void php_converter_do_get_encoding(php_converter_object *objval, UConverter *cnv, INTERNAL_FUNCTION_PARAMETERS) { const char *name; if (zend_parse_parameters_none() == FAILURE) { - intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "Expected no arguments", 0); RETURN_THROWS(); } @@ -488,14 +471,11 @@ static PHP_METHOD(UConverter, getDestinationEncoding) { /* }}} */ /* {{{ php_converter_do_get_type */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_get_type_arginfo, 0, ZEND_RETURN_VALUE, 0) -ZEND_END_ARG_INFO(); static void php_converter_do_get_type(php_converter_object *objval, UConverter *cnv, INTERNAL_FUNCTION_PARAMETERS) { UConverterType t; if (zend_parse_parameters_none() == FAILURE) { - intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "Expected no arguments", 0); - return; + RETURN_THROWS(); } intl_errors_reset(&objval->error); @@ -552,11 +532,6 @@ static void php_converter_resolve_callback(zval *zobj, /* }}} */ /* {{{ proto UConverter::__construct([string dest = 'utf-8',[string src = 'utf-8']]) */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_arginfo, 0, ZEND_RETURN_VALUE, 0) - ZEND_ARG_INFO(0, destination_encoding) - ZEND_ARG_INFO(0, source_encoding) -ZEND_END_ARG_INFO(); - static PHP_METHOD(UConverter, __construct) { php_converter_object *objval = CONV_GET(ZEND_THIS); char *src = "utf-8"; @@ -567,7 +542,7 @@ static PHP_METHOD(UConverter, __construct) { intl_error_reset(NULL); if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!s!", &dest, &dest_len, &src, &src_len) == FAILURE) { - return; + RETURN_THROWS(); } php_converter_set_encoding(objval, &(objval->src), src, src_len ); @@ -578,10 +553,6 @@ static PHP_METHOD(UConverter, __construct) { /* }}} */ /* {{{ proto bool UConverter::setSubstChars(string $chars) */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_setSubstChars_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, chars) -ZEND_END_ARG_INFO(); - static PHP_METHOD(UConverter, setSubstChars) { php_converter_object *objval = CONV_GET(ZEND_THIS); char *chars; @@ -589,7 +560,7 @@ static PHP_METHOD(UConverter, setSubstChars) { int ret = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &chars, &chars_len) == FAILURE) { - return; + RETURN_THROWS(); } intl_errors_reset(&objval->error); @@ -622,9 +593,6 @@ static PHP_METHOD(UConverter, setSubstChars) { /* }}} */ /* {{{ proto string UConverter::getSubstChars() */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_getSubstChars_arginfo, 0, ZEND_RETURN_VALUE, 0) -ZEND_END_ARG_INFO(); - static PHP_METHOD(UConverter, getSubstChars) { php_converter_object *objval = CONV_GET(ZEND_THIS); char chars[127]; @@ -632,9 +600,7 @@ static PHP_METHOD(UConverter, getSubstChars) { UErrorCode error = U_ZERO_ERROR; if (zend_parse_parameters_none() == FAILURE) { - intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, - "UConverter::getSubstChars(): expected no arguments", 0); - return; + RETURN_THROWS(); } intl_errors_reset(&objval->error); @@ -715,14 +681,11 @@ static zend_string* php_converter_do_convert(UConverter *dest_cnv, /* {{{ proto string UConverter::reasonText(int reason) */ #define UCNV_REASON_CASE(v) case (UCNV_ ## v) : RETURN_STRINGL( "REASON_" #v , sizeof( "REASON_" #v ) - 1); -ZEND_BEGIN_ARG_INFO_EX(php_converter_reasontext_arginfo, 0, ZEND_RETURN_VALUE, 0) - ZEND_ARG_INFO(0, reason) -ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, reasonText) { zend_long reason; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &reason) == FAILURE) { - return; + RETURN_THROWS(); } intl_error_reset(NULL); @@ -741,11 +704,6 @@ static PHP_METHOD(UConverter, reasonText) { /* }}} */ /* {{{ proto string UConverter::convert(string str[, bool reverse]) */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_convert_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, str) - ZEND_ARG_INFO(0, reverse) -ZEND_END_ARG_INFO(); - static PHP_METHOD(UConverter, convert) { php_converter_object *objval = CONV_GET(ZEND_THIS); char *str; @@ -755,7 +713,7 @@ static PHP_METHOD(UConverter, convert) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|b", &str, &str_len, &reverse) == FAILURE) { - return; + RETURN_THROWS(); } intl_errors_reset(&objval->error); @@ -772,13 +730,6 @@ static PHP_METHOD(UConverter, convert) { /* }}} */ /* {{{ proto string UConverter::transcode(string $str, string $toEncoding, string $fromEncoding[, Array $options = array()]) */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_transcode_arginfo, 0, ZEND_RETURN_VALUE, 3) - ZEND_ARG_INFO(0, str) - ZEND_ARG_INFO(0, toEncoding) - ZEND_ARG_INFO(0, fromEncoding) - ZEND_ARG_ARRAY_INFO(0, options, 1) -ZEND_END_ARG_INFO(); - static PHP_METHOD(UConverter, transcode) { char *str, *src, *dest; size_t str_len, src_len, dest_len; @@ -787,7 +738,7 @@ static PHP_METHOD(UConverter, transcode) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "sss|a!", &str, &str_len, &dest, &dest_len, &src, &src_len, &options) == FAILURE) { - return; + RETURN_THROWS(); } intl_error_reset(NULL); @@ -836,15 +787,11 @@ static PHP_METHOD(UConverter, transcode) { /* }}} */ /* {{{ proto int UConverter::getErrorCode() */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_geterrorcode_arginfo, 0, ZEND_RETURN_VALUE, 0) -ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, getErrorCode) { php_converter_object *objval = CONV_GET(ZEND_THIS); if (zend_parse_parameters_none() == FAILURE) { - intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, - "UConverter::getErrorCode(): expected no arguments", 0); - return; + RETURN_THROWS(); } RETURN_LONG(intl_error_get_code(&(objval->error))); @@ -852,16 +799,12 @@ static PHP_METHOD(UConverter, getErrorCode) { /* }}} */ /* {{{ proto string UConverter::getErrorMessage() */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_geterrormsg_arginfo, 0, ZEND_RETURN_VALUE, 0) -ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, getErrorMessage) { php_converter_object *objval = CONV_GET(ZEND_THIS); zend_string *message = intl_error_get_message(&(objval->error)); if (zend_parse_parameters_none() == FAILURE) { - intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, - "UConverter::getErrorMessage(): expected no arguments", 0); - return; + RETURN_THROWS(); } if (message) { @@ -873,16 +816,12 @@ static PHP_METHOD(UConverter, getErrorMessage) { /* }}} */ /* {{{ proto array UConverter::getAvailable() */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_getavailable_arginfo, 0, ZEND_RETURN_VALUE, 0) -ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, getAvailable) { int32_t i, count = ucnv_countAvailable(); if (zend_parse_parameters_none() == FAILURE) { - intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, - "UConverter::getErrorMessage(): expected no arguments", 0); - return; + RETURN_THROWS(); } intl_error_reset(NULL); @@ -895,9 +834,6 @@ static PHP_METHOD(UConverter, getAvailable) { /* }}} */ /* {{{ proto array UConverter::getAliases(string name) */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, name) -ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, getAliases) { char *name; size_t name_len; @@ -905,7 +841,7 @@ static PHP_METHOD(UConverter, getAliases) { uint16_t i, count; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { - return; + RETURN_THROWS(); } intl_error_reset(NULL); @@ -932,15 +868,11 @@ static PHP_METHOD(UConverter, getAliases) { /* }}} */ /* {{{ proto array UConverter::getStandards() */ -ZEND_BEGIN_ARG_INFO_EX(php_converter_getstandards_arginfo, 0, ZEND_RETURN_VALUE, 0) -ZEND_END_ARG_INFO(); static PHP_METHOD(UConverter, getStandards) { uint16_t i, count; if (zend_parse_parameters_none() == FAILURE) { - intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, - "UConverter::getStandards(): expected no arguments", 0); - return; + RETURN_THROWS(); } intl_error_reset(NULL); @@ -960,39 +892,39 @@ static PHP_METHOD(UConverter, getStandards) { /* }}} */ static const zend_function_entry php_converter_methods[] = { - PHP_ME(UConverter, __construct, php_converter_arginfo, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, __construct, arginfo_class_UConverter___construct, ZEND_ACC_PUBLIC) /* Encoding selection */ - PHP_ME(UConverter, setSourceEncoding, php_converter_set_encoding_arginfo, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, setDestinationEncoding, php_converter_set_encoding_arginfo, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, getSourceEncoding, php_converter_get_encoding_arginfo, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, getDestinationEncoding, php_converter_get_encoding_arginfo, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, setSourceEncoding, arginfo_class_UConverter_setSourceEncoding, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, setDestinationEncoding, arginfo_class_UConverter_setDestinationEncoding, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, getSourceEncoding, arginfo_class_UConverter_getSourceEncoding, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, getDestinationEncoding, arginfo_class_UConverter_getDestinationEncoding, ZEND_ACC_PUBLIC) /* Introspection for algorithmic converters */ - PHP_ME(UConverter, getSourceType, php_converter_get_type_arginfo, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, getDestinationType, php_converter_get_type_arginfo, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, getSourceType, arginfo_class_UConverter_getSourceType, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, getDestinationType, arginfo_class_UConverter_getDestinationType, ZEND_ACC_PUBLIC) /* Basic codeunit error handling */ - PHP_ME(UConverter, getSubstChars, php_converter_getSubstChars_arginfo, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, setSubstChars, php_converter_setSubstChars_arginfo, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, getSubstChars, arginfo_class_UConverter_getSubstChars, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, setSubstChars, arginfo_class_UConverter_setSubstChars, ZEND_ACC_PUBLIC) /* Default callback handlers */ - PHP_ME(UConverter, toUCallback, php_converter_toUCallback_arginfo, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, fromUCallback, php_converter_fromUCallback_arginfo, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, toUCallback, arginfo_class_UConverter_toUCallback, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, fromUCallback, arginfo_class_UConverter_fromUCallback, ZEND_ACC_PUBLIC) /* Core conversion workhorses */ - PHP_ME(UConverter, convert, php_converter_convert_arginfo, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, transcode, php_converter_transcode_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(UConverter, convert, arginfo_class_UConverter_convert, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, transcode, arginfo_class_UConverter_transcode, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) /* Error inspection */ - PHP_ME(UConverter, getErrorCode, php_converter_geterrorcode_arginfo, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, getErrorMessage, php_converter_geterrormsg_arginfo, ZEND_ACC_PUBLIC) - - /* Ennumeration and lookup */ - PHP_ME(UConverter, reasonText, php_converter_reasontext_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME(UConverter, getAvailable, php_converter_getavailable_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME(UConverter, getAliases, php_converter_getaliases_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME(UConverter, getStandards, php_converter_getstandards_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(UConverter, getErrorCode, arginfo_class_UConverter_getErrorCode, ZEND_ACC_PUBLIC) + PHP_ME(UConverter, getErrorMessage, arginfo_class_UConverter_getErrorMessage, ZEND_ACC_PUBLIC) + + /* Enumeration and lookup */ + PHP_ME(UConverter, reasonText, arginfo_class_UConverter_reasonText, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(UConverter, getAvailable, arginfo_class_UConverter_getAvailable, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(UConverter, getAliases, arginfo_class_UConverter_getAliases, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + PHP_ME(UConverter, getStandards, arginfo_class_UConverter_getStandards, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) PHP_FE_END }; diff --git a/ext/intl/converter/converter.stub.php b/ext/intl/converter/converter.stub.php new file mode 100644 index 0000000000000..9441e433be362 --- /dev/null +++ b/ext/intl/converter/converter.stub.php @@ -0,0 +1,60 @@ + Date: Fri, 28 Feb 2020 14:40:21 +0100 Subject: [PATCH 116/201] Fix another flaky FPM test --- sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt b/sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt index 0c152619a923c..01b00d44853b4 100644 --- a/sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt +++ b/sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt @@ -30,10 +30,11 @@ $tester = new FPM\Tester($cfg, $code); $tester->start(); $tester->expectLogStartNotices(); $tester->request()->expectEmptyBody(); -$tester->terminate(); $lines = $tester->getLogLines(2); var_dump($lines[0] === str_repeat('a', 1021) . "\0f\n"); var_dump($lines[1] === "abc\n"); +$tester->terminate(); +$tester->expectLogTerminatingNotices(); $tester->close(); ?> From a7de98fb12770191a71d353a1ebef314300adaa2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 14:48:02 +0100 Subject: [PATCH 117/201] Try to fix msvc build --- ext/opcache/ZendAccelerator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 0c8722418c7f8..758f8fc4bff51 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4237,7 +4237,8 @@ static void preload_load(void) CG(map_ptr_last) = ZCSG(map_ptr_last); CG(map_ptr_size) = ZEND_MM_ALIGNED_SIZE_EX(CG(map_ptr_last) + 1, 4096); CG(map_ptr_base) = perealloc(CG(map_ptr_base), CG(map_ptr_size) * sizeof(void*), 1); - memset(CG(map_ptr_base) + old_map_ptr_last, 0, (CG(map_ptr_last) - old_map_ptr_last) * sizeof(void *)); + memset((void **) CG(map_ptr_base) + old_map_ptr_last, 0, + (CG(map_ptr_last) - old_map_ptr_last) * sizeof(void *)); } } From 6adb885966502f53c69b9aeb0e2cbbeac3d6c65a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 28 Feb 2020 13:18:00 +0100 Subject: [PATCH 118/201] Fix #79311: enchant_dict_suggest() fails on big endian architecture For obvious reasons, we must not assign a `size_t` value to an `int` variable using memcpy(). However, there is actually no need for the intermediate `n_sugg_st` here, if we use the proper types in the first place. A regression test is not necessary, because dict_suggest.phpt already exhibits the erroneous behavior on big endian architectures. --- NEWS | 4 ++++ ext/enchant/enchant.c | 16 ++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 353f7b0a13adf..127d60c1fec33 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,10 @@ PHP NEWS cmb) . Fixed bug #79271 (DOMDocumentType::$childNodes is NULL). (cmb) +- Enchant: + . Fixed bug #79311 (enchant_dict_suggest() fails on big endian architecture). + (cmb) + - MySQLi: . Fixed bug #64032 (mysqli reports different client_version). (cmb) diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index 063b419bd3c34..a34859b28cd0a 100644 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -723,18 +723,16 @@ PHP_FUNCTION(enchant_dict_quick_check) PHP_ENCHANT_GET_DICT; if (enchant_dict_check(pdict->pdict, word, wordlen) > 0) { - int n_sugg; - size_t n_sugg_st; + size_t n_sugg; char **suggs; if (!sugg && ZEND_NUM_ARGS() == 2) { RETURN_FALSE; } - suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg_st); - memcpy(&n_sugg, &n_sugg_st, sizeof(n_sugg)); + suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg); if (suggs && n_sugg) { - int i; + size_t i; for (i = 0; i < n_sugg; i++) { add_next_index_string(sugg, suggs[i]); } @@ -776,8 +774,7 @@ PHP_FUNCTION(enchant_dict_suggest) size_t wordlen; char **suggs; enchant_dict *pdict; - int n_sugg; - size_t n_sugg_st; + size_t n_sugg; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &dict, &word, &wordlen) == FAILURE) { RETURN_FALSE; @@ -785,10 +782,9 @@ PHP_FUNCTION(enchant_dict_suggest) PHP_ENCHANT_GET_DICT; - suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg_st); - memcpy(&n_sugg, &n_sugg_st, sizeof(n_sugg)); + suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg); if (suggs && n_sugg) { - int i; + size_t i; array_init(return_value); for (i = 0; i < n_sugg; i++) { From b314603f7fd0125b275efe7c3c1a3718bdf8f709 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 15:49:00 +0100 Subject: [PATCH 119/201] Update ext maintenance ranges Also add myself as reflection maintainer. --- EXTENSIONS | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/EXTENSIONS b/EXTENSIONS index f83e0c5152801..e32c6da0df985 100644 --- a/EXTENSIONS +++ b/EXTENSIONS @@ -330,7 +330,7 @@ STATUS: Working EXTENSION: gmp PRIMARY MAINTAINER: Stanislav Malyshev (2000 - 2019) Antony Dovgal (2005 - 2010) - Nikita Popov (2013 - 2019) + Nikita Popov (2013 - 2020) MAINTENANCE: Maintained STATUS: Working SINCE: 4.0.4 @@ -379,14 +379,14 @@ STATUS: Working ------------------------------------------------------------------------------- EXTENSION: mbstring PRIMARY MAINTAINER: Rui Hirokawa (2001 - 2013) - Nikita Popov (2017 - 2019) + Nikita Popov (2017 - 2020) MAINTENANCE: Maintained STATUS: Working ------------------------------------------------------------------------------- EXTENSION: opcache PRIMARY MAINTAINER: Dmitry Stogov (2013 - 2018) Xinchen Hui (2013 - 2018) - Nikita Popov (2016 - 2019) + Nikita Popov (2016 - 2020) MAINTENANCE: Maintained STATUS: Working SINCE: 5.5.0 @@ -438,6 +438,7 @@ STATUS: Working EXTENSION: reflection PRIMARY MAINTAINER: Marcus Börger (2003 - 2009) Johannes Schlüter (2006 - 2014) + Nikita Popov (2019 - 2020) MAINTENANCE: Maintained STATUS: Working ------------------------------------------------------------------------------- @@ -503,7 +504,7 @@ STATUS: Working ------------------------------------------------------------------------------- EXTENSION: tokenizer PRIMARY MAINTAINER: Andrei Zmievski (2002 - 2002) - Nikita Popov (2013 - 2019) + Nikita Popov (2013 - 2020) MAINTENANCE: Maintained STATUS: Working ------------------------------------------------------------------------------- From 87bc99439d5cdd3465ae37f1207067fc40ab7b19 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 15:53:04 +0100 Subject: [PATCH 120/201] Fixed bug #64592 Make ReflectionClass::getMethods() behave the same ways as ReflectionClass::getProperties() by not including private methods from parent classes. --- NEWS | 2 ++ ext/reflection/php_reflection.c | 4 ++++ .../tests/ReflectionClass_getMethods_001.phpt | 16 +--------------- .../ReflectionMethod_getModifiers_basic.phpt | 6 +----- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index f9a3a46761042..632383ed70118 100644 --- a/NEWS +++ b/NEWS @@ -85,6 +85,8 @@ PHP NEWS message with traits). (villfa) . Implement ReflectionProperty::hasDefaultValue and Reflection::getDefaultValue (beberlei) + . Fixed bug #64592 (ReflectionClass::getMethods() returns methods out of + scope). (Nikita) - Session: . Fixed bug #78624 (session_gc return value for user defined session diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 101913c4940d7..628d4f30ace1c 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4056,6 +4056,10 @@ ZEND_METHOD(reflection_class, getMethod) /* {{{ _addmethod */ static void _addmethod(zend_function *mptr, zend_class_entry *ce, zval *retval, zend_long filter) { + if ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) && mptr->common.scope != ce) { + return; + } + if (mptr->common.fn_flags & filter) { zval method; reflection_method_factory(ce, mptr, NULL, &method); diff --git a/ext/reflection/tests/ReflectionClass_getMethods_001.phpt b/ext/reflection/tests/ReflectionClass_getMethods_001.phpt index 1f2ed55ffb588..4e008e8710abf 100644 --- a/ext/reflection/tests/ReflectionClass_getMethods_001.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethods_001.phpt @@ -122,19 +122,5 @@ array(2) { } } Reflecting on class subprivf: -array(2) { - [0]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(1) "f" - ["class"]=> - string(5) "privf" - } - [1]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(1) "s" - ["class"]=> - string(5) "privf" - } +array(0) { } diff --git a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt index 00c1514fd9a89..70038c31a088d 100644 --- a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt @@ -81,7 +81,7 @@ echo "ReflectionMethod::getModifiers() modifiers:\n"; printf("0x%08x\n", $a->getModifiers()); ?> ---EXPECTF-- +--EXPECT-- Modifiers for method TestClass::foo(): 0x00000001 @@ -158,10 +158,6 @@ Modifiers for method TestClass::stat(): 0x00000011 -Modifiers for method TestClass::priv(): -0x00000004 - - Modifiers for method TestClass::prot(): 0x00000002 From 5acd86df8e39fe65f98e4cc2c5fc1c59ab90f68d Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Fri, 28 Feb 2020 16:13:39 +0100 Subject: [PATCH 121/201] [RFC] Implement new DOM Living Standard APIs in ext/dom --- ext/dom/characterdata.c | 104 +++++ ext/dom/config.m4 | 2 +- ext/dom/config.w32 | 2 +- ext/dom/document.c | 46 ++ ext/dom/documentfragment.c | 46 ++ ext/dom/dom.stub.php | 31 +- ext/dom/dom_arginfo.h | 15 + ext/dom/dom_fe.h | 16 + ext/dom/dom_properties.h | 7 + ext/dom/element.c | 128 ++++++ ext/dom/node.c | 103 +++-- ext/dom/parentnode.c | 408 ++++++++++++++++++ ext/dom/php_dom.c | 68 ++- ext/dom/php_dom.h | 7 + .../tests/DOM4_ChildNode_wrong_document.phpt | 41 ++ .../tests/DOM4_DOMNode_ElementSiblings.phpt | 25 ++ ext/dom/tests/DOM4_DOMNode_after.phpt | 35 ++ ext/dom/tests/DOM4_DOMNode_after_ns.phpt | 29 ++ ext/dom/tests/DOM4_DOMNode_append_ns.phpt | 25 ++ ext/dom/tests/DOM4_DOMNode_before.phpt | 35 ++ ext/dom/tests/DOM4_DOMNode_before_ns.phpt | 29 ++ ext/dom/tests/DOM4_DOMNode_prepend_ns.phpt | 25 ++ ext/dom/tests/DOM4_DOMNode_remove.phpt | 30 ++ .../DOM4_DOMNode_removeDanglingElement.phpt | 18 + ext/dom/tests/DOM4_DOMNode_replaceWith.phpt | 27 ++ ext/dom/tests/DOM4_ParentNode.phpt | 51 +++ ext/dom/tests/DOM4_ParentNode_Fragment.phpt | 41 ++ ext/dom/tests/DOM4_ParentNode_append.phpt | 41 ++ .../DOM4_ParentNode_append_invalidtypes.phpt | 18 + ...OM4_ParentNode_append_with_attributes.phpt | 26 ++ ...DOM4_ParentNode_append_wrong_document.phpt | 33 ++ ext/dom/tests/DOM4_ParentNode_prepend.phpt | 49 +++ ext/dom/tests/bug69846.phpt | 24 +- ext/dom/tests/dom_test.inc | 18 + ext/dom/tests/domobject_debug_handler.phpt | 3 + 35 files changed, 1565 insertions(+), 41 deletions(-) create mode 100644 ext/dom/parentnode.c create mode 100644 ext/dom/tests/DOM4_ChildNode_wrong_document.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_ElementSiblings.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_after.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_after_ns.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_append_ns.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_before.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_before_ns.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_prepend_ns.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_remove.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_removeDanglingElement.phpt create mode 100644 ext/dom/tests/DOM4_DOMNode_replaceWith.phpt create mode 100644 ext/dom/tests/DOM4_ParentNode.phpt create mode 100644 ext/dom/tests/DOM4_ParentNode_Fragment.phpt create mode 100644 ext/dom/tests/DOM4_ParentNode_append.phpt create mode 100644 ext/dom/tests/DOM4_ParentNode_append_invalidtypes.phpt create mode 100644 ext/dom/tests/DOM4_ParentNode_append_with_attributes.phpt create mode 100644 ext/dom/tests/DOM4_ParentNode_append_wrong_document.phpt create mode 100644 ext/dom/tests/DOM4_ParentNode_prepend.phpt diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c index b3e91e769cc98..cff745a522a6d 100644 --- a/ext/dom/characterdata.c +++ b/ext/dom/characterdata.c @@ -37,6 +37,10 @@ const zend_function_entry php_dom_characterdata_class_functions[] = { PHP_ME(domcharacterdata, insertData, arginfo_class_DOMCharacterData_insertData, ZEND_ACC_PUBLIC) PHP_ME(domcharacterdata, deleteData, arginfo_class_DOMCharacterData_deleteData, ZEND_ACC_PUBLIC) PHP_ME(domcharacterdata, replaceData, arginfo_class_DOMCharacterData_replaceData, ZEND_ACC_PUBLIC) + PHP_ME(domcharacterdata, remove, arginfo_class_DOMChildNode_remove, ZEND_ACC_PUBLIC) + PHP_ME(domcharacterdata, after, arginfo_class_DOMChildNode_after, ZEND_ACC_PUBLIC) + PHP_ME(domcharacterdata, before, arginfo_class_DOMChildNode_before, ZEND_ACC_PUBLIC) + PHP_ME(domcharacterdata, replaceWith, arginfo_class_DOMChildNode_replaceWith, ZEND_ACC_PUBLIC) PHP_FE_END }; @@ -361,4 +365,104 @@ PHP_METHOD(domcharacterdata, replaceData) } /* }}} end dom_characterdata_replace_data */ +PHP_METHOD(domcharacterdata, remove) +{ + zval *id = ZEND_THIS; + xmlNodePtr children, child; + dom_object *intern; + int stricterror; + + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } + + DOM_GET_OBJ(child, id, xmlNodePtr, intern); + + if (dom_node_children_valid(child) == FAILURE) { + RETURN_NULL(); + } + + stricterror = dom_get_strict_error(intern->document); + + if (dom_node_is_read_only(child) == SUCCESS || + (child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) { + php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror); + RETURN_NULL(); + } + + if (!child->parent) { + php_dom_throw_error(NOT_FOUND_ERR, stricterror); + RETURN_NULL(); + } + + children = child->parent->children; + if (!children) { + php_dom_throw_error(NOT_FOUND_ERR, stricterror); + RETURN_NULL(); + } + + while (children) { + if (children == child) { + xmlUnlinkNode(child); + RETURN_NULL(); + } + children = children->next; + } + + php_dom_throw_error(NOT_FOUND_ERR, stricterror); + RETURN_NULL(); +} + +PHP_METHOD(domcharacterdata, after) +{ + int argc; + zval *args, *id; + dom_object *intern; + xmlNode *context; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) { + RETURN_THROWS(); + } + + id = ZEND_THIS; + DOM_GET_OBJ(context, id, xmlNodePtr, intern); + + dom_parent_node_after(intern, args, argc); +} + +PHP_METHOD(domcharacterdata, before) +{ + int argc; + zval *args, *id; + dom_object *intern; + xmlNode *context; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) { + RETURN_THROWS(); + } + + id = ZEND_THIS; + DOM_GET_OBJ(context, id, xmlNodePtr, intern); + + dom_parent_node_before(intern, args, argc); +} + +PHP_METHOD(domcharacterdata, replaceWith) +{ + int argc; + zval *args, *id; + dom_object *intern; + xmlNode *context; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) { + RETURN_THROWS(); + } + + id = ZEND_THIS; + DOM_GET_OBJ(context, id, xmlNodePtr, intern); + + dom_parent_node_after(intern, args, argc); + dom_child_node_remove(intern); +} + #endif diff --git a/ext/dom/config.m4 b/ext/dom/config.m4 index de3b54da4cd23..6a83d10c8e245 100644 --- a/ext/dom/config.m4 +++ b/ext/dom/config.m4 @@ -13,7 +13,7 @@ if test "$PHP_DOM" != "no"; then PHP_SETUP_LIBXML(DOM_SHARED_LIBADD, [ AC_DEFINE(HAVE_DOM,1,[ ]) PHP_NEW_EXTENSION(dom, [php_dom.c attr.c document.c \ - domexception.c \ + domexception.c parentnode.c \ processinginstruction.c cdatasection.c \ documentfragment.c domimplementation.c \ element.c node.c characterdata.c \ diff --git a/ext/dom/config.w32 b/ext/dom/config.w32 index cd5f5a6cb8737..7795445019e1a 100644 --- a/ext/dom/config.w32 +++ b/ext/dom/config.w32 @@ -8,7 +8,7 @@ if (PHP_DOM == "yes") { CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS_DOM", PHP_PHP_BUILD + "\\include\\libxml2") ) { EXTENSION("dom", "php_dom.c attr.c document.c \ - domexception.c processinginstruction.c \ + domexception.c parentnode.c processinginstruction.c \ cdatasection.c documentfragment.c domimplementation.c element.c \ node.c characterdata.c documenttype.c \ entity.c nodelist.c text.c comment.c \ diff --git a/ext/dom/document.c b/ext/dom/document.c index 2b66fccf8077a..5cb114d45cb2f 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -82,6 +82,8 @@ const zend_function_entry php_dom_document_class_functions[] = { /* {{{ */ PHP_ME(domdocument, relaxNGValidateSource, arginfo_class_DOMDocument_relaxNGValidateSource, ZEND_ACC_PUBLIC) #endif PHP_ME(domdocument, registerNodeClass, arginfo_class_DOMDocument_registerNodeClass, ZEND_ACC_PUBLIC) + PHP_ME(domdocument, append, arginfo_class_DOMParentNode_append, ZEND_ACC_PUBLIC) + PHP_ME(domdocument, prepend, arginfo_class_DOMParentNode_prepend, ZEND_ACC_PUBLIC) PHP_FE_END }; /* }}} */ @@ -2128,4 +2130,48 @@ PHP_METHOD(domdocument, registerNodeClass) } /* }}} */ +/* {{{ proto void domdocument::append(string|DOMNode ...$nodes) +URL: https://dom.spec.whatwg.org/#dom-parentnode-append +Since: DOM Living Standard (DOM4) +*/ +PHP_METHOD(domdocument, append) +{ + int argc; + zval *args, *id; + dom_object *intern; + xmlNode *context; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) { + RETURN_THROWS(); + } + + id = ZEND_THIS; + DOM_GET_OBJ(context, id, xmlNodePtr, intern); + + dom_parent_node_append(intern, args, argc); +} +/* }}} */ + +/* {{{ proto void domdocument::prepend(string|DOMNode ...$nodes) +URL: https://dom.spec.whatwg.org/#dom-parentnode-prepend +Since: DOM Living Standard (DOM4) +*/ +PHP_METHOD(domdocument, prepend) +{ + int argc; + zval *args, *id; + dom_object *intern; + xmlNode *context; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) { + RETURN_THROWS(); + } + + id = ZEND_THIS; + DOM_GET_OBJ(context, id, xmlNodePtr, intern); + + dom_parent_node_prepend(intern, args, argc); +} +/* }}} */ + #endif /* HAVE_LIBXML && HAVE_DOM */ diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index d0f44a7d8f8ef..d6e1060d349d5 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -34,6 +34,8 @@ const zend_function_entry php_dom_documentfragment_class_functions[] = { PHP_ME(domdocumentfragment, __construct, arginfo_class_DOMDocumentFragment___construct, ZEND_ACC_PUBLIC) PHP_ME(domdocumentfragment, appendXML, arginfo_class_DOMDocumentFragment_appendXML, ZEND_ACC_PUBLIC) + PHP_ME(domdocumentfragment, append, arginfo_class_DOMParentNode_append, ZEND_ACC_PUBLIC) + PHP_ME(domdocumentfragment, prepend, arginfo_class_DOMParentNode_prepend, ZEND_ACC_PUBLIC) PHP_FE_END }; @@ -137,4 +139,48 @@ PHP_METHOD(domdocumentfragment, appendXML) { } /* }}} */ +/* {{{ proto void domdocumentfragment::append(string|DOMNode ...$nodes) +URL: https://dom.spec.whatwg.org/#dom-parentnode-append +Since: DOM Living Standard (DOM4) +*/ +PHP_METHOD(domdocumentfragment, append) +{ + int argc; + zval *args, *id; + dom_object *intern; + xmlNode *context; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) { + RETURN_THROWS(); + } + + id = ZEND_THIS; + DOM_GET_OBJ(context, id, xmlNodePtr, intern); + + dom_parent_node_append(intern, args, argc); +} +/* }}} */ + +/* {{{ proto void domdocumentfragment::prepend(string|DOMNode ...$nodes) +URL: https://dom.spec.whatwg.org/#dom-parentnode-prepend +Since: DOM Living Standard (DOM4) +*/ +PHP_METHOD(domdocumentfragment, prepend) +{ + int argc; + zval *args, *id; + dom_object *intern; + xmlNode *context; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) { + RETURN_THROWS(); + } + + id = ZEND_THIS; + DOM_GET_OBJ(context, id, xmlNodePtr, intern); + + dom_parent_node_prepend(intern, args, argc); +} +/* }}} */ + #endif diff --git a/ext/dom/dom.stub.php b/ext/dom/dom.stub.php index d88fb7f4c4908..e87c2917c9e7a 100644 --- a/ext/dom/dom.stub.php +++ b/ext/dom/dom.stub.php @@ -1,5 +1,28 @@ type == XML_ELEMENT_NODE) { - /* Following if block primarily used for inserting nodes created via createElementNS */ - if (nodep->nsDef != NULL) { - curns = nodep->nsDef; - while (curns) { - nsdftptr = curns->next; - if (curns->href != NULL) { - if((nsptr = xmlSearchNsByHref(doc, nodep->parent, curns->href)) && - (curns->prefix == NULL || xmlStrEqual(nsptr->prefix, curns->prefix))) { - curns->next = NULL; - if (prevns == NULL) { - nodep->nsDef = nsdftptr; - } else { - prevns->next = nsdftptr; - } - dom_set_old_ns(doc, curns); - curns = prevns; - } - } - prevns = curns; - curns = nsdftptr; - } - } - xmlReconciliateNs(doc, nodep); - } -} +const zend_function_entry php_dom_child_node_class_functions[] = { /* {{{ */ + PHP_ABSTRACT_ME(DOMChildNode, remove, arginfo_class_DOMChildNode_remove) + PHP_ABSTRACT_ME(DOMChildNode, after, arginfo_class_DOMChildNode_after) + PHP_ABSTRACT_ME(DOMChildNode, before, arginfo_class_DOMChildNode_before) + PHP_FE_END +}; /* }}} */ /* {{{ nodeName string @@ -333,7 +309,6 @@ int dom_node_child_nodes_read(dom_object *obj, zval *retval) return SUCCESS; } - /* }}} */ /* {{{ firstChild DomNode @@ -454,6 +429,72 @@ int dom_node_next_sibling_read(dom_object *obj, zval *retval) /* }}} */ +/* {{{ previousElementSibling DomNode +readonly=yes +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-640FB3C8 +Since: +*/ +int dom_node_previous_element_sibling_read(dom_object *obj, zval *retval) +{ + xmlNode *nodep, *prevsib; + + nodep = dom_object_get_node(obj); + + if (nodep == NULL) { + php_dom_throw_error(INVALID_STATE_ERR, 0); + return FAILURE; + } + + prevsib = nodep->prev; + + while (prevsib && prevsib->type != XML_ELEMENT_NODE) { + prevsib = prevsib->prev; + } + + if (!prevsib) { + ZVAL_NULL(retval); + return SUCCESS; + } + + php_dom_create_object(prevsib, retval, obj); + return SUCCESS; +} + +/* }}} */ + +/* {{{ nextElementSibling DomNode +readonly=yes +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6AC54C2F +Since: +*/ +int dom_node_next_element_sibling_read(dom_object *obj, zval *retval) +{ + xmlNode *nodep, *nextsib; + + nodep = dom_object_get_node(obj); + + if (nodep == NULL) { + php_dom_throw_error(INVALID_STATE_ERR, 0); + return FAILURE; + } + + nextsib = nodep->next; + + while (nextsib != NULL && nextsib->type != XML_ELEMENT_NODE) { + nextsib = nextsib->next; + } + + if (!nextsib) { + ZVAL_NULL(retval); + return SUCCESS; + } + + php_dom_create_object(nextsib, retval, obj); + return SUCCESS; +} + +/* }}} */ + /* {{{ attributes DomNamedNodeMap readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-84CF096 diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c new file mode 100644 index 0000000000000..109b74d162f3f --- /dev/null +++ b/ext/dom/parentnode.c @@ -0,0 +1,408 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 7 | + +----------------------------------------------------------------------+ + | Copyright (c) The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Benjamin Eberlei | + +----------------------------------------------------------------------+ +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#if HAVE_LIBXML && HAVE_DOM +#include "php_dom.h" +#include "dom_arginfo.h" + + +/* {{{ DOMParentNode methods */ +const zend_function_entry php_dom_parent_node_class_functions[] = { /* {{{ */ + PHP_ABSTRACT_ME(DOMParentNode, append, arginfo_class_DOMParentNode_append) + PHP_ABSTRACT_ME(DOMParentNode, prepend, arginfo_class_DOMParentNode_prepend) + PHP_FE_END +}; +/* }}} */ + +/* {{{ firstElementChild DomParentNode +readonly=yes +URL: https://www.w3.org/TR/dom/#dom-parentnode-firstelementchild +*/ +int dom_parent_node_first_element_child_read(dom_object *obj, zval *retval) +{ + xmlNode *nodep, *first = NULL; + + nodep = dom_object_get_node(obj); + + if (nodep == NULL) { + php_dom_throw_error(INVALID_STATE_ERR, 0); + return FAILURE; + } + + if (dom_node_children_valid(nodep) == SUCCESS) { + first = nodep->children; + + while (first && first->type != XML_ELEMENT_NODE) { + first = first->next; + } + } + + if (!first) { + ZVAL_NULL(retval); + return SUCCESS; + } + + php_dom_create_object(first, retval, obj); + return SUCCESS; +} +/* }}} */ + +/* {{{ lastElementChild DomParentNode +readonly=yes +URL: https://www.w3.org/TR/dom/#dom-parentnode-lastelementchild +*/ +int dom_parent_node_last_element_child_read(dom_object *obj, zval *retval) +{ + xmlNode *nodep, *last = NULL; + + nodep = dom_object_get_node(obj); + + if (nodep == NULL) { + php_dom_throw_error(INVALID_STATE_ERR, 0); + return FAILURE; + } + + if (dom_node_children_valid(nodep) == SUCCESS) { + last = nodep->last; + + while (last && last->type != XML_ELEMENT_NODE) { + last = last->prev; + } + } + + if (!last) { + ZVAL_NULL(retval); + return SUCCESS; + } + + php_dom_create_object(last, retval, obj); + return SUCCESS; +} +/* }}} */ + +/* {{{ childElementCount DomParentNode +readonly=yes +https://www.w3.org/TR/dom/#dom-parentnode-childelementcount +*/ +int dom_parent_node_child_element_count(dom_object *obj, zval *retval) +{ + xmlNode *nodep, *first = NULL; + zend_long count = 0; + + nodep = dom_object_get_node(obj); + + if (nodep == NULL) { + php_dom_throw_error(INVALID_STATE_ERR, 0); + return FAILURE; + } + + if (dom_node_children_valid(nodep) == SUCCESS) { + first = nodep->children; + + while (first != NULL) { + if (first->type == XML_ELEMENT_NODE) { + count++; + } + + first = first->next; + } + } + + ZVAL_LONG(retval, count); + + return SUCCESS; +} +/* }}} */ + +xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNode, zval *nodes, int nodesc) +{ + int i; + xmlDoc *documentNode; + xmlNode *fragment; + xmlNode *newNode; + zend_class_entry *ce; + dom_object *newNodeObj; + int stricterror; + + if (contextNode->type == XML_DOCUMENT_NODE || contextNode->type == XML_HTML_DOCUMENT_NODE) { + documentNode = (xmlDoc *) contextNode; + } else { + documentNode = contextNode->doc; + } + + fragment = xmlNewDocFragment(documentNode); + + if (!fragment) { + return NULL; + } + + stricterror = dom_get_strict_error(document); + + for (i = 0; i < nodesc; i++) { + if (Z_TYPE(nodes[i]) == IS_OBJECT) { + ce = Z_OBJCE(nodes[i]); + + if (instanceof_function(ce, dom_node_class_entry)) { + newNodeObj = Z_DOMOBJ_P(&nodes[i]); + newNode = dom_object_get_node(newNodeObj); + + if (newNode->doc != documentNode) { + php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror); + return NULL; + } + + if (newNode->parent != NULL) { + xmlUnlinkNode(newNode); + } + + newNodeObj->document = document; + xmlSetTreeDoc(newNode, documentNode); + + if (!xmlAddChild(fragment, newNode)) { + xmlFree(fragment); + + php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); + return NULL; + } + + continue; + } else { + xmlFree(fragment); + + zend_type_error("Invalid argument type must be either DOMNode or string"); + return NULL; + } + } else if (Z_TYPE(nodes[i]) == IS_STRING) { + newNode = xmlNewDocText(documentNode, (xmlChar *) Z_STRVAL(nodes[i])); + + xmlSetTreeDoc(newNode, documentNode); + + if (!xmlAddChild(fragment, newNode)) { + xmlFree(fragment); + + return NULL; + } + } else { + xmlFree(fragment); + + zend_type_error("Invalid argument type must be either DOMNode or string"); + + return NULL; + } + } + + return fragment; +} + +static void dom_fragment_assign_parent_node(xmlNodePtr parentNode, xmlNodePtr fragment) +{ + xmlNodePtr node = fragment->children; + + while (node != NULL) { + node->parent = parentNode; + + if (node == fragment->last) { + break; + } + node = node->next; + } + + fragment->children = NULL; + fragment->last = NULL; +} + +void dom_parent_node_append(dom_object *context, zval *nodes, int nodesc) +{ + xmlNode *parentNode = dom_object_get_node(context); + xmlNodePtr newchild, prevsib; + xmlNode *fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); + + if (fragment == NULL) { + return; + } + + newchild = fragment->children; + prevsib = parentNode->last; + + if (newchild) { + if (prevsib != NULL) { + prevsib->next = newchild; + } else { + parentNode->children = newchild; + } + + parentNode->last = fragment->last; + + newchild->prev = prevsib; + + dom_fragment_assign_parent_node(parentNode, fragment); + + dom_reconcile_ns(parentNode->doc, newchild); + } + + xmlFree(fragment); +} + +void dom_parent_node_prepend(dom_object *context, zval *nodes, int nodesc) +{ + xmlNode *parentNode = dom_object_get_node(context); + + if (parentNode->children == NULL) { + dom_parent_node_append(context, nodes, nodesc); + return; + } + + xmlNodePtr newchild, nextsib; + xmlNode *fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); + + if (fragment == NULL) { + return; + } + + newchild = fragment->children; + nextsib = parentNode->children; + + if (newchild) { + parentNode->children = newchild; + fragment->last->next = nextsib; + nextsib->prev = fragment->last; + + dom_fragment_assign_parent_node(parentNode, fragment); + + dom_reconcile_ns(parentNode->doc, newchild); + } + + xmlFree(fragment); +} + +void dom_parent_node_after(dom_object *context, zval *nodes, int nodesc) +{ + xmlNode *prevsib = dom_object_get_node(context); + xmlNodePtr newchild, parentNode; + xmlNode *fragment; + + int stricterror = dom_get_strict_error(context->document); + + if (!prevsib->parent) { + php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror); + return; + } + + parentNode = prevsib->parent; + fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); + + if (fragment == NULL) { + return; + } + + newchild = fragment->children; + + if (newchild) { + fragment->last->next = prevsib->next; + prevsib->next = newchild; + + newchild->prev = prevsib; + + dom_fragment_assign_parent_node(parentNode, fragment); + dom_reconcile_ns(prevsib->doc, newchild); + } + + xmlFree(fragment); +} + +void dom_parent_node_before(dom_object *context, zval *nodes, int nodesc) +{ + xmlNode *nextsib = dom_object_get_node(context); + xmlNodePtr newchild, prevsib, parentNode; + xmlNode *fragment; + + prevsib = nextsib->prev; + parentNode = nextsib->parent; + fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); + + if (fragment == NULL) { + return; + } + + newchild = fragment->children; + + if (newchild) { + if (parentNode->children == nextsib) { + parentNode->children = newchild; + } else { + prevsib->next = newchild; + } + fragment->last->next = nextsib; + nextsib->prev = fragment->last; + + newchild->prev = prevsib; + + dom_fragment_assign_parent_node(parentNode, fragment); + + dom_reconcile_ns(nextsib->doc, newchild); + } + + xmlFree(fragment); +} + +void dom_child_node_remove(dom_object *context) +{ + xmlNode *child = dom_object_get_node(context); + xmlNodePtr children; + int stricterror; + + if (dom_node_children_valid(child) == FAILURE) { + return; + } + + stricterror = dom_get_strict_error(context->document); + + if (dom_node_is_read_only(child) == SUCCESS || + (child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) { + php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror); + return; + } + + if (!child->parent) { + php_dom_throw_error(NOT_FOUND_ERR, stricterror); + return; + } + + children = child->parent->children; + if (!children) { + php_dom_throw_error(NOT_FOUND_ERR, stricterror); + return; + } + + while (children) { + if (children == child) { + xmlUnlinkNode(child); + return; + } + children = children->next; + } + + php_dom_throw_error(NOT_FOUND_ERR, stricterror); +} + +#endif diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 98c4e703c5bd1..dae52faeeb9bc 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -35,6 +35,8 @@ /* {{{ class entries */ PHP_DOM_EXPORT zend_class_entry *dom_node_class_entry; PHP_DOM_EXPORT zend_class_entry *dom_domexception_class_entry; +PHP_DOM_EXPORT zend_class_entry *dom_parentnode_class_entry; +PHP_DOM_EXPORT zend_class_entry *dom_childnode_class_entry; PHP_DOM_EXPORT zend_class_entry *dom_domimplementation_class_entry; PHP_DOM_EXPORT zend_class_entry *dom_documentfragment_class_entry; PHP_DOM_EXPORT zend_class_entry *dom_document_class_entry; @@ -66,6 +68,7 @@ zend_object_handlers dom_xpath_object_handlers; static HashTable classes; /* {{{ prop handler tables */ static HashTable dom_document_prop_handlers; +static HashTable dom_documentfragment_prop_handlers; static HashTable dom_node_prop_handlers; static HashTable dom_nodelist_prop_handlers; static HashTable dom_namednodemap_prop_handlers; @@ -585,6 +588,12 @@ PHP_MINIT_FUNCTION(dom) dom_domexception_class_entry->ce_flags |= ZEND_ACC_FINAL; zend_declare_property_long(dom_domexception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PUBLIC); + INIT_CLASS_ENTRY(ce, "DOMParentNode", php_dom_parent_node_class_functions); + dom_parentnode_class_entry = zend_register_internal_interface(&ce); + + INIT_CLASS_ENTRY(ce, "DOMChildNode", php_dom_child_node_class_functions); + dom_childnode_class_entry = zend_register_internal_interface(&ce); + REGISTER_DOM_CLASS(ce, "DOMImplementation", NULL, php_dom_domimplementation_class_functions, dom_domimplementation_class_entry); REGISTER_DOM_CLASS(ce, "DOMNode", NULL, php_dom_node_class_functions, dom_node_class_entry); @@ -622,7 +631,15 @@ PHP_MINIT_FUNCTION(dom) zend_hash_add_ptr(&classes, ce.name, &dom_namespace_node_prop_handlers); REGISTER_DOM_CLASS(ce, "DOMDocumentFragment", dom_node_class_entry, php_dom_documentfragment_class_functions, dom_documentfragment_class_entry); - zend_hash_add_ptr(&classes, ce.name, &dom_node_prop_handlers); + zend_hash_init(&dom_documentfragment_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); + + dom_register_prop_handler(&dom_documentfragment_prop_handlers, "firstElementChild", sizeof("firstElementChild")-1, dom_parent_node_first_element_child_read, NULL); + dom_register_prop_handler(&dom_documentfragment_prop_handlers, "lastElementChild", sizeof("lastElementChild")-1, dom_parent_node_last_element_child_read, NULL); + dom_register_prop_handler(&dom_documentfragment_prop_handlers, "childElementCount", sizeof("childElementCount")-1, dom_parent_node_child_element_count, NULL); + + zend_hash_merge(&dom_documentfragment_prop_handlers, &dom_node_prop_handlers, dom_copy_prop_handler, 0); + zend_hash_add_ptr(&classes, ce.name, &dom_documentfragment_prop_handlers); + zend_class_implements(dom_documentfragment_class_entry, 1, dom_parentnode_class_entry); REGISTER_DOM_CLASS(ce, "DOMDocument", dom_node_class_entry, php_dom_document_class_functions, dom_document_class_entry); zend_hash_init(&dom_document_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); @@ -646,8 +663,13 @@ PHP_MINIT_FUNCTION(dom) dom_register_prop_handler(&dom_document_prop_handlers, "recover", sizeof("recover")-1, dom_document_recover_read, dom_document_recover_write); dom_register_prop_handler(&dom_document_prop_handlers, "substituteEntities", sizeof("substituteEntities")-1, dom_document_substitue_entities_read, dom_document_substitue_entities_write); + dom_register_prop_handler(&dom_document_prop_handlers, "firstElementChild", sizeof("firstElementChild")-1, dom_parent_node_first_element_child_read, NULL); + dom_register_prop_handler(&dom_document_prop_handlers, "lastElementChild", sizeof("lastElementChild")-1, dom_parent_node_last_element_child_read, NULL); + dom_register_prop_handler(&dom_document_prop_handlers, "childElementCount", sizeof("childElementCount")-1, dom_parent_node_child_element_count, NULL); + zend_hash_merge(&dom_document_prop_handlers, &dom_node_prop_handlers, dom_copy_prop_handler, 0); zend_hash_add_ptr(&classes, ce.name, &dom_document_prop_handlers); + zend_class_implements(dom_document_class_entry, 1, dom_parentnode_class_entry); INIT_CLASS_ENTRY(ce, "DOMNodeList", php_dom_nodelist_class_functions); ce.create_object = dom_nnodemap_objects_new; @@ -674,9 +696,13 @@ PHP_MINIT_FUNCTION(dom) zend_hash_init(&dom_characterdata_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_characterdata_prop_handlers, "data", sizeof("data")-1, dom_characterdata_data_read, dom_characterdata_data_write); dom_register_prop_handler(&dom_characterdata_prop_handlers, "length", sizeof("length")-1, dom_characterdata_length_read, NULL); + dom_register_prop_handler(&dom_characterdata_prop_handlers, "previousElementSibling", sizeof("previousElementSibling")-1, dom_node_previous_element_sibling_read, NULL); + dom_register_prop_handler(&dom_characterdata_prop_handlers, "nextElementSibling", sizeof("nextElementSibling")-1, dom_node_next_element_sibling_read, NULL); zend_hash_merge(&dom_characterdata_prop_handlers, &dom_node_prop_handlers, dom_copy_prop_handler, 0); zend_hash_add_ptr(&classes, ce.name, &dom_characterdata_prop_handlers); + zend_class_implements(dom_characterdata_class_entry, 1, dom_childnode_class_entry); + REGISTER_DOM_CLASS(ce, "DOMAttr", dom_node_class_entry, php_dom_attr_class_functions, dom_attr_class_entry); zend_hash_init(&dom_attr_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); @@ -693,9 +719,16 @@ PHP_MINIT_FUNCTION(dom) zend_hash_init(&dom_element_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_element_prop_handlers, "tagName", sizeof("tagName")-1, dom_element_tag_name_read, NULL); dom_register_prop_handler(&dom_element_prop_handlers, "schemaTypeInfo", sizeof("schemaTypeInfo")-1, dom_element_schema_type_info_read, NULL); + dom_register_prop_handler(&dom_element_prop_handlers, "firstElementChild", sizeof("firstElementChild")-1, dom_parent_node_first_element_child_read, NULL); + dom_register_prop_handler(&dom_element_prop_handlers, "lastElementChild", sizeof("lastElementChild")-1, dom_parent_node_last_element_child_read, NULL); + dom_register_prop_handler(&dom_element_prop_handlers, "childElementCount", sizeof("childElementCount")-1, dom_parent_node_child_element_count, NULL); + dom_register_prop_handler(&dom_element_prop_handlers, "previousElementSibling", sizeof("previousElementSibling")-1, dom_node_previous_element_sibling_read, NULL); + dom_register_prop_handler(&dom_element_prop_handlers, "nextElementSibling", sizeof("nextElementSibling")-1, dom_node_next_element_sibling_read, NULL); zend_hash_merge(&dom_element_prop_handlers, &dom_node_prop_handlers, dom_copy_prop_handler, 0); zend_hash_add_ptr(&classes, ce.name, &dom_element_prop_handlers); + zend_class_implements(dom_element_class_entry, 2, dom_parentnode_class_entry, dom_childnode_class_entry); + REGISTER_DOM_CLASS(ce, "DOMText", dom_characterdata_class_entry, php_dom_text_class_functions, dom_text_class_entry); zend_hash_init(&dom_text_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); @@ -851,6 +884,7 @@ PHP_MINFO_FUNCTION(dom) PHP_MSHUTDOWN_FUNCTION(dom) /* {{{ */ { zend_hash_destroy(&dom_document_prop_handlers); + zend_hash_destroy(&dom_documentfragment_prop_handlers); zend_hash_destroy(&dom_node_prop_handlers); zend_hash_destroy(&dom_namespace_node_prop_handlers); zend_hash_destroy(&dom_nodelist_prop_handlers); @@ -1344,6 +1378,38 @@ void dom_set_old_ns(xmlDoc *doc, xmlNs *ns) { } /* }}} end dom_set_old_ns */ +void dom_reconcile_ns(xmlDocPtr doc, xmlNodePtr nodep) /* {{{ */ +{ + xmlNsPtr nsptr, nsdftptr, curns, prevns = NULL; + + if (nodep->type == XML_ELEMENT_NODE) { + /* Following if block primarily used for inserting nodes created via createElementNS */ + if (nodep->nsDef != NULL) { + curns = nodep->nsDef; + while (curns) { + nsdftptr = curns->next; + if (curns->href != NULL) { + if((nsptr = xmlSearchNsByHref(doc, nodep->parent, curns->href)) && + (curns->prefix == NULL || xmlStrEqual(nsptr->prefix, curns->prefix))) { + curns->next = NULL; + if (prevns == NULL) { + nodep->nsDef = nsdftptr; + } else { + prevns->next = nsdftptr; + } + dom_set_old_ns(doc, curns); + curns = prevns; + } + } + prevns = curns; + curns = nsdftptr; + } + } + xmlReconciliateNs(doc, nodep); + } +} +/* }}} */ + /* http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-DocCrElNS diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index 6d9eaef46d598..e1058e849b74c 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -109,6 +109,7 @@ void node_list_unlink(xmlNodePtr node); int dom_check_qname(char *qname, char **localname, char **prefix, int uri_len, int name_len); xmlNsPtr dom_get_ns(xmlNodePtr node, char *uri, int *errorcode, char *prefix); void dom_set_old_ns(xmlDoc *doc, xmlNs *ns); +void dom_reconcile_ns(xmlDocPtr doc, xmlNodePtr nodep); xmlNsPtr dom_get_nsdecl(xmlNode *node, xmlChar *localName); void dom_normalize (xmlNodePtr nodep); xmlNode *dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *local, int *cur, int index); @@ -125,6 +126,12 @@ xmlNode *php_dom_libxml_notation_iter(xmlHashTable *ht, int index); zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object, int by_ref); void dom_set_doc_classmap(php_libxml_ref_obj *document, zend_class_entry *basece, zend_class_entry *ce); +void dom_parent_node_prepend(dom_object *context, zval *nodes, int nodesc); +void dom_parent_node_append(dom_object *context, zval *nodes, int nodesc); +void dom_parent_node_after(dom_object *context, zval *nodes, int nodesc); +void dom_parent_node_before(dom_object *context, zval *nodes, int nodesc); +void dom_child_node_remove(dom_object *context); + #define REGISTER_DOM_CLASS(ce, name, parent_ce, funcs, entry) \ INIT_CLASS_ENTRY(ce, name, funcs); \ ce.create_object = dom_objects_new; \ diff --git a/ext/dom/tests/DOM4_ChildNode_wrong_document.phpt b/ext/dom/tests/DOM4_ChildNode_wrong_document.phpt new file mode 100644 index 0000000000000..dc16cc158fc5f --- /dev/null +++ b/ext/dom/tests/DOM4_ChildNode_wrong_document.phpt @@ -0,0 +1,41 @@ +--TEST-- +DOMChildNode::after(), before, replaceWith with DOMNode from wrong document throws exception +--SKIPIF-- + +--FILE-- +loadXML(''); + +$dom2 = new DOMDocument; +$dom2->loadXML(''); + +$element = $dom1->documentElement; + +try { + $element->after($dom2->documentElement->firstChild); + echo "FAIL"; +} catch (DOMException $e) { + echo $e->getMessage() . "\n"; +} + +try { + $element->before($dom2->documentElement->firstChild); + echo "FAIL"; +} catch (DOMException $e) { + echo $e->getMessage() . "\n"; +} + +try { + $element->replaceWith($dom2->documentElement->firstChild); + echo "FAIL"; +} catch (DOMException $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +Wrong Document Error +Wrong Document Error +Wrong Document Error diff --git a/ext/dom/tests/DOM4_DOMNode_ElementSiblings.phpt b/ext/dom/tests/DOM4_DOMNode_ElementSiblings.phpt new file mode 100644 index 0000000000000..8a27837cf6430 --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_ElementSiblings.phpt @@ -0,0 +1,25 @@ +--TEST-- +DOMNode: Element Siblings +--SKIPIF-- + +--FILE-- +loadXML('fooFirstElementLastElementbar'); + +$element = $dom->documentElement; +print_node($element->firstElementChild->nextElementSibling); +print_node($element->lastElementChild->previousElementSibling); +?> +--EXPECT-- +Node Name: bar +Node Type: 1 +Num Children: 1 +Node Content: LastElement + +Node Name: bar +Node Type: 1 +Num Children: 1 +Node Content: FirstElement diff --git a/ext/dom/tests/DOM4_DOMNode_after.phpt b/ext/dom/tests/DOM4_DOMNode_after.phpt new file mode 100644 index 0000000000000..c53fdba972fa8 --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_after.phpt @@ -0,0 +1,35 @@ +--TEST-- +DOMNode::after() +--SKIPIF-- + +--FILE-- +loadXML('firstsecond'); + +$element = $dom->documentElement->firstElementChild; +$secondMark = $dom->documentElement->lastElementChild; + +$element->after( + 'text inserted after', + $dom->createElement('inserted-after', 'content') +); + +$secondMark->after('text inserted after second'); + +print_node_list_compact($dom->documentElement->childNodes); +?> +--EXPECT-- + + first + +text inserted after + + content + + + second + +text inserted after second diff --git a/ext/dom/tests/DOM4_DOMNode_after_ns.phpt b/ext/dom/tests/DOM4_DOMNode_after_ns.phpt new file mode 100644 index 0000000000000..0b28846a568d9 --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_after_ns.phpt @@ -0,0 +1,29 @@ +--TEST-- +DOMNode::after() with namespace +--SKIPIF-- + +--FILE-- +formatOutput = true; + +$root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element'); +$doc->appendChild($root); +$root->setAttributeNS('http://www.w3.org/2000/xmlns/' ,'xmlns:g', 'http://base.google.com/ns/1.0'); + +$item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house'); +$root->append($item); + +$item2 = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'street'); +$item->after($item2); + +echo $doc->saveXML(), "\n"; +?> +--EXPECT-- + + + house + street + diff --git a/ext/dom/tests/DOM4_DOMNode_append_ns.phpt b/ext/dom/tests/DOM4_DOMNode_append_ns.phpt new file mode 100644 index 0000000000000..936addb1fa701 --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_append_ns.phpt @@ -0,0 +1,25 @@ +--TEST-- +DOMNode::append() with namespace +--SKIPIF-- + +--FILE-- +formatOutput = true; + +$root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element'); +$doc->appendChild($root); +$root->setAttributeNS('http://www.w3.org/2000/xmlns/' ,'xmlns:g', 'http://base.google.com/ns/1.0'); + +$item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house'); +$root->append($item); + +echo $doc->saveXML(), "\n"; +?> +--EXPECT-- + + + house + diff --git a/ext/dom/tests/DOM4_DOMNode_before.phpt b/ext/dom/tests/DOM4_DOMNode_before.phpt new file mode 100644 index 0000000000000..b3806aff2eafc --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_before.phpt @@ -0,0 +1,35 @@ +--TEST-- +DOMNode::before() +--SKIPIF-- + +--FILE-- +loadXML('firstsecond'); + +$element = $dom->documentElement->firstElementChild; +$secondMark = $dom->documentElement->lastElementChild; + +$element->before( + $dom->createElement('inserted-before', 'content'), + 'text inserted before' +); + +$secondMark->before('text inserted before second'); + +print_node_list_compact($dom->documentElement->childNodes); +?> +--EXPECT-- + + content + +text inserted before + + first + +text inserted before second + + second + diff --git a/ext/dom/tests/DOM4_DOMNode_before_ns.phpt b/ext/dom/tests/DOM4_DOMNode_before_ns.phpt new file mode 100644 index 0000000000000..6ff2ca7729a35 --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_before_ns.phpt @@ -0,0 +1,29 @@ +--TEST-- +DOMNode::before() with namespace +--SKIPIF-- + +--FILE-- +formatOutput = true; + +$root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element'); +$doc->appendChild($root); +$root->setAttributeNS('http://www.w3.org/2000/xmlns/' ,'xmlns:g', 'http://base.google.com/ns/1.0'); + +$item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house'); +$root->append($item); + +$item2 = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'street'); +$item->before($item2); + +echo $doc->saveXML(), "\n"; +?> +--EXPECT-- + + + street + house + diff --git a/ext/dom/tests/DOM4_DOMNode_prepend_ns.phpt b/ext/dom/tests/DOM4_DOMNode_prepend_ns.phpt new file mode 100644 index 0000000000000..c31cb6fa77695 --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_prepend_ns.phpt @@ -0,0 +1,25 @@ +--TEST-- +DOMNode::prepend() with namespace +--SKIPIF-- + +--FILE-- +formatOutput = true; + +$root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element'); +$doc->appendChild($root); +$root->setAttributeNS('http://www.w3.org/2000/xmlns/' ,'xmlns:g', 'http://base.google.com/ns/1.0'); + +$item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house'); +$root->prepend($item); + +echo $doc->saveXML(), "\n"; +?> +--EXPECT-- + + + house + diff --git a/ext/dom/tests/DOM4_DOMNode_remove.phpt b/ext/dom/tests/DOM4_DOMNode_remove.phpt new file mode 100644 index 0000000000000..8eb160953134d --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_remove.phpt @@ -0,0 +1,30 @@ +--TEST-- +DOMNode::remove() +--SKIPIF-- + +--FILE-- +loadXML('firstsecond'); + +$element = $dom->documentElement; +print_node($element->firstChild); +$returnValue = $element->firstChild->remove(); +print_node($element->firstChild); +var_dump($returnValue); +?> +--EXPECT-- +Node Name: one +Node Type: 1 +Num Children: 1 +Node Content: first + +Node Name: two +Node Type: 1 +Num Children: 1 +Node Content: second + +NULL + diff --git a/ext/dom/tests/DOM4_DOMNode_removeDanglingElement.phpt b/ext/dom/tests/DOM4_DOMNode_removeDanglingElement.phpt new file mode 100644 index 0000000000000..ceedac4084861 --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_removeDanglingElement.phpt @@ -0,0 +1,18 @@ +--TEST-- +DOMNode::remove() dangling element +--SKIPIF-- + +--FILE-- +createElement('test'); + +try { + $element->remove(); +} catch (DOMException $e) { + echo $e->getMessage(); +} +--EXPECT-- +Not Found Error diff --git a/ext/dom/tests/DOM4_DOMNode_replaceWith.phpt b/ext/dom/tests/DOM4_DOMNode_replaceWith.phpt new file mode 100644 index 0000000000000..ceaf72678a6a5 --- /dev/null +++ b/ext/dom/tests/DOM4_DOMNode_replaceWith.phpt @@ -0,0 +1,27 @@ +--TEST-- +DOMNode::replaceWith() +--SKIPIF-- + +--FILE-- +loadXML('firstsecond'); + +$element = $dom->documentElement->firstChild; +$element->replaceWith( + $dom->createElement('element', 'content'), + 'content' +); + +print_node_list_compact($dom->documentElement->childNodes); +?> +--EXPECT-- + + content + +content + + second + diff --git a/ext/dom/tests/DOM4_ParentNode.phpt b/ext/dom/tests/DOM4_ParentNode.phpt new file mode 100644 index 0000000000000..f5bc5dab90cdf --- /dev/null +++ b/ext/dom/tests/DOM4_ParentNode.phpt @@ -0,0 +1,51 @@ +--TEST-- +DOMParentNode: Child Element Handling +--SKIPIF-- + +--FILE-- +loadXML('fooFirstElementLastElementbar'); + +var_dump($dom instanceof DOMParentNode); +print_node($dom->firstElementChild); +print_node($dom->lastElementChild); +var_dump($dom->childElementCount); + +$element = $dom->documentElement; +var_dump($element instanceof DOMParentNode); +print_node($element->firstElementChild); +print_node($element->lastElementChild); +var_dump($element->childElementCount); +var_dump($element->lastElementChild->firstElementChild); +var_dump($element->lastElementChild->lastElementChild); +var_dump($element->lastElementChild->childElementCount); +?> +--EXPECT-- +bool(true) +Node Name: test +Node Type: 1 +Num Children: 4 + +Node Name: test +Node Type: 1 +Num Children: 4 + +int(1) +bool(true) +Node Name: bar +Node Type: 1 +Num Children: 1 +Node Content: FirstElement + +Node Name: bar +Node Type: 1 +Num Children: 1 +Node Content: LastElement + +int(2) +NULL +NULL +int(0) diff --git a/ext/dom/tests/DOM4_ParentNode_Fragment.phpt b/ext/dom/tests/DOM4_ParentNode_Fragment.phpt new file mode 100644 index 0000000000000..4f7fee3f414c0 --- /dev/null +++ b/ext/dom/tests/DOM4_ParentNode_Fragment.phpt @@ -0,0 +1,41 @@ +--TEST-- +DOMParentNode: Child Element Handling +--SKIPIF-- + +--FILE-- +loadXML(''); + +$fragment = $dom->createDocumentFragment(); +$fragment->appendChild($dom->createTextNode('foo')); +$fragment->appendChild($dom->createElement('bar', 'FirstElement')); +$fragment->appendChild($dom->createElement('bar', 'LastElement')); +$fragment->appendChild($dom->createTextNode('bar')); + +var_dump($fragment instanceof DOMParentNode); +print_node($fragment->firstElementChild); +print_node($fragment->lastElementChild); +var_dump($fragment->childElementCount); +var_dump($fragment->lastElementChild->firstElementChild); +var_dump($fragment->lastElementChild->lastElementChild); +var_dump($fragment->lastElementChild->childElementCount); +?> +--EXPECT-- +bool(true) +Node Name: bar +Node Type: 1 +Num Children: 1 +Node Content: FirstElement + +Node Name: bar +Node Type: 1 +Num Children: 1 +Node Content: LastElement + +int(2) +NULL +NULL +int(0) diff --git a/ext/dom/tests/DOM4_ParentNode_append.phpt b/ext/dom/tests/DOM4_ParentNode_append.phpt new file mode 100644 index 0000000000000..2bab2a4bd6750 --- /dev/null +++ b/ext/dom/tests/DOM4_ParentNode_append.phpt @@ -0,0 +1,41 @@ +--TEST-- +DOMParentNode::append() +--SKIPIF-- + +--FILE-- +loadXML(''); + +$element = $dom->documentElement; +$element->append( + $dom->createElement('element', 'content'), + 'content' +); + +var_dump($dom->documentElement->childElementCount); +print_node_list_compact($element->childNodes); + +$element->append( + $dom->createElement('element', 'content'), + 'content' +); +var_dump($dom->documentElement->childElementCount); +?> +--EXPECT-- +int(4) + + + + + + + + content + +content +int(5) diff --git a/ext/dom/tests/DOM4_ParentNode_append_invalidtypes.phpt b/ext/dom/tests/DOM4_ParentNode_append_invalidtypes.phpt new file mode 100644 index 0000000000000..ab715caaa007f --- /dev/null +++ b/ext/dom/tests/DOM4_ParentNode_append_invalidtypes.phpt @@ -0,0 +1,18 @@ +--TEST-- +DOMParentNode::append() exception on invalid argument +--SKIPIF-- + +--FILE-- +loadXML(''); + +try { + $dom->documentElement->append(array()); +} catch(TypeError $e) { + echo "OK! {$e->getMessage()}"; +} +--EXPECT-- +OK! Invalid argument type must be either DOMNode or string diff --git a/ext/dom/tests/DOM4_ParentNode_append_with_attributes.phpt b/ext/dom/tests/DOM4_ParentNode_append_with_attributes.phpt new file mode 100644 index 0000000000000..3fb266729a895 --- /dev/null +++ b/ext/dom/tests/DOM4_ParentNode_append_with_attributes.phpt @@ -0,0 +1,26 @@ +--TEST-- +DOMParentNode::append() with attributes +--SKIPIF-- + +--FILE-- +loadXML(''); + +$replacement = $dom->createAttribute('attr-one'); +$replacement->value ='42'; +$addition = $dom->createAttribute('attr-two'); +$addition->value = '23'; + +$element = $dom->documentElement; + +try { + $element->append($replacement, $addition); +} catch (DOMException $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +Hierarchy Request Error diff --git a/ext/dom/tests/DOM4_ParentNode_append_wrong_document.phpt b/ext/dom/tests/DOM4_ParentNode_append_wrong_document.phpt new file mode 100644 index 0000000000000..8d5be4373ed96 --- /dev/null +++ b/ext/dom/tests/DOM4_ParentNode_append_wrong_document.phpt @@ -0,0 +1,33 @@ +--TEST-- +DOMParentNode::append() with DOMNode from wrong document throws exception +--SKIPIF-- + +--FILE-- +loadXML(''); + +$dom2 = new DOMDocument; +$dom2->loadXML(''); + +$element = $dom1->documentElement; + +try { + $element->append($dom2->documentElement->firstChild); + echo "FAIL"; +} catch (DOMException $e) { + echo $e->getMessage() . "\n"; +} + +try { + $element->prepend($dom2->documentElement->firstChild); + echo "FAIL"; +} catch (DOMException $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +Wrong Document Error +Wrong Document Error diff --git a/ext/dom/tests/DOM4_ParentNode_prepend.phpt b/ext/dom/tests/DOM4_ParentNode_prepend.phpt new file mode 100644 index 0000000000000..6b6ad2f538961 --- /dev/null +++ b/ext/dom/tests/DOM4_ParentNode_prepend.phpt @@ -0,0 +1,49 @@ +--TEST-- +DOMParentNode::prepend() +--SKIPIF-- + +--FILE-- +loadXML(''); + +$element = $dom->documentElement; +$firstMark = $element->childNodes[0]; +$element->prepend( + $dom->createElement('element', 'content'), + 'content' +); + +var_dump($element->childElementCount); +print_node_list_compact($element->childNodes); + +$element = $dom->documentElement; +$element->prepend( + $dom->createElement('element', 'content'), + 'content' +); +var_dump($element->childElementCount); + +$firstMark->prepend('content'); +print_node_list_compact($firstMark->childNodes); +?> +--EXPECT-- +int(4) + + content + +content + + + + + + + + +int(5) +content diff --git a/ext/dom/tests/bug69846.phpt b/ext/dom/tests/bug69846.phpt index 74db47c5711d5..a47d30a0576eb 100644 --- a/ext/dom/tests/bug69846.phpt +++ b/ext/dom/tests/bug69846.phpt @@ -30,7 +30,7 @@ foreach ($dataNodes AS $node) { ?> --EXPECTF-- int(3) -object(DOMText)#%d (19) { +object(DOMText)#%d (21) { ["wholeText"]=> string(3) " " @@ -39,6 +39,10 @@ object(DOMText)#%d (19) { " ["length"]=> int(3) + ["previousElementSibling"]=> + NULL + ["nextElementSibling"]=> + NULL ["nodeName"]=> string(5) "#text" ["nodeValue"]=> @@ -74,11 +78,21 @@ object(DOMText)#%d (19) { string(3) " " } -object(DOMElement)#%d (18) { +object(DOMElement)#%d (23) { ["tagName"]=> string(5) "form1" ["schemaTypeInfo"]=> NULL + ["firstElementChild"]=> + string(22) "(object value omitted)" + ["lastElementChild"]=> + string(22) "(object value omitted)" + ["childElementCount"]=> + int(3) + ["previousElementSibling"]=> + NULL + ["nextElementSibling"]=> + NULL ["nodeName"]=> string(5) "form1" ["nodeValue"]=> @@ -120,7 +134,7 @@ object(DOMElement)#%d (18) { Value C " } -object(DOMText)#%d (19) { +object(DOMText)#%d (21) { ["wholeText"]=> string(1) " " @@ -129,6 +143,10 @@ object(DOMText)#%d (19) { " ["length"]=> int(1) + ["previousElementSibling"]=> + NULL + ["nextElementSibling"]=> + NULL ["nodeName"]=> string(5) "#text" ["nodeValue"]=> diff --git a/ext/dom/tests/dom_test.inc b/ext/dom/tests/dom_test.inc index 93264ea2aafc1..04bfa04d53fa2 100644 --- a/ext/dom/tests/dom_test.inc +++ b/ext/dom/tests/dom_test.inc @@ -48,4 +48,22 @@ function print_node_list($nodelist) } } +function print_node_compact($node, $spaces) +{ + if ($node->nodeType == 3) { + print str_repeat(" ", $spaces) . trim($node->nodeValue) . "\n"; + } else { + print str_repeat(" ", $spaces) . "<" . $node->nodeName . ">\n"; + print_node_list_compact($node->childNodes, $spaces + 2); + print str_repeat(" ", $spaces) . "nodeName . ">\n"; + } +} + +function print_node_list_compact($nodelist, $spaces = 0) +{ + foreach ($nodelist as $node) { + print_node_compact($node, $spaces); + } +} + ?> diff --git a/ext/dom/tests/domobject_debug_handler.phpt b/ext/dom/tests/domobject_debug_handler.phpt index d2834e815cfec..3545b78dd4665 100644 --- a/ext/dom/tests/domobject_debug_handler.phpt +++ b/ext/dom/tests/domobject_debug_handler.phpt @@ -39,6 +39,9 @@ DOMDocument Object [preserveWhiteSpace] => 1 [recover] => [substituteEntities] => + [firstElementChild] => (object value omitted) + [lastElementChild] => (object value omitted) + [childElementCount] => 1 [nodeName] => #document [nodeValue] => [nodeType] => 9 From 6c48da9a50a68cbb27873ead6bf936494c006236 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 17:06:05 +0100 Subject: [PATCH 122/201] Fixed bug #79062 Back up the doc comment when performing heredoc scanahead. --- NEWS | 4 + Zend/zend_language_scanner.c | 239 +++++++++++++++-------------- Zend/zend_language_scanner.l | 3 + ext/reflection/tests/bug79062.phpt | 34 ++++ 4 files changed, 162 insertions(+), 118 deletions(-) create mode 100644 ext/reflection/tests/bug79062.phpt diff --git a/NEWS b/NEWS index 127d60c1fec33..49feabc5ef2f6 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,10 @@ PHP NEWS - PDO_ODBC: . Fixed bug #79038 (PDOStatement::nextRowset() leaks column values). (cmb) +- Reflection: + . Fixed bug #79062 (Property with heredoc default value returns false for + getDocComment). (Nikita) + - SQLite3: . Fixed bug #79294 (::columnType() may fail after SQLite3Stmt::reset()). (cmb) diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index 25da78e28c6c4..5bab93d229f3f 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -1454,7 +1454,7 @@ int start_line = CG(zend_lineno); ++YYCURSOR; YYDEBUG(4, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2765 "Zend/zend_language_scanner.l" +#line 2768 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -2269,7 +2269,7 @@ int start_line = CG(zend_lineno); ++YYCURSOR; YYDEBUG(63, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2412 "Zend/zend_language_scanner.l" +#line 2415 "Zend/zend_language_scanner.l" { BEGIN(ST_BACKQUOTE); RETURN_TOKEN('`'); @@ -4730,6 +4730,7 @@ int start_line = CG(zend_lineno); if (is_heredoc && !SCNG(heredoc_scan_ahead)) { zend_lex_state current_state; + zend_string *saved_doc_comment = CG(doc_comment); int heredoc_nesting_level = 1; int first_token = 0; int error = 0; @@ -4740,6 +4741,7 @@ int start_line = CG(zend_lineno); SCNG(heredoc_indentation) = 0; SCNG(heredoc_indentation_uses_spaces) = 0; LANG_SCNG(on_event) = NULL; + CG(doc_comment) = NULL; zend_ptr_stack_reverse_apply(¤t_state.heredoc_label_stack, copy_heredoc_label_stack); @@ -4789,6 +4791,7 @@ int start_line = CG(zend_lineno); zend_restore_lexical_state(¤t_state); SCNG(heredoc_scan_ahead) = 0; CG(increment_lineno) = 0; + CG(doc_comment) = saved_doc_comment; if (PARSER_MODE() && error) { RETURN_TOKEN(T_ERROR); @@ -4797,7 +4800,7 @@ int start_line = CG(zend_lineno); RETURN_TOKEN(T_START_HEREDOC); } -#line 4801 "Zend/zend_language_scanner.c" +#line 4804 "Zend/zend_language_scanner.c" yy398: YYDEBUG(398, *YYCURSOR); yych = *++YYCURSOR; @@ -4821,7 +4824,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ARRAY); } -#line 4825 "Zend/zend_language_scanner.c" +#line 4828 "Zend/zend_language_scanner.c" yy402: YYDEBUG(402, *YYCURSOR); yych = *++YYCURSOR; @@ -4834,7 +4837,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_BREAK); } -#line 4838 "Zend/zend_language_scanner.c" +#line 4841 "Zend/zend_language_scanner.c" yy404: YYDEBUG(404, *YYCURSOR); yych = *++YYCURSOR; @@ -4853,7 +4856,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_CATCH); } -#line 4857 "Zend/zend_language_scanner.c" +#line 4860 "Zend/zend_language_scanner.c" yy407: YYDEBUG(407, *YYCURSOR); yych = *++YYCURSOR; @@ -4866,7 +4869,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_CLASS); } -#line 4870 "Zend/zend_language_scanner.c" +#line 4873 "Zend/zend_language_scanner.c" yy409: YYDEBUG(409, *YYCURSOR); yych = *++YYCURSOR; @@ -4879,7 +4882,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_CLONE); } -#line 4883 "Zend/zend_language_scanner.c" +#line 4886 "Zend/zend_language_scanner.c" yy411: YYDEBUG(411, *YYCURSOR); yych = *++YYCURSOR; @@ -4892,7 +4895,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_CONST); } -#line 4896 "Zend/zend_language_scanner.c" +#line 4899 "Zend/zend_language_scanner.c" yy413: YYDEBUG(413, *YYCURSOR); yych = *++YYCURSOR; @@ -4929,7 +4932,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_EMPTY); } -#line 4933 "Zend/zend_language_scanner.c" +#line 4936 "Zend/zend_language_scanner.c" yy419: YYDEBUG(419, *YYCURSOR); yych = *++YYCURSOR; @@ -4954,7 +4957,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ENDIF); } -#line 4958 "Zend/zend_language_scanner.c" +#line 4961 "Zend/zend_language_scanner.c" yy423: YYDEBUG(423, *YYCURSOR); yych = *++YYCURSOR; @@ -5000,7 +5003,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_FINAL); } -#line 5004 "Zend/zend_language_scanner.c" +#line 5007 "Zend/zend_language_scanner.c" yy428: YYDEBUG(428, *YYCURSOR); yych = *++YYCURSOR; @@ -5061,7 +5064,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ISSET); } -#line 5065 "Zend/zend_language_scanner.c" +#line 5068 "Zend/zend_language_scanner.c" yy438: YYDEBUG(438, *YYCURSOR); yych = *++YYCURSOR; @@ -5080,7 +5083,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_PRINT); } -#line 5084 "Zend/zend_language_scanner.c" +#line 5087 "Zend/zend_language_scanner.c" yy441: YYDEBUG(441, *YYCURSOR); yych = *++YYCURSOR; @@ -5135,7 +5138,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_THROW); } -#line 5139 "Zend/zend_language_scanner.c" +#line 5142 "Zend/zend_language_scanner.c" yy450: YYDEBUG(450, *YYCURSOR); yych = *++YYCURSOR; @@ -5148,7 +5151,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_TRAIT); } -#line 5152 "Zend/zend_language_scanner.c" +#line 5155 "Zend/zend_language_scanner.c" yy452: YYDEBUG(452, *YYCURSOR); yych = *++YYCURSOR; @@ -5161,7 +5164,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_UNSET); } -#line 5165 "Zend/zend_language_scanner.c" +#line 5168 "Zend/zend_language_scanner.c" yy454: YYDEBUG(454, *YYCURSOR); yych = *++YYCURSOR; @@ -5174,7 +5177,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_WHILE); } -#line 5178 "Zend/zend_language_scanner.c" +#line 5181 "Zend/zend_language_scanner.c" yy456: YYDEBUG(456, *YYCURSOR); yyaccept = 6; @@ -5196,7 +5199,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_YIELD); } -#line 5200 "Zend/zend_language_scanner.c" +#line 5203 "Zend/zend_language_scanner.c" yy458: YYDEBUG(458, *YYCURSOR); yych = *++YYCURSOR; @@ -5292,7 +5295,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_BOOL_CAST); } -#line 5296 "Zend/zend_language_scanner.c" +#line 5299 "Zend/zend_language_scanner.c" yy474: YYDEBUG(474, *YYCURSOR); yych = *++YYCURSOR; @@ -5326,7 +5329,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_DOUBLE_CAST); } -#line 5330 "Zend/zend_language_scanner.c" +#line 5333 "Zend/zend_language_scanner.c" yy480: YYDEBUG(480, *YYCURSOR); yych = *++YYCURSOR; @@ -5395,7 +5398,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ELSEIF); } -#line 5399 "Zend/zend_language_scanner.c" +#line 5402 "Zend/zend_language_scanner.c" yy491: YYDEBUG(491, *YYCURSOR); yych = *++YYCURSOR; @@ -5429,7 +5432,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ENDFOR); } -#line 5433 "Zend/zend_language_scanner.c" +#line 5436 "Zend/zend_language_scanner.c" yy494: YYDEBUG(494, *YYCURSOR); yych = *++YYCURSOR; @@ -5478,7 +5481,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_GLOBAL); } -#line 5482 "Zend/zend_language_scanner.c" +#line 5485 "Zend/zend_language_scanner.c" yy502: YYDEBUG(502, *YYCURSOR); yych = *++YYCURSOR; @@ -5539,7 +5542,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_PUBLIC); } -#line 5543 "Zend/zend_language_scanner.c" +#line 5546 "Zend/zend_language_scanner.c" yy512: YYDEBUG(512, *YYCURSOR); yych = *++YYCURSOR; @@ -5558,7 +5561,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_RETURN); } -#line 5562 "Zend/zend_language_scanner.c" +#line 5565 "Zend/zend_language_scanner.c" yy515: YYDEBUG(515, *YYCURSOR); yych = *++YYCURSOR; @@ -5571,7 +5574,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_STATIC); } -#line 5575 "Zend/zend_language_scanner.c" +#line 5578 "Zend/zend_language_scanner.c" yy517: YYDEBUG(517, *YYCURSOR); yych = *++YYCURSOR; @@ -5584,7 +5587,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_SWITCH); } -#line 5588 "Zend/zend_language_scanner.c" +#line 5591 "Zend/zend_language_scanner.c" yy519: YYDEBUG(519, *YYCURSOR); ++YYCURSOR; @@ -5668,7 +5671,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ARRAY_CAST); } -#line 5672 "Zend/zend_language_scanner.c" +#line 5675 "Zend/zend_language_scanner.c" yy532: YYDEBUG(532, *YYCURSOR); ++YYCURSOR; @@ -5718,7 +5721,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_UNSET_CAST); } -#line 5722 "Zend/zend_language_scanner.c" +#line 5725 "Zend/zend_language_scanner.c" yy540: YYDEBUG(540, *YYCURSOR); yych = *++YYCURSOR; @@ -5749,7 +5752,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_DECLARE); } -#line 5753 "Zend/zend_language_scanner.c" +#line 5756 "Zend/zend_language_scanner.c" yy545: YYDEBUG(545, *YYCURSOR); yych = *++YYCURSOR; @@ -5762,7 +5765,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_DEFAULT); } -#line 5766 "Zend/zend_language_scanner.c" +#line 5769 "Zend/zend_language_scanner.c" yy547: YYDEBUG(547, *YYCURSOR); yych = *++YYCURSOR; @@ -5799,7 +5802,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_EXTENDS); } -#line 5803 "Zend/zend_language_scanner.c" +#line 5806 "Zend/zend_language_scanner.c" yy553: YYDEBUG(553, *YYCURSOR); yych = *++YYCURSOR; @@ -5812,7 +5815,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_FINALLY); } -#line 5816 "Zend/zend_language_scanner.c" +#line 5819 "Zend/zend_language_scanner.c" yy555: YYDEBUG(555, *YYCURSOR); yych = *++YYCURSOR; @@ -5825,7 +5828,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_FOREACH); } -#line 5829 "Zend/zend_language_scanner.c" +#line 5832 "Zend/zend_language_scanner.c" yy557: YYDEBUG(557, *YYCURSOR); yych = *++YYCURSOR; @@ -5863,7 +5866,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_INCLUDE); } -#line 5867 "Zend/zend_language_scanner.c" +#line 5870 "Zend/zend_language_scanner.c" yy561: YYDEBUG(561, *YYCURSOR); yych = *++YYCURSOR; @@ -5900,7 +5903,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_PRIVATE); } -#line 5904 "Zend/zend_language_scanner.c" +#line 5907 "Zend/zend_language_scanner.c" yy567: YYDEBUG(567, *YYCURSOR); yych = *++YYCURSOR; @@ -5932,7 +5935,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_REQUIRE); } -#line 5936 "Zend/zend_language_scanner.c" +#line 5939 "Zend/zend_language_scanner.c" yy570: YYDEBUG(570, *YYCURSOR); yych = *++YYCURSOR; @@ -5956,7 +5959,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_DIR); } -#line 5960 "Zend/zend_language_scanner.c" +#line 5963 "Zend/zend_language_scanner.c" yy574: YYDEBUG(574, *YYCURSOR); yych = *++YYCURSOR; @@ -6005,7 +6008,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_STRING_CAST); } -#line 6009 "Zend/zend_language_scanner.c" +#line 6012 "Zend/zend_language_scanner.c" yy583: YYDEBUG(583, *YYCURSOR); ++YYCURSOR; @@ -6015,7 +6018,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_OBJECT_CAST); } -#line 6019 "Zend/zend_language_scanner.c" +#line 6022 "Zend/zend_language_scanner.c" yy585: YYDEBUG(585, *YYCURSOR); yych = *++YYCURSOR; @@ -6028,7 +6031,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ABSTRACT); } -#line 6032 "Zend/zend_language_scanner.c" +#line 6035 "Zend/zend_language_scanner.c" yy587: YYDEBUG(587, *YYCURSOR); yych = *++YYCURSOR; @@ -6041,7 +6044,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_CALLABLE); } -#line 6045 "Zend/zend_language_scanner.c" +#line 6048 "Zend/zend_language_scanner.c" yy589: YYDEBUG(589, *YYCURSOR); yych = *++YYCURSOR; @@ -6054,7 +6057,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_CONTINUE); } -#line 6058 "Zend/zend_language_scanner.c" +#line 6061 "Zend/zend_language_scanner.c" yy591: YYDEBUG(591, *YYCURSOR); yych = *++YYCURSOR; @@ -6085,7 +6088,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ENDWHILE); } -#line 6089 "Zend/zend_language_scanner.c" +#line 6092 "Zend/zend_language_scanner.c" yy596: YYDEBUG(596, *YYCURSOR); yych = *++YYCURSOR; @@ -6098,7 +6101,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_FUNCTION); } -#line 6102 "Zend/zend_language_scanner.c" +#line 6105 "Zend/zend_language_scanner.c" yy598: YYDEBUG(598, *YYCURSOR); yych = *++YYCURSOR; @@ -6170,7 +6173,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_FILE); } -#line 6174 "Zend/zend_language_scanner.c" +#line 6177 "Zend/zend_language_scanner.c" yy610: YYDEBUG(610, *YYCURSOR); yych = *++YYCURSOR; @@ -6195,7 +6198,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_LINE); } -#line 6199 "Zend/zend_language_scanner.c" +#line 6202 "Zend/zend_language_scanner.c" yy614: YYDEBUG(614, *YYCURSOR); yych = *++YYCURSOR; @@ -6236,7 +6239,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ENDSWITCH); } -#line 6240 "Zend/zend_language_scanner.c" +#line 6243 "Zend/zend_language_scanner.c" yy621: YYDEBUG(621, *YYCURSOR); yych = *++YYCURSOR; @@ -6267,7 +6270,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_INSTEADOF); } -#line 6271 "Zend/zend_language_scanner.c" +#line 6274 "Zend/zend_language_scanner.c" yy626: YYDEBUG(626, *YYCURSOR); yych = *++YYCURSOR; @@ -6280,7 +6283,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_INTERFACE); } -#line 6284 "Zend/zend_language_scanner.c" +#line 6287 "Zend/zend_language_scanner.c" yy628: YYDEBUG(628, *YYCURSOR); yych = *++YYCURSOR; @@ -6293,7 +6296,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_NAMESPACE); } -#line 6297 "Zend/zend_language_scanner.c" +#line 6300 "Zend/zend_language_scanner.c" yy630: YYDEBUG(630, *YYCURSOR); yych = *++YYCURSOR; @@ -6306,7 +6309,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_PROTECTED); } -#line 6310 "Zend/zend_language_scanner.c" +#line 6313 "Zend/zend_language_scanner.c" yy632: YYDEBUG(632, *YYCURSOR); yych = *++YYCURSOR; @@ -6331,7 +6334,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_CLASS_C); } -#line 6335 "Zend/zend_language_scanner.c" +#line 6338 "Zend/zend_language_scanner.c" yy636: YYDEBUG(636, *YYCURSOR); yych = *++YYCURSOR; @@ -6367,7 +6370,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_TRAIT_C); } -#line 6371 "Zend/zend_language_scanner.c" +#line 6374 "Zend/zend_language_scanner.c" yy642: YYDEBUG(642, *YYCURSOR); yych = *++YYCURSOR; @@ -6380,7 +6383,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ENDDECLARE); } -#line 6384 "Zend/zend_language_scanner.c" +#line 6387 "Zend/zend_language_scanner.c" yy644: YYDEBUG(644, *YYCURSOR); yych = *++YYCURSOR; @@ -6393,7 +6396,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_ENDFOREACH); } -#line 6397 "Zend/zend_language_scanner.c" +#line 6400 "Zend/zend_language_scanner.c" yy646: YYDEBUG(646, *YYCURSOR); yych = *++YYCURSOR; @@ -6406,7 +6409,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_IMPLEMENTS); } -#line 6410 "Zend/zend_language_scanner.c" +#line 6413 "Zend/zend_language_scanner.c" yy648: YYDEBUG(648, *YYCURSOR); yych = *++YYCURSOR; @@ -6425,7 +6428,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_INSTANCEOF); } -#line 6429 "Zend/zend_language_scanner.c" +#line 6432 "Zend/zend_language_scanner.c" yy651: YYDEBUG(651, *YYCURSOR); yych = *++YYCURSOR; @@ -6477,7 +6480,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_METHOD_C); } -#line 6481 "Zend/zend_language_scanner.c" +#line 6484 "Zend/zend_language_scanner.c" yy657: YYDEBUG(657, *YYCURSOR); yych = *++YYCURSOR; @@ -6507,7 +6510,7 @@ int start_line = CG(zend_lineno); HANDLE_NEWLINES(yytext, yyleng); RETURN_TOKEN(T_YIELD_FROM); } -#line 6511 "Zend/zend_language_scanner.c" +#line 6514 "Zend/zend_language_scanner.c" yy662: YYDEBUG(662, *YYCURSOR); yych = *++YYCURSOR; @@ -6536,7 +6539,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_INCLUDE_ONCE); } -#line 6540 "Zend/zend_language_scanner.c" +#line 6543 "Zend/zend_language_scanner.c" yy667: YYDEBUG(667, *YYCURSOR); yych = *++YYCURSOR; @@ -6549,7 +6552,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_REQUIRE_ONCE); } -#line 6553 "Zend/zend_language_scanner.c" +#line 6556 "Zend/zend_language_scanner.c" yy669: YYDEBUG(669, *YYCURSOR); yych = *++YYCURSOR; @@ -6562,7 +6565,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_FUNC_C); } -#line 6566 "Zend/zend_language_scanner.c" +#line 6569 "Zend/zend_language_scanner.c" yy671: YYDEBUG(671, *YYCURSOR); yych = *++YYCURSOR; @@ -6592,7 +6595,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_NS_C); } -#line 6596 "Zend/zend_language_scanner.c" +#line 6599 "Zend/zend_language_scanner.c" yy676: YYDEBUG(676, *YYCURSOR); yych = *++YYCURSOR; @@ -6610,7 +6613,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_HALT_COMPILER); } -#line 6614 "Zend/zend_language_scanner.c" +#line 6617 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_LOOKING_FOR_PROPERTY: @@ -6682,7 +6685,7 @@ int start_line = CG(zend_lineno); yy_pop_state(); goto restart; } -#line 6686 "Zend/zend_language_scanner.c" +#line 6689 "Zend/zend_language_scanner.c" yy683: YYDEBUG(683, *YYCURSOR); ++YYCURSOR; @@ -6698,7 +6701,7 @@ int start_line = CG(zend_lineno); { goto return_whitespace; } -#line 6702 "Zend/zend_language_scanner.c" +#line 6705 "Zend/zend_language_scanner.c" yy686: YYDEBUG(686, *YYCURSOR); yych = *++YYCURSOR; @@ -6720,7 +6723,7 @@ int start_line = CG(zend_lineno); yy_pop_state(); RETURN_TOKEN_WITH_STR(T_STRING, 0); } -#line 6724 "Zend/zend_language_scanner.c" +#line 6727 "Zend/zend_language_scanner.c" yy690: YYDEBUG(690, *YYCURSOR); ++YYCURSOR; @@ -6730,7 +6733,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN(T_OBJECT_OPERATOR); } -#line 6734 "Zend/zend_language_scanner.c" +#line 6737 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_BACKQUOTE: @@ -6783,7 +6786,7 @@ int start_line = CG(zend_lineno); yy695: YYDEBUG(695, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2504 "Zend/zend_language_scanner.l" +#line 2507 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -6828,7 +6831,7 @@ int start_line = CG(zend_lineno); RETURN_TOKEN(T_ERROR); } } -#line 6832 "Zend/zend_language_scanner.c" +#line 6835 "Zend/zend_language_scanner.c" yy696: YYDEBUG(696, *YYCURSOR); yych = *++YYCURSOR; @@ -6852,12 +6855,12 @@ int start_line = CG(zend_lineno); ++YYCURSOR; YYDEBUG(698, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2444 "Zend/zend_language_scanner.l" +#line 2447 "Zend/zend_language_scanner.l" { BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN('`'); } -#line 6861 "Zend/zend_language_scanner.c" +#line 6864 "Zend/zend_language_scanner.c" yy699: YYDEBUG(699, *YYCURSOR); yych = *++YYCURSOR; @@ -6882,7 +6885,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 6886 "Zend/zend_language_scanner.c" +#line 6889 "Zend/zend_language_scanner.c" yy703: YYDEBUG(703, *YYCURSOR); ++YYCURSOR; @@ -6893,19 +6896,19 @@ int start_line = CG(zend_lineno); yy_push_state(ST_LOOKING_FOR_VARNAME); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } -#line 6897 "Zend/zend_language_scanner.c" +#line 6900 "Zend/zend_language_scanner.c" yy705: YYDEBUG(705, *YYCURSOR); ++YYCURSOR; YYDEBUG(706, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2432 "Zend/zend_language_scanner.l" +#line 2435 "Zend/zend_language_scanner.l" { yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); } -#line 6909 "Zend/zend_language_scanner.c" +#line 6912 "Zend/zend_language_scanner.c" yy707: YYDEBUG(707, *YYCURSOR); yych = *++YYCURSOR; @@ -6925,7 +6928,7 @@ int start_line = CG(zend_lineno); yy_push_state(ST_VAR_OFFSET); RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 6929 "Zend/zend_language_scanner.c" +#line 6932 "Zend/zend_language_scanner.c" yy711: YYDEBUG(711, *YYCURSOR); yych = *++YYCURSOR; @@ -6949,7 +6952,7 @@ int start_line = CG(zend_lineno); yy_push_state(ST_LOOKING_FOR_PROPERTY); RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 6953 "Zend/zend_language_scanner.c" +#line 6956 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_DOUBLE_QUOTES: @@ -7002,7 +7005,7 @@ int start_line = CG(zend_lineno); yy717: YYDEBUG(717, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2450 "Zend/zend_language_scanner.l" +#line 2453 "Zend/zend_language_scanner.l" { if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) { YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1; @@ -7055,18 +7058,18 @@ int start_line = CG(zend_lineno); RETURN_TOKEN(T_ERROR); } } -#line 7059 "Zend/zend_language_scanner.c" +#line 7062 "Zend/zend_language_scanner.c" yy718: YYDEBUG(718, *YYCURSOR); ++YYCURSOR; YYDEBUG(719, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2439 "Zend/zend_language_scanner.l" +#line 2442 "Zend/zend_language_scanner.l" { BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN('"'); } -#line 7070 "Zend/zend_language_scanner.c" +#line 7073 "Zend/zend_language_scanner.c" yy720: YYDEBUG(720, *YYCURSOR); yych = *++YYCURSOR; @@ -7109,7 +7112,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 7113 "Zend/zend_language_scanner.c" +#line 7116 "Zend/zend_language_scanner.c" yy725: YYDEBUG(725, *YYCURSOR); ++YYCURSOR; @@ -7120,19 +7123,19 @@ int start_line = CG(zend_lineno); yy_push_state(ST_LOOKING_FOR_VARNAME); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } -#line 7124 "Zend/zend_language_scanner.c" +#line 7127 "Zend/zend_language_scanner.c" yy727: YYDEBUG(727, *YYCURSOR); ++YYCURSOR; YYDEBUG(728, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2432 "Zend/zend_language_scanner.l" +#line 2435 "Zend/zend_language_scanner.l" { yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); } -#line 7136 "Zend/zend_language_scanner.c" +#line 7139 "Zend/zend_language_scanner.c" yy729: YYDEBUG(729, *YYCURSOR); yych = *++YYCURSOR; @@ -7152,7 +7155,7 @@ int start_line = CG(zend_lineno); yy_push_state(ST_VAR_OFFSET); RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 7156 "Zend/zend_language_scanner.c" +#line 7159 "Zend/zend_language_scanner.c" yy733: YYDEBUG(733, *YYCURSOR); yych = *++YYCURSOR; @@ -7176,7 +7179,7 @@ int start_line = CG(zend_lineno); yy_push_state(ST_LOOKING_FOR_PROPERTY); RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 7180 "Zend/zend_language_scanner.c" +#line 7183 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_HEREDOC: @@ -7225,7 +7228,7 @@ int start_line = CG(zend_lineno); yy739: YYDEBUG(739, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2550 "Zend/zend_language_scanner.l" +#line 2553 "Zend/zend_language_scanner.l" { zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack)); int newline = 0, indentation = 0, spacing = 0; @@ -7348,7 +7351,7 @@ int start_line = CG(zend_lineno); RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } -#line 7352 "Zend/zend_language_scanner.c" +#line 7355 "Zend/zend_language_scanner.c" yy740: YYDEBUG(740, *YYCURSOR); yych = *++YYCURSOR; @@ -7391,7 +7394,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 7395 "Zend/zend_language_scanner.c" +#line 7398 "Zend/zend_language_scanner.c" yy745: YYDEBUG(745, *YYCURSOR); ++YYCURSOR; @@ -7402,19 +7405,19 @@ int start_line = CG(zend_lineno); yy_push_state(ST_LOOKING_FOR_VARNAME); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } -#line 7406 "Zend/zend_language_scanner.c" +#line 7409 "Zend/zend_language_scanner.c" yy747: YYDEBUG(747, *YYCURSOR); ++YYCURSOR; YYDEBUG(748, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2432 "Zend/zend_language_scanner.l" +#line 2435 "Zend/zend_language_scanner.l" { yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); } -#line 7418 "Zend/zend_language_scanner.c" +#line 7421 "Zend/zend_language_scanner.c" yy749: YYDEBUG(749, *YYCURSOR); yych = *++YYCURSOR; @@ -7434,7 +7437,7 @@ int start_line = CG(zend_lineno); yy_push_state(ST_VAR_OFFSET); RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 7438 "Zend/zend_language_scanner.c" +#line 7441 "Zend/zend_language_scanner.c" yy753: YYDEBUG(753, *YYCURSOR); yych = *++YYCURSOR; @@ -7458,7 +7461,7 @@ int start_line = CG(zend_lineno); yy_push_state(ST_LOOKING_FOR_PROPERTY); RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 7462 "Zend/zend_language_scanner.c" +#line 7465 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_LOOKING_FOR_VARNAME: @@ -7522,7 +7525,7 @@ int start_line = CG(zend_lineno); yy_push_state(ST_IN_SCRIPTING); goto restart; } -#line 7526 "Zend/zend_language_scanner.c" +#line 7529 "Zend/zend_language_scanner.c" yy760: YYDEBUG(760, *YYCURSOR); yych = *(YYMARKER = ++YYCURSOR); @@ -7576,7 +7579,7 @@ int start_line = CG(zend_lineno); yy_push_state(ST_IN_SCRIPTING); RETURN_TOKEN_WITH_STR(T_STRING_VARNAME, 0); } -#line 7580 "Zend/zend_language_scanner.c" +#line 7583 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_VAR_OFFSET: @@ -7665,7 +7668,7 @@ int start_line = CG(zend_lineno); ++YYCURSOR; YYDEBUG(769, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2765 "Zend/zend_language_scanner.l" +#line 2768 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -7676,7 +7679,7 @@ int start_line = CG(zend_lineno); } goto restart; } -#line 7680 "Zend/zend_language_scanner.c" +#line 7683 "Zend/zend_language_scanner.c" yy770: YYDEBUG(770, *YYCURSOR); ++YYCURSOR; @@ -7690,7 +7693,7 @@ int start_line = CG(zend_lineno); ZVAL_NULL(zendlval); RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } -#line 7694 "Zend/zend_language_scanner.c" +#line 7697 "Zend/zend_language_scanner.c" yy772: YYDEBUG(772, *YYCURSOR); ++YYCURSOR; @@ -7702,7 +7705,7 @@ int start_line = CG(zend_lineno); /* Only '[' or '-' can be valid, but returning other tokens will allow a more explicit parse error */ RETURN_TOKEN(yytext[0]); } -#line 7706 "Zend/zend_language_scanner.c" +#line 7709 "Zend/zend_language_scanner.c" yy774: YYDEBUG(774, *YYCURSOR); yych = *++YYCURSOR; @@ -7753,7 +7756,7 @@ int start_line = CG(zend_lineno); } RETURN_TOKEN_WITH_VAL(T_NUM_STRING); } -#line 7757 "Zend/zend_language_scanner.c" +#line 7760 "Zend/zend_language_scanner.c" yy777: YYDEBUG(777, *YYCURSOR); ++YYCURSOR; @@ -7779,7 +7782,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN_WITH_STR(T_STRING, 0); } -#line 7783 "Zend/zend_language_scanner.c" +#line 7786 "Zend/zend_language_scanner.c" yy782: YYDEBUG(782, *YYCURSOR); ++YYCURSOR; @@ -7790,7 +7793,7 @@ int start_line = CG(zend_lineno); yy_pop_state(); RETURN_TOKEN(']'); } -#line 7794 "Zend/zend_language_scanner.c" +#line 7797 "Zend/zend_language_scanner.c" yy784: YYDEBUG(784, *YYCURSOR); ++YYCURSOR; @@ -7819,7 +7822,7 @@ int start_line = CG(zend_lineno); { RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 7823 "Zend/zend_language_scanner.c" +#line 7826 "Zend/zend_language_scanner.c" yy787: YYDEBUG(787, *YYCURSOR); ++YYCURSOR; @@ -7840,7 +7843,7 @@ int start_line = CG(zend_lineno); } RETURN_TOKEN_WITH_VAL(T_NUM_STRING); } -#line 7844 "Zend/zend_language_scanner.c" +#line 7847 "Zend/zend_language_scanner.c" yy790: YYDEBUG(790, *YYCURSOR); yych = *++YYCURSOR; @@ -7937,7 +7940,7 @@ int start_line = CG(zend_lineno); HANDLE_NEWLINES(yytext, yyleng); RETURN_TOKEN_WITH_VAL(T_INLINE_HTML); } -#line 7941 "Zend/zend_language_scanner.c" +#line 7944 "Zend/zend_language_scanner.c" yy801: YYDEBUG(801, *YYCURSOR); yych = *++YYCURSOR; @@ -7965,7 +7968,7 @@ int start_line = CG(zend_lineno); goto inline_char_handler; } } -#line 7969 "Zend/zend_language_scanner.c" +#line 7972 "Zend/zend_language_scanner.c" yy804: YYDEBUG(804, *YYCURSOR); ++YYCURSOR; @@ -7979,7 +7982,7 @@ int start_line = CG(zend_lineno); } RETURN_TOKEN(T_OPEN_TAG_WITH_ECHO); } -#line 7983 "Zend/zend_language_scanner.c" +#line 7986 "Zend/zend_language_scanner.c" yy806: YYDEBUG(806, *YYCURSOR); yych = *++YYCURSOR; @@ -8019,7 +8022,7 @@ int start_line = CG(zend_lineno); } RETURN_TOKEN(T_OPEN_TAG); } -#line 8023 "Zend/zend_language_scanner.c" +#line 8026 "Zend/zend_language_scanner.c" yy812: YYDEBUG(812, *YYCURSOR); yych = *++YYCURSOR; @@ -8034,7 +8037,7 @@ int start_line = CG(zend_lineno); ++YYCURSOR; YYDEBUG(816, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2418 "Zend/zend_language_scanner.l" +#line 2421 "Zend/zend_language_scanner.l" { zend_heredoc_label *heredoc_label = zend_ptr_stack_pop(&SCNG(heredoc_label_stack)); @@ -8047,7 +8050,7 @@ int start_line = CG(zend_lineno); BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN(T_END_HEREDOC); } -#line 8051 "Zend/zend_language_scanner.c" +#line 8054 "Zend/zend_language_scanner.c" /* *********************************** */ yyc_ST_NOWDOC: YYDEBUG(817, *YYCURSOR); @@ -8057,7 +8060,7 @@ int start_line = CG(zend_lineno); ++YYCURSOR; YYDEBUG(820, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2674 "Zend/zend_language_scanner.l" +#line 2677 "Zend/zend_language_scanner.l" { zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack)); int newline = 0, indentation = 0, spacing = -1; @@ -8147,9 +8150,9 @@ int start_line = CG(zend_lineno); HANDLE_NEWLINES(yytext, yyleng - newline); RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } -#line 8151 "Zend/zend_language_scanner.c" +#line 8154 "Zend/zend_language_scanner.c" } -#line 2776 "Zend/zend_language_scanner.l" +#line 2779 "Zend/zend_language_scanner.l" emit_token_with_str: diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 704aa998d362e..041b482ab4807 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -2340,6 +2340,7 @@ skip_escape_conversion: if (is_heredoc && !SCNG(heredoc_scan_ahead)) { zend_lex_state current_state; + zend_string *saved_doc_comment = CG(doc_comment); int heredoc_nesting_level = 1; int first_token = 0; int error = 0; @@ -2350,6 +2351,7 @@ skip_escape_conversion: SCNG(heredoc_indentation) = 0; SCNG(heredoc_indentation_uses_spaces) = 0; LANG_SCNG(on_event) = NULL; + CG(doc_comment) = NULL; zend_ptr_stack_reverse_apply(¤t_state.heredoc_label_stack, copy_heredoc_label_stack); @@ -2399,6 +2401,7 @@ skip_escape_conversion: zend_restore_lexical_state(¤t_state); SCNG(heredoc_scan_ahead) = 0; CG(increment_lineno) = 0; + CG(doc_comment) = saved_doc_comment; if (PARSER_MODE() && error) { RETURN_TOKEN(T_ERROR); diff --git a/ext/reflection/tests/bug79062.phpt b/ext/reflection/tests/bug79062.phpt new file mode 100644 index 0000000000000..57a293333d3a6 --- /dev/null +++ b/ext/reflection/tests/bug79062.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #79062: Property with heredoc default value returns false for getDocComment +--FILE-- +getProperty('s1'); +var_dump($s1->getDocComment()); + +$s2 = $ref->getProperty('s2'); +var_dump($s2->getDocComment()); + +$s3 = $ref->getProperty('s3'); +var_dump($s2->getDocComment()); + +?> +--EXPECT-- +string(18) "/** @var string */" +string(18) "/** @var string */" +string(18) "/** @var string */" From 0d06a63ee311270a25bc0147271215c3ad90eba0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 17:19:37 +0100 Subject: [PATCH 123/201] Fixed bug #77325 Make ReflectionClassConstant->class the declaring class, not the class on which the constant was fetched. This matches the behavior for properties and methods. --- NEWS | 2 ++ ext/reflection/php_reflection.c | 10 +++++----- ext/reflection/tests/bug77325.phpt | 29 +++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 ext/reflection/tests/bug77325.phpt diff --git a/NEWS b/NEWS index 632383ed70118..b560f5813f32a 100644 --- a/NEWS +++ b/NEWS @@ -87,6 +87,8 @@ PHP NEWS Reflection::getDefaultValue (beberlei) . Fixed bug #64592 (ReflectionClass::getMethods() returns methods out of scope). (Nikita) + . Fixed bug #77325 (ReflectionClassConstant::$class returns wrong class when + extending). (Nikita) - Session: . Fixed bug #78624 (session_gc return value for user defined session diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 628d4f30ace1c..793cf5de2fe47 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1245,7 +1245,7 @@ static void reflection_property_factory_str(zend_class_entry *ce, const char *na } /* {{{ reflection_class_constant_factory */ -static void reflection_class_constant_factory(zend_class_entry *ce, zend_string *name_str, zend_class_constant *constant, zval *object) +static void reflection_class_constant_factory(zend_string *name_str, zend_class_constant *constant, zval *object) { reflection_object *intern; @@ -1257,7 +1257,7 @@ static void reflection_class_constant_factory(zend_class_entry *ce, zend_string intern->ignore_visibility = 0; ZVAL_STR_COPY(reflection_prop_name(object), name_str); - ZVAL_STR_COPY(reflection_prop_class(object), ce->name); + ZVAL_STR_COPY(reflection_prop_class(object), constant->ce->name); } /* }}} */ @@ -3473,7 +3473,7 @@ ZEND_METHOD(reflection_class_constant, __construct) intern->ce = constant->ce; intern->ignore_visibility = 0; ZVAL_STR_COPY(reflection_prop_name(object), constname); - ZVAL_STR_COPY(reflection_prop_class(object), ce->name); + ZVAL_STR_COPY(reflection_prop_class(object), constant->ce->name); } /* }}} */ @@ -4346,7 +4346,7 @@ ZEND_METHOD(reflection_class, getReflectionConstants) array_init(return_value); ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->constants_table, name, constant) { zval class_const; - reflection_class_constant_factory(ce, name, constant, &class_const); + reflection_class_constant_factory(name, constant, &class_const); zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &class_const); } ZEND_HASH_FOREACH_END(); } @@ -4395,7 +4395,7 @@ ZEND_METHOD(reflection_class, getReflectionConstant) if ((constant = zend_hash_find_ptr(&ce->constants_table, name)) == NULL) { RETURN_FALSE; } - reflection_class_constant_factory(ce, name, constant, return_value); + reflection_class_constant_factory(name, constant, return_value); } /* }}} */ diff --git a/ext/reflection/tests/bug77325.phpt b/ext/reflection/tests/bug77325.phpt new file mode 100644 index 0000000000000..f451b21ac93eb --- /dev/null +++ b/ext/reflection/tests/bug77325.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #77325: ReflectionClassConstant::$class returns wrong class when extending +--FILE-- +getReflectionConstants(); +foreach ($constants as $constant) { + var_dump($constant->class); + var_dump($constant->getDeclaringClass()->getName()); +} + +$constant = new ReflectionClassConstant(Bar::class, 'FOO'); +var_dump($constant->class); +var_dump($constant->getDeclaringClass()->getName()); + +?> +--EXPECT-- +string(3) "Foo" +string(3) "Foo" +string(3) "Foo" +string(3) "Foo" From 533633deda78301c58b360841d02c061f2a6106e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Feb 2020 17:25:47 +0100 Subject: [PATCH 124/201] Remove generated lexer Accidentially committed this when merging from 7.3. --- Zend/zend_language_scanner.c | 8488 ---------------------------------- 1 file changed, 8488 deletions(-) delete mode 100644 Zend/zend_language_scanner.c diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c deleted file mode 100644 index 46bafe5e52fc6..0000000000000 --- a/Zend/zend_language_scanner.c +++ /dev/null @@ -1,8488 +0,0 @@ -/* Generated by re2c 1.0.1 */ -#line 1 "Zend/zend_language_scanner.l" -/* - +----------------------------------------------------------------------+ - | Zend Engine | - +----------------------------------------------------------------------+ - | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.zend.com/license/2_00.txt. | - | If you did not receive a copy of the Zend license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@zend.com so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Marcus Boerger | - | Nuno Lopes | - | Scott MacVicar | - | Flex version authors: | - | Andi Gutmans | - | Zeev Suraski | - +----------------------------------------------------------------------+ -*/ - -#if 0 -# define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c) -#else -# define YYDEBUG(s, c) -#endif - -#include "zend_language_scanner_defs.h" - -#include -#include "zend.h" -#ifdef ZEND_WIN32 -# include -#endif -#include "zend_alloc.h" -#include -#include "zend_compile.h" -#include "zend_language_scanner.h" -#include "zend_highlight.h" -#include "zend_constants.h" -#include "zend_variables.h" -#include "zend_operators.h" -#include "zend_API.h" -#include "zend_strtod.h" -#include "zend_exceptions.h" -#include "zend_virtual_cwd.h" - -#define YYCTYPE unsigned char -#define YYFILL(n) { if ((YYCURSOR + n) >= (YYLIMIT + ZEND_MMAP_AHEAD)) { return 0; } } -#define YYCURSOR SCNG(yy_cursor) -#define YYLIMIT SCNG(yy_limit) -#define YYMARKER SCNG(yy_marker) - -#define YYGETCONDITION() SCNG(yy_state) -#define YYSETCONDITION(s) SCNG(yy_state) = s - -#define STATE(name) yyc##name - -/* emulate flex constructs */ -#define BEGIN(state) YYSETCONDITION(STATE(state)) -#define YYSTATE YYGETCONDITION() -#define yytext ((char*)SCNG(yy_text)) -#define yyleng SCNG(yy_leng) -#define yyless(x) do { YYCURSOR = (unsigned char*)yytext + x; \ - yyleng = (unsigned int)x; } while(0) -#define yymore() goto yymore_restart - -/* perform sanity check. If this message is triggered you should - increase the ZEND_MMAP_AHEAD value in the zend_streams.h file */ -#define YYMAXFILL 16 - -#if ZEND_MMAP_AHEAD < YYMAXFILL -# error ZEND_MMAP_AHEAD should be greater than or equal to YYMAXFILL -#endif - -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -/* Globals Macros */ -#define SCNG LANG_SCNG -#ifdef ZTS -ZEND_API ts_rsrc_id language_scanner_globals_id; -ZEND_API size_t language_scanner_globals_offset; -#else -ZEND_API zend_php_scanner_globals language_scanner_globals; -#endif - -#define HANDLE_NEWLINES(s, l) \ -do { \ - char *p = (s), *boundary = p+(l); \ - \ - while (p= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || (c) == '_' || (c) >= 0x80) -#define IS_LABEL_SUCCESSOR(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || ((c) >= '0' && (c) <= '9') || (c) == '_' || (c) >= 0x80) - -#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7') -#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F')) - -BEGIN_EXTERN_C() - -static void strip_underscores(char *str, size_t *len) -{ - char *src = str, *dest = str; - while (*src != '\0') { - if (*src != '_') { - *dest = *src; - dest++; - } else { - --(*len); - } - src++; - } - *dest = '\0'; -} - -static size_t encoding_filter_script_to_internal(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length) -{ - const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(); - ZEND_ASSERT(internal_encoding); - return zend_multibyte_encoding_converter(to, to_length, from, from_length, internal_encoding, LANG_SCNG(script_encoding)); -} - -static size_t encoding_filter_script_to_intermediate(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length) -{ - return zend_multibyte_encoding_converter(to, to_length, from, from_length, zend_multibyte_encoding_utf8, LANG_SCNG(script_encoding)); -} - -static size_t encoding_filter_intermediate_to_script(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length) -{ - return zend_multibyte_encoding_converter(to, to_length, from, from_length, -LANG_SCNG(script_encoding), zend_multibyte_encoding_utf8); -} - -static size_t encoding_filter_intermediate_to_internal(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length) -{ - const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(); - ZEND_ASSERT(internal_encoding); - return zend_multibyte_encoding_converter(to, to_length, from, from_length, -internal_encoding, zend_multibyte_encoding_utf8); -} - - -static void _yy_push_state(int new_state) -{ - zend_stack_push(&SCNG(state_stack), (void *) &YYGETCONDITION()); - YYSETCONDITION(new_state); -} - -#define yy_push_state(state_and_tsrm) _yy_push_state(yyc##state_and_tsrm) - -static void yy_pop_state(void) -{ - int *stack_state = zend_stack_top(&SCNG(state_stack)); - YYSETCONDITION(*stack_state); - zend_stack_del_top(&SCNG(state_stack)); -} - -static void yy_scan_buffer(char *str, unsigned int len) -{ - YYCURSOR = (YYCTYPE*)str; - YYLIMIT = YYCURSOR + len; - if (!SCNG(yy_start)) { - SCNG(yy_start) = YYCURSOR; - } -} - -void startup_scanner(void) -{ - CG(parse_error) = 0; - CG(doc_comment) = NULL; - CG(extra_fn_flags) = 0; - zend_stack_init(&SCNG(state_stack), sizeof(int)); - zend_ptr_stack_init(&SCNG(heredoc_label_stack)); - SCNG(heredoc_scan_ahead) = 0; -} - -static void heredoc_label_dtor(zend_heredoc_label *heredoc_label) { - efree(heredoc_label->label); -} - -void shutdown_scanner(void) -{ - CG(parse_error) = 0; - RESET_DOC_COMMENT(); - zend_stack_destroy(&SCNG(state_stack)); - zend_ptr_stack_clean(&SCNG(heredoc_label_stack), (void (*)(void *)) &heredoc_label_dtor, 1); - zend_ptr_stack_destroy(&SCNG(heredoc_label_stack)); - SCNG(heredoc_scan_ahead) = 0; - SCNG(on_event) = NULL; -} - -ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state) -{ - lex_state->yy_leng = SCNG(yy_leng); - lex_state->yy_start = SCNG(yy_start); - lex_state->yy_text = SCNG(yy_text); - lex_state->yy_cursor = SCNG(yy_cursor); - lex_state->yy_marker = SCNG(yy_marker); - lex_state->yy_limit = SCNG(yy_limit); - - lex_state->state_stack = SCNG(state_stack); - zend_stack_init(&SCNG(state_stack), sizeof(int)); - - lex_state->heredoc_label_stack = SCNG(heredoc_label_stack); - zend_ptr_stack_init(&SCNG(heredoc_label_stack)); - - lex_state->in = SCNG(yy_in); - lex_state->yy_state = YYSTATE; - lex_state->filename = zend_get_compiled_filename(); - lex_state->lineno = CG(zend_lineno); - - lex_state->script_org = SCNG(script_org); - lex_state->script_org_size = SCNG(script_org_size); - lex_state->script_filtered = SCNG(script_filtered); - lex_state->script_filtered_size = SCNG(script_filtered_size); - lex_state->input_filter = SCNG(input_filter); - lex_state->output_filter = SCNG(output_filter); - lex_state->script_encoding = SCNG(script_encoding); - - lex_state->on_event = SCNG(on_event); - lex_state->on_event_context = SCNG(on_event_context); - - lex_state->ast = CG(ast); - lex_state->ast_arena = CG(ast_arena); -} - -ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state) -{ - SCNG(yy_leng) = lex_state->yy_leng; - SCNG(yy_start) = lex_state->yy_start; - SCNG(yy_text) = lex_state->yy_text; - SCNG(yy_cursor) = lex_state->yy_cursor; - SCNG(yy_marker) = lex_state->yy_marker; - SCNG(yy_limit) = lex_state->yy_limit; - - zend_stack_destroy(&SCNG(state_stack)); - SCNG(state_stack) = lex_state->state_stack; - - zend_ptr_stack_clean(&SCNG(heredoc_label_stack), (void (*)(void *)) &heredoc_label_dtor, 1); - zend_ptr_stack_destroy(&SCNG(heredoc_label_stack)); - SCNG(heredoc_label_stack) = lex_state->heredoc_label_stack; - - SCNG(yy_in) = lex_state->in; - YYSETCONDITION(lex_state->yy_state); - CG(zend_lineno) = lex_state->lineno; - zend_restore_compiled_filename(lex_state->filename); - - if (SCNG(script_filtered)) { - efree(SCNG(script_filtered)); - SCNG(script_filtered) = NULL; - } - SCNG(script_org) = lex_state->script_org; - SCNG(script_org_size) = lex_state->script_org_size; - SCNG(script_filtered) = lex_state->script_filtered; - SCNG(script_filtered_size) = lex_state->script_filtered_size; - SCNG(input_filter) = lex_state->input_filter; - SCNG(output_filter) = lex_state->output_filter; - SCNG(script_encoding) = lex_state->script_encoding; - - SCNG(on_event) = lex_state->on_event; - SCNG(on_event_context) = lex_state->on_event_context; - - CG(ast) = lex_state->ast; - CG(ast_arena) = lex_state->ast_arena; - - RESET_DOC_COMMENT(); -} - -ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle) -{ - zend_llist_del_element(&CG(open_files), file_handle, (int (*)(void *, void *)) zend_compare_file_handles); - /* zend_file_handle_dtor() operates on the copy, so we have to NULLify the original here */ - file_handle->opened_path = NULL; - if (file_handle->free_filename) { - file_handle->filename = NULL; - } -} - -ZEND_API void zend_lex_tstring(zval *zv) -{ - if (SCNG(on_event)) { - SCNG(on_event)(ON_FEEDBACK, T_STRING, 0, SCNG(on_event_context)); - } - - ZVAL_STRINGL(zv, (char*)SCNG(yy_text), SCNG(yy_leng)); -} - -#define BOM_UTF32_BE "\x00\x00\xfe\xff" -#define BOM_UTF32_LE "\xff\xfe\x00\x00" -#define BOM_UTF16_BE "\xfe\xff" -#define BOM_UTF16_LE "\xff\xfe" -#define BOM_UTF8 "\xef\xbb\xbf" - -static const zend_encoding *zend_multibyte_detect_utf_encoding(const unsigned char *script, size_t script_size) -{ - const unsigned char *p; - int wchar_size = 2; - int le = 0; - - /* utf-16 or utf-32? */ - p = script; - assert(p >= script); - while ((size_t)(p-script) < script_size) { - p = memchr(p, 0, script_size-(p-script)-2); - if (!p) { - break; - } - if (*(p+1) == '\0' && *(p+2) == '\0') { - wchar_size = 4; - break; - } - - /* searching for UTF-32 specific byte orders, so this will do */ - p += 4; - } - - /* BE or LE? */ - p = script; - assert(p >= script); - while ((size_t)(p-script) < script_size) { - if (*p == '\0' && *(p+wchar_size-1) != '\0') { - /* BE */ - le = 0; - break; - } else if (*p != '\0' && *(p+wchar_size-1) == '\0') { - /* LE* */ - le = 1; - break; - } - p += wchar_size; - } - - if (wchar_size == 2) { - return le ? zend_multibyte_encoding_utf16le : zend_multibyte_encoding_utf16be; - } else { - return le ? zend_multibyte_encoding_utf32le : zend_multibyte_encoding_utf32be; - } - - return NULL; -} - -static const zend_encoding* zend_multibyte_detect_unicode(void) -{ - const zend_encoding *script_encoding = NULL; - int bom_size; - unsigned char *pos1, *pos2; - - if (LANG_SCNG(script_org_size) < sizeof(BOM_UTF32_LE)-1) { - return NULL; - } - - /* check out BOM */ - if (!memcmp(LANG_SCNG(script_org), BOM_UTF32_BE, sizeof(BOM_UTF32_BE)-1)) { - script_encoding = zend_multibyte_encoding_utf32be; - bom_size = sizeof(BOM_UTF32_BE)-1; - } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF32_LE, sizeof(BOM_UTF32_LE)-1)) { - script_encoding = zend_multibyte_encoding_utf32le; - bom_size = sizeof(BOM_UTF32_LE)-1; - } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF16_BE, sizeof(BOM_UTF16_BE)-1)) { - script_encoding = zend_multibyte_encoding_utf16be; - bom_size = sizeof(BOM_UTF16_BE)-1; - } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF16_LE, sizeof(BOM_UTF16_LE)-1)) { - script_encoding = zend_multibyte_encoding_utf16le; - bom_size = sizeof(BOM_UTF16_LE)-1; - } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF8, sizeof(BOM_UTF8)-1)) { - script_encoding = zend_multibyte_encoding_utf8; - bom_size = sizeof(BOM_UTF8)-1; - } - - if (script_encoding) { - /* remove BOM */ - LANG_SCNG(script_org) += bom_size; - LANG_SCNG(script_org_size) -= bom_size; - - return script_encoding; - } - - /* script contains NULL bytes -> auto-detection */ - if ((pos1 = memchr(LANG_SCNG(script_org), 0, LANG_SCNG(script_org_size)))) { - /* check if the NULL byte is after the __HALT_COMPILER(); */ - pos2 = LANG_SCNG(script_org); - - while ((size_t)(pos1 - pos2) >= sizeof("__HALT_COMPILER();")-1) { - pos2 = memchr(pos2, '_', pos1 - pos2); - if (!pos2) break; - pos2++; - if (strncasecmp((char*)pos2, "_HALT_COMPILER", sizeof("_HALT_COMPILER")-1) == 0) { - pos2 += sizeof("_HALT_COMPILER")-1; - while (*pos2 == ' ' || - *pos2 == '\t' || - *pos2 == '\r' || - *pos2 == '\n') { - pos2++; - } - if (*pos2 == '(') { - pos2++; - while (*pos2 == ' ' || - *pos2 == '\t' || - *pos2 == '\r' || - *pos2 == '\n') { - pos2++; - } - if (*pos2 == ')') { - pos2++; - while (*pos2 == ' ' || - *pos2 == '\t' || - *pos2 == '\r' || - *pos2 == '\n') { - pos2++; - } - if (*pos2 == ';') { - return NULL; - } - } - } - } - } - /* make best effort if BOM is missing */ - return zend_multibyte_detect_utf_encoding(LANG_SCNG(script_org), LANG_SCNG(script_org_size)); - } - - return NULL; -} - -static const zend_encoding* zend_multibyte_find_script_encoding(void) -{ - const zend_encoding *script_encoding; - - if (CG(detect_unicode)) { - /* check out bom(byte order mark) and see if containing wchars */ - script_encoding = zend_multibyte_detect_unicode(); - if (script_encoding != NULL) { - /* bom or wchar detection is prior to 'script_encoding' option */ - return script_encoding; - } - } - - /* if no script_encoding specified, just leave alone */ - if (!CG(script_encoding_list) || !CG(script_encoding_list_size)) { - return NULL; - } - - /* if multiple encodings specified, detect automagically */ - if (CG(script_encoding_list_size) > 1) { - return zend_multibyte_encoding_detector(LANG_SCNG(script_org), LANG_SCNG(script_org_size), CG(script_encoding_list), CG(script_encoding_list_size)); - } - - return CG(script_encoding_list)[0]; -} - -ZEND_API int zend_multibyte_set_filter(const zend_encoding *onetime_encoding) -{ - const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(); - const zend_encoding *script_encoding = onetime_encoding ? onetime_encoding: zend_multibyte_find_script_encoding(); - - if (!script_encoding) { - return FAILURE; - } - - /* judge input/output filter */ - LANG_SCNG(script_encoding) = script_encoding; - LANG_SCNG(input_filter) = NULL; - LANG_SCNG(output_filter) = NULL; - - if (!internal_encoding || LANG_SCNG(script_encoding) == internal_encoding) { - if (!zend_multibyte_check_lexer_compatibility(LANG_SCNG(script_encoding))) { - /* and if not, work around w/ script_encoding -> utf-8 -> script_encoding conversion */ - LANG_SCNG(input_filter) = encoding_filter_script_to_intermediate; - LANG_SCNG(output_filter) = encoding_filter_intermediate_to_script; - } else { - LANG_SCNG(input_filter) = NULL; - LANG_SCNG(output_filter) = NULL; - } - return SUCCESS; - } - - if (zend_multibyte_check_lexer_compatibility(internal_encoding)) { - LANG_SCNG(input_filter) = encoding_filter_script_to_internal; - LANG_SCNG(output_filter) = NULL; - } else if (zend_multibyte_check_lexer_compatibility(LANG_SCNG(script_encoding))) { - LANG_SCNG(input_filter) = NULL; - LANG_SCNG(output_filter) = encoding_filter_script_to_internal; - } else { - /* both script and internal encodings are incompatible w/ flex */ - LANG_SCNG(input_filter) = encoding_filter_script_to_intermediate; - LANG_SCNG(output_filter) = encoding_filter_intermediate_to_internal; - } - - return 0; -} - -ZEND_API int open_file_for_scanning(zend_file_handle *file_handle) -{ - char *buf; - size_t size; - zend_string *compiled_filename; - - if (zend_stream_fixup(file_handle, &buf, &size) == FAILURE) { - /* Still add it to open_files to make destroy_file_handle work */ - zend_llist_add_element(&CG(open_files), file_handle); - return FAILURE; - } - - ZEND_ASSERT(!EG(exception) && "stream_fixup() should have failed"); - zend_llist_add_element(&CG(open_files), file_handle); - if (file_handle->handle.stream.handle >= (void*)file_handle && file_handle->handle.stream.handle <= (void*)(file_handle+1)) { - zend_file_handle *fh = (zend_file_handle*)zend_llist_get_last(&CG(open_files)); - size_t diff = (char*)file_handle->handle.stream.handle - (char*)file_handle; - fh->handle.stream.handle = (void*)(((char*)fh) + diff); - file_handle->handle.stream.handle = fh->handle.stream.handle; - } - - /* Reset the scanner for scanning the new file */ - SCNG(yy_in) = file_handle; - SCNG(yy_start) = NULL; - - if (size != (size_t)-1) { - if (CG(multibyte)) { - SCNG(script_org) = (unsigned char*)buf; - SCNG(script_org_size) = size; - SCNG(script_filtered) = NULL; - - zend_multibyte_set_filter(NULL); - - if (SCNG(input_filter)) { - if ((size_t)-1 == SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size))) { - zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected " - "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding))); - } - buf = (char*)SCNG(script_filtered); - size = SCNG(script_filtered_size); - } - } - SCNG(yy_start) = (unsigned char *)buf; - yy_scan_buffer(buf, (unsigned int)size); - } else { - zend_error_noreturn(E_COMPILE_ERROR, "zend_stream_mmap() failed"); - } - - if (CG(skip_shebang)) { - CG(skip_shebang) = 0; - BEGIN(SHEBANG); - } else { - BEGIN(INITIAL); - } - - if (file_handle->opened_path) { - compiled_filename = zend_string_copy(file_handle->opened_path); - } else { - compiled_filename = zend_string_init(file_handle->filename, strlen(file_handle->filename), 0); - } - - zend_set_compiled_filename(compiled_filename); - zend_string_release_ex(compiled_filename, 0); - - RESET_DOC_COMMENT(); - CG(zend_lineno) = 1; - CG(increment_lineno) = 0; - return SUCCESS; -} -END_EXTERN_C() - -static zend_op_array *zend_compile(int type) -{ - zend_op_array *op_array = NULL; - zend_bool original_in_compilation = CG(in_compilation); - - CG(in_compilation) = 1; - CG(ast) = NULL; - CG(ast_arena) = zend_arena_create(1024 * 32); - - if (!zendparse()) { - int last_lineno = CG(zend_lineno); - zend_file_context original_file_context; - zend_oparray_context original_oparray_context; - zend_op_array *original_active_op_array = CG(active_op_array); - - op_array = emalloc(sizeof(zend_op_array)); - init_op_array(op_array, type, INITIAL_OP_ARRAY_SIZE); - CG(active_op_array) = op_array; - - /* Use heap to not waste arena memory */ - op_array->fn_flags |= ZEND_ACC_HEAP_RT_CACHE; - - if (zend_ast_process) { - zend_ast_process(CG(ast)); - } - - zend_file_context_begin(&original_file_context); - zend_oparray_context_begin(&original_oparray_context); - zend_compile_top_stmt(CG(ast)); - CG(zend_lineno) = last_lineno; - zend_emit_final_return(type == ZEND_USER_FUNCTION); - op_array->line_start = 1; - op_array->line_end = last_lineno; - pass_two(op_array); - zend_oparray_context_end(&original_oparray_context); - zend_file_context_end(&original_file_context); - - CG(active_op_array) = original_active_op_array; - } - - zend_ast_destroy(CG(ast)); - zend_arena_destroy(CG(ast_arena)); - - CG(in_compilation) = original_in_compilation; - - return op_array; -} - -ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type) -{ - zend_lex_state original_lex_state; - zend_op_array *op_array = NULL; - zend_save_lexical_state(&original_lex_state); - - if (open_file_for_scanning(file_handle)==FAILURE) { - if (!EG(exception)) { - if (type==ZEND_REQUIRE) { - zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file_handle->filename); - zend_bailout(); - } else { - zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename); - } - } - } else { - op_array = zend_compile(ZEND_USER_FUNCTION); - } - - zend_restore_lexical_state(&original_lex_state); - return op_array; -} - - -zend_op_array *compile_filename(int type, zval *filename) -{ - zend_file_handle file_handle; - zval tmp; - zend_op_array *retval; - zend_string *opened_path = NULL; - - if (Z_TYPE_P(filename) != IS_STRING) { - ZVAL_STR(&tmp, zval_get_string(filename)); - filename = &tmp; - } - zend_stream_init_filename(&file_handle, Z_STRVAL_P(filename)); - - retval = zend_compile_file(&file_handle, type); - if (retval && file_handle.handle.stream.handle) { - if (!file_handle.opened_path) { - file_handle.opened_path = opened_path = zend_string_copy(Z_STR_P(filename)); - } - - zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path); - - if (opened_path) { - zend_string_release_ex(opened_path, 0); - } - } - zend_destroy_file_handle(&file_handle); - - if (UNEXPECTED(filename == &tmp)) { - zval_ptr_dtor(&tmp); - } - return retval; -} - -ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename) -{ - char *buf; - size_t size, old_len; - zend_string *new_compiled_filename; - - /* enforce ZEND_MMAP_AHEAD trailing NULLs for flex... */ - old_len = Z_STRLEN_P(str); - Z_STR_P(str) = zend_string_extend(Z_STR_P(str), old_len + ZEND_MMAP_AHEAD, 0); - Z_TYPE_INFO_P(str) = IS_STRING_EX; - memset(Z_STRVAL_P(str) + old_len, 0, ZEND_MMAP_AHEAD + 1); - - SCNG(yy_in) = NULL; - SCNG(yy_start) = NULL; - - buf = Z_STRVAL_P(str); - size = old_len; - - if (CG(multibyte)) { - SCNG(script_org) = (unsigned char*)buf; - SCNG(script_org_size) = size; - SCNG(script_filtered) = NULL; - - zend_multibyte_set_filter(zend_multibyte_get_internal_encoding()); - - if (SCNG(input_filter)) { - if ((size_t)-1 == SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size))) { - zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected " - "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding))); - } - buf = (char*)SCNG(script_filtered); - size = SCNG(script_filtered_size); - } - } - - yy_scan_buffer(buf, (unsigned int)size); - - new_compiled_filename = zend_string_init(filename, strlen(filename), 0); - zend_set_compiled_filename(new_compiled_filename); - zend_string_release_ex(new_compiled_filename, 0); - CG(zend_lineno) = 1; - CG(increment_lineno) = 0; - RESET_DOC_COMMENT(); - return SUCCESS; -} - - -ZEND_API size_t zend_get_scanned_file_offset(void) -{ - size_t offset = SCNG(yy_cursor) - SCNG(yy_start); - if (SCNG(input_filter)) { - size_t original_offset = offset, length = 0; - do { - unsigned char *p = NULL; - if ((size_t)-1 == SCNG(input_filter)(&p, &length, SCNG(script_org), offset)) { - return (size_t)-1; - } - efree(p); - if (length > original_offset) { - offset--; - } else if (length < original_offset) { - offset++; - } - } while (original_offset != length); - } - return offset; -} - -zend_op_array *compile_string(zval *source_string, char *filename) -{ - zend_lex_state original_lex_state; - zend_op_array *op_array = NULL; - zval tmp; - - if (UNEXPECTED(Z_TYPE_P(source_string) != IS_STRING)) { - ZVAL_STR(&tmp, zval_get_string_func(source_string)); - } else { - ZVAL_COPY(&tmp, source_string); - } - - if (Z_STRLEN(tmp)==0) { - zval_ptr_dtor(&tmp); - return NULL; - } - - zend_save_lexical_state(&original_lex_state); - if (zend_prepare_string_for_scanning(&tmp, filename) == SUCCESS) { - BEGIN(ST_IN_SCRIPTING); - op_array = zend_compile(ZEND_EVAL_CODE); - } - - zend_restore_lexical_state(&original_lex_state); - zval_ptr_dtor(&tmp); - - return op_array; -} - - -BEGIN_EXTERN_C() -int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini) -{ - zend_lex_state original_lex_state; - zend_file_handle file_handle; - - zend_stream_init_filename(&file_handle, filename); - zend_save_lexical_state(&original_lex_state); - if (open_file_for_scanning(&file_handle)==FAILURE) { - zend_message_dispatcher(ZMSG_FAILED_HIGHLIGHT_FOPEN, filename); - zend_restore_lexical_state(&original_lex_state); - return FAILURE; - } - zend_highlight(syntax_highlighter_ini); - if (SCNG(script_filtered)) { - efree(SCNG(script_filtered)); - SCNG(script_filtered) = NULL; - } - zend_destroy_file_handle(&file_handle); - zend_restore_lexical_state(&original_lex_state); - return SUCCESS; -} - -int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name) -{ - zend_lex_state original_lex_state; - zval tmp; - - if (UNEXPECTED(Z_TYPE_P(str) != IS_STRING)) { - ZVAL_STR(&tmp, zval_get_string_func(str)); - str = &tmp; - } - zend_save_lexical_state(&original_lex_state); - if (zend_prepare_string_for_scanning(str, str_name)==FAILURE) { - zend_restore_lexical_state(&original_lex_state); - if (UNEXPECTED(str == &tmp)) { - zval_ptr_dtor(&tmp); - } - return FAILURE; - } - BEGIN(INITIAL); - zend_highlight(syntax_highlighter_ini); - if (SCNG(script_filtered)) { - efree(SCNG(script_filtered)); - SCNG(script_filtered) = NULL; - } - zend_restore_lexical_state(&original_lex_state); - if (UNEXPECTED(str == &tmp)) { - zval_ptr_dtor(&tmp); - } - return SUCCESS; -} - -ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter, const zend_encoding *old_encoding) -{ - size_t length; - unsigned char *new_yy_start; - - /* convert and set */ - if (!SCNG(input_filter)) { - if (SCNG(script_filtered)) { - efree(SCNG(script_filtered)); - SCNG(script_filtered) = NULL; - } - SCNG(script_filtered_size) = 0; - length = SCNG(script_org_size); - new_yy_start = SCNG(script_org); - } else { - if ((size_t)-1 == SCNG(input_filter)(&new_yy_start, &length, SCNG(script_org), SCNG(script_org_size))) { - zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected " - "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding))); - } - if (SCNG(script_filtered)) { - efree(SCNG(script_filtered)); - } - SCNG(script_filtered) = new_yy_start; - SCNG(script_filtered_size) = length; - } - - SCNG(yy_cursor) = new_yy_start + (SCNG(yy_cursor) - SCNG(yy_start)); - SCNG(yy_marker) = new_yy_start + (SCNG(yy_marker) - SCNG(yy_start)); - SCNG(yy_text) = new_yy_start + (SCNG(yy_text) - SCNG(yy_start)); - SCNG(yy_limit) = new_yy_start + length; - - SCNG(yy_start) = new_yy_start; -} - - -// TODO: avoid reallocation ??? -# define zend_copy_value(zendlval, yytext, yyleng) \ - if (SCNG(output_filter)) { \ - size_t sz = 0; \ - char *s = NULL; \ - SCNG(output_filter)((unsigned char **)&s, &sz, (unsigned char *)yytext, (size_t)yyleng); \ - ZVAL_STRINGL(zendlval, s, sz); \ - efree(s); \ - } else if (yyleng == 1) { \ - ZVAL_INTERNED_STR(zendlval, ZSTR_CHAR((zend_uchar)*(yytext))); \ - } else { \ - ZVAL_STRINGL(zendlval, yytext, yyleng); \ - } - -static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quote_type) -{ - register char *s, *t; - char *end; - - if (len <= 1) { - if (len < 1) { - ZVAL_EMPTY_STRING(zendlval); - } else { - zend_uchar c = (zend_uchar)*str; - if (c == '\n' || c == '\r') { - CG(zend_lineno)++; - } - ZVAL_INTERNED_STR(zendlval, ZSTR_CHAR(c)); - } - goto skip_escape_conversion; - } - - ZVAL_STRINGL(zendlval, str, len); - - /* convert escape sequences */ - s = Z_STRVAL_P(zendlval); - end = s+Z_STRLEN_P(zendlval); - while (1) { - if (UNEXPECTED(*s=='\\')) { - break; - } - if (*s == '\n' || (*s == '\r' && (*(s+1) != '\n'))) { - CG(zend_lineno)++; - } - s++; - if (s == end) { - goto skip_escape_conversion; - } - } - - t = s; - while (s= end) { - *t++ = '\\'; - break; - } - - switch(*s) { - case 'n': - *t++ = '\n'; - break; - case 'r': - *t++ = '\r'; - break; - case 't': - *t++ = '\t'; - break; - case 'f': - *t++ = '\f'; - break; - case 'v': - *t++ = '\v'; - break; - case 'e': -#ifdef ZEND_WIN32 - *t++ = VK_ESCAPE; -#else - *t++ = '\e'; -#endif - break; - case '"': - case '`': - if (*s != quote_type) { - *t++ = '\\'; - *t++ = *s; - break; - } - case '\\': - case '$': - *t++ = *s; - break; - case 'x': - case 'X': - if (ZEND_IS_HEX(*(s+1))) { - char hex_buf[3] = { 0, 0, 0 }; - - hex_buf[0] = *(++s); - if (ZEND_IS_HEX(*(s+1))) { - hex_buf[1] = *(++s); - } - *t++ = (char) ZEND_STRTOL(hex_buf, NULL, 16); - } else { - *t++ = '\\'; - *t++ = *s; - } - break; - /* UTF-8 codepoint escape, format: /\\u\{\x+\}/ */ - case 'u': - { - /* cache where we started so we can parse after validating */ - char *start = s + 1; - size_t len = 0; - zend_bool valid = 1; - unsigned long codepoint; - - if (*start != '{') { - /* we silently let this pass to avoid breaking code - * with JSON in string literals (e.g. "\"\u202e\"" - */ - *t++ = '\\'; - *t++ = 'u'; - break; - } else { - /* on the other hand, invalid \u{blah} errors */ - s++; - len++; - s++; - while (*s != '}') { - if (!ZEND_IS_HEX(*s)) { - valid = 0; - break; - } else { - len++; - } - s++; - } - if (*s == '}') { - valid = 1; - len++; - } - } - - /* \u{} is invalid */ - if (len <= 2) { - valid = 0; - } - - if (!valid) { - zend_throw_exception(zend_ce_parse_error, - "Invalid UTF-8 codepoint escape sequence", 0); - zval_ptr_dtor(zendlval); - ZVAL_UNDEF(zendlval); - return FAILURE; - } - - errno = 0; - codepoint = strtoul(start + 1, NULL, 16); - - /* per RFC 3629, UTF-8 can only represent 21 bits */ - if (codepoint > 0x10FFFF || errno) { - zend_throw_exception(zend_ce_parse_error, - "Invalid UTF-8 codepoint escape sequence: Codepoint too large", 0); - zval_ptr_dtor(zendlval); - ZVAL_UNDEF(zendlval); - return FAILURE; - } - - /* based on https://en.wikipedia.org/wiki/UTF-8#Sample_code */ - if (codepoint < 0x80) { - *t++ = codepoint; - } else if (codepoint <= 0x7FF) { - *t++ = (codepoint >> 6) + 0xC0; - *t++ = (codepoint & 0x3F) + 0x80; - } else if (codepoint <= 0xFFFF) { - *t++ = (codepoint >> 12) + 0xE0; - *t++ = ((codepoint >> 6) & 0x3F) + 0x80; - *t++ = (codepoint & 0x3F) + 0x80; - } else if (codepoint <= 0x10FFFF) { - *t++ = (codepoint >> 18) + 0xF0; - *t++ = ((codepoint >> 12) & 0x3F) + 0x80; - *t++ = ((codepoint >> 6) & 0x3F) + 0x80; - *t++ = (codepoint & 0x3F) + 0x80; - } - } - break; - default: - /* check for an octal */ - if (ZEND_IS_OCT(*s)) { - char octal_buf[4] = { 0, 0, 0, 0 }; - - octal_buf[0] = *s; - if (ZEND_IS_OCT(*(s+1))) { - octal_buf[1] = *(++s); - if (ZEND_IS_OCT(*(s+1))) { - octal_buf[2] = *(++s); - } - } - if (octal_buf[2] && - (octal_buf[0] > '3')) { - /* 3 octit values must not overflow 0xFF (\377) */ - zend_error(E_COMPILE_WARNING, "Octal escape sequence overflow \\%s is greater than \\377", octal_buf); - } - - *t++ = (char) ZEND_STRTOL(octal_buf, NULL, 8); - } else { - *t++ = '\\'; - *t++ = *s; - } - break; - } - } else { - *t++ = *s; - } - - if (*s == '\n' || (*s == '\r' && (*(s+1) != '\n'))) { - CG(zend_lineno)++; - } - s++; - } - *t = 0; - Z_STRLEN_P(zendlval) = t - Z_STRVAL_P(zendlval); - -skip_escape_conversion: - if (SCNG(output_filter)) { - size_t sz = 0; - unsigned char *str; - // TODO: avoid realocation ??? - s = Z_STRVAL_P(zendlval); - SCNG(output_filter)(&str, &sz, (unsigned char *)s, (size_t)Z_STRLEN_P(zendlval)); - zval_ptr_dtor(zendlval); - ZVAL_STRINGL(zendlval, (char *) str, sz); - efree(str); - } - return SUCCESS; -} - -#define HEREDOC_USING_SPACES 1 -#define HEREDOC_USING_TABS 2 - -static const char *next_newline(const char *str, const char *end, size_t *newline_len) { - for (; str < end; str++) { - if (*str == '\r') { - *newline_len = str + 1 < end && *(str + 1) == '\n' ? 2 : 1; - } else if (*str == '\n') { - *newline_len = 1; - return str; - } - } - *newline_len = 0; - return NULL; -} - -static zend_bool strip_multiline_string_indentation( - zval *zendlval, int indentation, zend_bool using_spaces, - zend_bool newline_at_start, zend_bool newline_at_end) -{ - const char *str = Z_STRVAL_P(zendlval), *end = str + Z_STRLEN_P(zendlval); - char *copy = Z_STRVAL_P(zendlval); - - int newline_count = 0; - size_t newline_len; - const char *nl; - - if (!newline_at_start) { - nl = next_newline(str, end, &newline_len); - if (!nl) { - return 1; - } - - str = nl + newline_len; - copy = (char *) nl + newline_len; - newline_count++; - } else { - nl = str; - } - - /* <= intentional */ - while (str <= end && nl) { - size_t skip; - nl = next_newline(str, end, &newline_len); - if (!nl && newline_at_end) { - nl = end; - } - - /* Try to skip indentation */ - for (skip = 0; skip < indentation; skip++, str++) { - if (str == nl) { - /* Don't require full indentation on whitespace-only lines */ - break; - } - - if (str == end || (*str != ' ' && *str != '\t')) { - CG(zend_lineno) += newline_count; - zend_throw_exception_ex(zend_ce_parse_error, 0, - "Invalid body indentation level (expecting an indentation level of at least %d)", indentation); - goto error; - } - - if ((!using_spaces && *str == ' ') || (using_spaces && *str == '\t')) { - CG(zend_lineno) += newline_count; - zend_throw_exception(zend_ce_parse_error, - "Invalid indentation - tabs and spaces cannot be mixed", 0); - goto error; - } - } - - if (str == end) { - break; - } - - size_t len = nl ? (nl - str + newline_len) : (end - str); - memmove(copy, str, len); - str += len; - copy += len; - newline_count++; - } - - *copy = '\0'; - Z_STRLEN_P(zendlval) = copy - Z_STRVAL_P(zendlval); - return 1; - -error: - zval_ptr_dtor_str(zendlval); - ZVAL_UNDEF(zendlval); - - return 0; -} - -static void copy_heredoc_label_stack(void *void_heredoc_label) -{ - zend_heredoc_label *heredoc_label = void_heredoc_label; - zend_heredoc_label *new_heredoc_label = emalloc(sizeof(zend_heredoc_label)); - - *new_heredoc_label = *heredoc_label; - new_heredoc_label->label = estrndup(heredoc_label->label, heredoc_label->length); - - zend_ptr_stack_push(&SCNG(heredoc_label_stack), (void *) new_heredoc_label); -} - -#define PARSER_MODE() \ - EXPECTED(elem != NULL) - -#define RETURN_TOKEN(_token) do { \ - token = _token; \ - goto emit_token; \ - } while (0) - -#define RETURN_TOKEN_WITH_VAL(_token) do { \ - token = _token; \ - goto emit_token_with_val; \ - } while (0) - -#define RETURN_TOKEN_WITH_STR(_token, _offset) do { \ - token = _token; \ - offset = _offset; \ - goto emit_token_with_str; \ - } while (0) - -#define RETURN_OR_SKIP_TOKEN(_token) do { \ - token = _token; \ - if (PARSER_MODE()) { \ - goto skip_token; \ - } \ - goto emit_token; \ - } while (0) - -int ZEND_FASTCALL lex_scan(zval *zendlval, zend_parser_stack_elem *elem) -{ -int token; -int offset; -int start_line = CG(zend_lineno); - - ZVAL_UNDEF(zendlval); -restart: - SCNG(yy_text) = YYCURSOR; - - -#line 1259 "Zend/zend_language_scanner.c" -{ - YYCTYPE yych; - unsigned int yyaccept = 0; - if (YYGETCONDITION() < 5) { - if (YYGETCONDITION() < 2) { - if (YYGETCONDITION() < 1) { - goto yyc_ST_IN_SCRIPTING; - } else { - goto yyc_ST_LOOKING_FOR_PROPERTY; - } - } else { - if (YYGETCONDITION() < 3) { - goto yyc_ST_BACKQUOTE; - } else { - if (YYGETCONDITION() < 4) { - goto yyc_ST_DOUBLE_QUOTES; - } else { - goto yyc_ST_HEREDOC; - } - } - } - } else { - if (YYGETCONDITION() < 8) { - if (YYGETCONDITION() < 6) { - goto yyc_ST_LOOKING_FOR_VARNAME; - } else { - if (YYGETCONDITION() < 7) { - goto yyc_ST_VAR_OFFSET; - } else { - goto yyc_SHEBANG; - } - } - } else { - if (YYGETCONDITION() < 9) { - goto yyc_INITIAL; - } else { - if (YYGETCONDITION() < 10) { - goto yyc_ST_END_HEREDOC; - } else { - goto yyc_ST_NOWDOC; - } - } - } - } -/* *********************************** */ -yyc_ST_IN_SCRIPTING: - { - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 36, 4, 0, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 36, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 216, 216, 152, 152, 152, 152, 152, 152, - 152, 152, 0, 0, 0, 0, 0, 0, - 0, 144, 144, 144, 144, 144, 144, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 0, 0, 0, 0, 16, - 0, 144, 144, 144, 144, 144, 144, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - }; - YYDEBUG(1, *YYCURSOR); - YYFILL(16); - yych = *YYCURSOR; - if (yybm[0+yych] & 4) { - goto yy5; - } - switch (yych) { - case 0x00: - case 0x01: - case 0x02: - case 0x03: - case 0x04: - case 0x05: - case 0x06: - case 0x07: - case 0x08: - case '\t': - case '\n': - case '\v': - case '\f': - case '\r': - case 0x0E: - case 0x0F: - case 0x10: - case 0x11: - case 0x12: - case 0x13: - case 0x14: - case 0x15: - case 0x16: - case 0x17: - case 0x18: - case 0x19: - case 0x1A: - case 0x1B: - case 0x1C: - case 0x1D: - case 0x1E: - case 0x1F: - case 0x7F: goto yy3; - case ' ': - case '!': goto yy8; - case '"': goto yy10; - case '#': goto yy12; - case '$': goto yy14; - case '%': goto yy15; - case '&': goto yy16; - case '\'': goto yy17; - case '(': goto yy19; - case ')': - case ',': - case ';': - case '@': - case '[': - case ']': - case '~': goto yy20; - case '*': goto yy21; - case '+': goto yy22; - case '-': goto yy23; - case '.': goto yy24; - case '/': goto yy25; - case '0': goto yy26; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy28; - case ':': goto yy30; - case '<': goto yy31; - case '=': goto yy32; - case '>': goto yy33; - case '?': goto yy34; - case 'A': - case 'a': goto yy35; - case 'B': - case 'b': goto yy37; - case 'C': - case 'c': goto yy38; - case 'D': - case 'd': goto yy39; - case 'E': - case 'e': goto yy40; - case 'F': - case 'f': goto yy41; - case 'G': - case 'g': goto yy42; - case 'I': - case 'i': goto yy45; - case 'L': - case 'l': goto yy46; - case 'N': - case 'n': goto yy47; - case 'O': - case 'o': goto yy48; - case 'P': - case 'p': goto yy49; - case 'R': - case 'r': goto yy50; - case 'S': - case 's': goto yy51; - case 'T': - case 't': goto yy52; - case 'U': - case 'u': goto yy53; - case 'V': - case 'v': goto yy54; - case 'W': - case 'w': goto yy55; - case 'X': - case 'x': goto yy56; - case 'Y': - case 'y': goto yy57; - case '\\': goto yy58; - case '^': goto yy60; - case '_': goto yy61; - case '`': goto yy62; - case '{': goto yy64; - case '|': goto yy66; - case '}': goto yy67; - default: goto yy43; - } -yy3: - YYDEBUG(3, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(4, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2862 "Zend/zend_language_scanner.l" - { - if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); - } - - if (!SCNG(heredoc_scan_ahead)) { - zend_error(E_COMPILE_WARNING, "Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE); - } - if (PARSER_MODE()) { - goto restart; - } else { - RETURN_TOKEN(T_BAD_CHARACTER); - } -} -#line 1486 "Zend/zend_language_scanner.c" -yy5: - YYDEBUG(5, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(6, *YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy5; - } - YYDEBUG(7, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1442 "Zend/zend_language_scanner.l" - { - goto return_whitespace; -} -#line 1502 "Zend/zend_language_scanner.c" -yy8: - YYDEBUG(8, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '=') goto yy69; -yy9: - YYDEBUG(9, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1736 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(yytext[0]); -} -#line 1514 "Zend/zend_language_scanner.c" -yy10: - YYDEBUG(10, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(11, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2318 "Zend/zend_language_scanner.l" - { - int bprefix = (yytext[0] != '"') ? 1 : 0; - - while (YYCURSOR < YYLIMIT) { - switch (*YYCURSOR++) { - case '"': - yyleng = YYCURSOR - SCNG(yy_text); - if (EXPECTED(zend_scan_escape_string(zendlval, yytext+bprefix+1, yyleng-bprefix-2, '"') == SUCCESS) - || !PARSER_MODE()) { - RETURN_TOKEN_WITH_VAL(T_CONSTANT_ENCAPSED_STRING); - } else { - RETURN_TOKEN(T_ERROR); - } - case '$': - if (IS_LABEL_START(*YYCURSOR) || *YYCURSOR == '{') { - break; - } - continue; - case '{': - if (*YYCURSOR == '$') { - break; - } - continue; - case '\\': - if (YYCURSOR < YYLIMIT) { - YYCURSOR++; - } - /* fall through */ - default: - continue; - } - - YYCURSOR--; - break; - } - - /* Remember how much was scanned to save rescanning */ - SET_DOUBLE_QUOTES_SCANNED_LENGTH(YYCURSOR - SCNG(yy_text) - yyleng); - - YYCURSOR = SCNG(yy_text) + yyleng; - - BEGIN(ST_DOUBLE_QUOTES); - RETURN_TOKEN('"'); -} -#line 1565 "Zend/zend_language_scanner.c" -yy12: - YYDEBUG(12, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(13, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2149 "Zend/zend_language_scanner.l" - { - while (YYCURSOR < YYLIMIT) { - switch (*YYCURSOR++) { - case '\r': - if (*YYCURSOR == '\n') { - YYCURSOR++; - } - /* fall through */ - case '\n': - CG(zend_lineno)++; - break; - case '?': - if (*YYCURSOR == '>') { - YYCURSOR--; - break; - } - /* fall through */ - default: - continue; - } - - break; - } - - yyleng = YYCURSOR - SCNG(yy_text); - RETURN_OR_SKIP_TOKEN(T_COMMENT); -} -#line 1599 "Zend/zend_language_scanner.c" -yy14: - YYDEBUG(14, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '_') { - if (yych <= '@') goto yy9; - if (yych <= 'Z') goto yy71; - if (yych <= '^') goto yy9; - goto yy71; - } else { - if (yych <= '`') goto yy9; - if (yych <= 'z') goto yy71; - if (yych <= 0x7F) goto yy9; - goto yy71; - } -yy15: - YYDEBUG(15, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '=') goto yy74; - goto yy9; -yy16: - YYDEBUG(16, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '&') goto yy76; - if (yych == '=') goto yy78; - goto yy9; -yy17: - YYDEBUG(17, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(18, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2222 "Zend/zend_language_scanner.l" - { - register char *s, *t; - char *end; - int bprefix = (yytext[0] != '\'') ? 1 : 0; - - while (1) { - if (YYCURSOR < YYLIMIT) { - if (*YYCURSOR == '\'') { - YYCURSOR++; - yyleng = YYCURSOR - SCNG(yy_text); - - break; - } else if (*YYCURSOR++ == '\\' && YYCURSOR < YYLIMIT) { - YYCURSOR++; - } - } else { - yyleng = YYLIMIT - SCNG(yy_text); - - /* Unclosed single quotes; treat similar to double quotes, but without a separate token - * for ' (unrecognized by parser), instead of old flex fallback to "Unexpected character..." - * rule, which continued in ST_IN_SCRIPTING state after the quote */ - ZVAL_NULL(zendlval); - RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); - } - } - - if (yyleng-bprefix-2 <= 1) { - if (yyleng-bprefix-2 < 1) { - ZVAL_EMPTY_STRING(zendlval); - } else { - zend_uchar c = (zend_uchar)*(yytext+bprefix+1); - if (c == '\n' || c == '\r') { - CG(zend_lineno)++; - } - ZVAL_INTERNED_STR(zendlval, ZSTR_CHAR(c)); - } - goto skip_escape_conversion; - } - ZVAL_STRINGL(zendlval, yytext+bprefix+1, yyleng-bprefix-2); - - /* convert escape sequences */ - s = Z_STRVAL_P(zendlval); - end = s+Z_STRLEN_P(zendlval); - while (1) { - if (UNEXPECTED(*s=='\\')) { - break; - } - if (*s == '\n' || (*s == '\r' && (*(s+1) != '\n'))) { - CG(zend_lineno)++; - } - s++; - if (s == end) { - goto skip_escape_conversion; - } - } - - t = s; - while (s= '0') goto yy71; - } else { - if (yych <= '@') goto yy73; - if (yych <= 'Z') goto yy71; - } - } else { - if (yych <= '`') { - if (yych <= '_') goto yy71; - } else { - if (yych <= 'z') goto yy71; - if (yych >= 0x80) goto yy71; - } - } -yy73: - YYDEBUG(73, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2122 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 2387 "Zend/zend_language_scanner.c" -yy74: - YYDEBUG(74, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(75, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1680 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_MOD_EQUAL); -} -#line 2397 "Zend/zend_language_scanner.c" -yy76: - YYDEBUG(76, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(77, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1712 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_BOOLEAN_AND); -} -#line 2407 "Zend/zend_language_scanner.c" -yy78: - YYDEBUG(78, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(79, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1692 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_AND_EQUAL); -} -#line 2417 "Zend/zend_language_scanner.c" -yy80: - YYDEBUG(80, *YYCURSOR); - ++YYCURSOR; - YYFILL(7); - yych = *YYCURSOR; -yy81: - YYDEBUG(81, *YYCURSOR); - if (yybm[0+yych] & 32) { - goto yy80; - } - switch (yych) { - case 'A': - case 'a': goto yy83; - case 'B': - case 'b': goto yy84; - case 'D': - case 'd': goto yy85; - case 'F': - case 'f': goto yy86; - case 'I': - case 'i': goto yy87; - case 'O': - case 'o': goto yy88; - case 'R': - case 'r': goto yy89; - case 'S': - case 's': goto yy90; - case 'U': - case 'u': goto yy91; - default: goto yy82; - } -yy82: - YYDEBUG(82, *YYCURSOR); - YYCURSOR = YYMARKER; - if (yyaccept <= 4) { - if (yyaccept <= 2) { - if (yyaccept <= 1) { - if (yyaccept == 0) { - goto yy9; - } else { - goto yy27; - } - } else { - goto yy36; - } - } else { - if (yyaccept == 3) { - goto yy109; - } else { - goto yy113; - } - } - } else { - if (yyaccept <= 6) { - if (yyaccept == 5) { - goto yy124; - } else { - goto yy217; - } - } else { - if (yyaccept == 7) { - goto yy223; - } else { - goto yy464; - } - } - } -yy83: - YYDEBUG(83, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy199; - if (yych == 'r') goto yy199; - goto yy82; -yy84: - YYDEBUG(84, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych == 'I') goto yy200; - if (yych <= 'N') goto yy82; - goto yy201; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy82; - goto yy200; - } else { - if (yych == 'o') goto yy201; - goto yy82; - } - } -yy85: - YYDEBUG(85, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy202; - if (yych == 'o') goto yy202; - goto yy82; -yy86: - YYDEBUG(86, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy203; - if (yych == 'l') goto yy203; - goto yy82; -yy87: - YYDEBUG(87, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy204; - if (yych == 'n') goto yy204; - goto yy82; -yy88: - YYDEBUG(88, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy205; - if (yych == 'b') goto yy205; - goto yy82; -yy89: - YYDEBUG(89, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy206; - if (yych == 'e') goto yy206; - goto yy82; -yy90: - YYDEBUG(90, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy207; - if (yych == 't') goto yy207; - goto yy82; -yy91: - YYDEBUG(91, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy208; - if (yych == 'n') goto yy208; - goto yy82; -yy92: - YYDEBUG(92, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '=') goto yy209; - YYDEBUG(93, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1664 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_POW); -} -#line 2559 "Zend/zend_language_scanner.c" -yy94: - YYDEBUG(94, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(95, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1660 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_MUL_EQUAL); -} -#line 2569 "Zend/zend_language_scanner.c" -yy96: - YYDEBUG(96, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(97, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1616 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_INC); -} -#line 2579 "Zend/zend_language_scanner.c" -yy98: - YYDEBUG(98, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(99, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1652 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_PLUS_EQUAL); -} -#line 2589 "Zend/zend_language_scanner.c" -yy100: - YYDEBUG(100, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(101, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1620 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_DEC); -} -#line 2599 "Zend/zend_language_scanner.c" -yy102: - YYDEBUG(102, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(103, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1656 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_MINUS_EQUAL); -} -#line 2609 "Zend/zend_language_scanner.c" -yy104: - YYDEBUG(104, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(105, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1437 "Zend/zend_language_scanner.l" - { - yy_push_state(ST_LOOKING_FOR_PROPERTY); - RETURN_TOKEN(T_OBJECT_OPERATOR); -} -#line 2620 "Zend/zend_language_scanner.c" -yy106: - YYDEBUG(106, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '.') goto yy211; - goto yy82; -yy107: - YYDEBUG(107, *YYCURSOR); - yyaccept = 3; - YYMARKER = ++YYCURSOR; - YYFILL(2); - yych = *YYCURSOR; -yy108: - YYDEBUG(108, *YYCURSOR); - if (yych <= 'E') { - if (yych <= '/') goto yy109; - if (yych <= '9') goto yy107; - if (yych >= 'E') goto yy118; - } else { - if (yych <= '_') { - if (yych >= '_') goto yy213; - } else { - if (yych == 'e') goto yy118; - } - } -yy109: - YYDEBUG(109, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1949 "Zend/zend_language_scanner.l" - { - const char *end; - size_t len = yyleng; - char *dnum = yytext; - zend_bool contains_underscores = (memchr(dnum, '_', len) != NULL); - - if (contains_underscores) { - dnum = estrndup(dnum, len); - strip_underscores(dnum, &len); - } - - ZVAL_DOUBLE(zendlval, zend_strtod(dnum, &end)); - /* errno isn't checked since we allow HUGE_VAL/INF overflow */ - ZEND_ASSERT(end == dnum + len); - if (contains_underscores) { - efree(dnum); - } - RETURN_TOKEN_WITH_VAL(T_DNUMBER); -} -#line 2668 "Zend/zend_language_scanner.c" -yy110: - YYDEBUG(110, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(111, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1676 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_CONCAT_EQUAL); -} -#line 2678 "Zend/zend_language_scanner.c" -yy112: - YYDEBUG(112, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '*') goto yy214; -yy113: - YYDEBUG(113, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2177 "Zend/zend_language_scanner.l" - { - int doc_com; - - if (yyleng > 2) { - doc_com = 1; - RESET_DOC_COMMENT(); - } else { - doc_com = 0; - } - - while (YYCURSOR < YYLIMIT) { - if (*YYCURSOR++ == '*' && *YYCURSOR == '/') { - break; - } - } - - if (YYCURSOR < YYLIMIT) { - YYCURSOR++; - } else if (!SCNG(heredoc_scan_ahead)) { - zend_error(E_COMPILE_WARNING, "Unterminated comment starting line %d", CG(zend_lineno)); - } - - yyleng = YYCURSOR - SCNG(yy_text); - HANDLE_NEWLINES(yytext, yyleng); - - if (doc_com) { - CG(doc_comment) = zend_string_init(yytext, yyleng, 0); - RETURN_OR_SKIP_TOKEN(T_DOC_COMMENT); - } - - RETURN_OR_SKIP_TOKEN(T_COMMENT); -} -#line 2720 "Zend/zend_language_scanner.c" -yy114: - YYDEBUG(114, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(115, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1672 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_DIV_EQUAL); -} -#line 2730 "Zend/zend_language_scanner.c" -yy116: - YYDEBUG(116, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '_') goto yy109; - goto yy108; -yy117: - YYDEBUG(117, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 64) { - goto yy215; - } - goto yy82; -yy118: - YYDEBUG(118, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= ',') { - if (yych == '+') goto yy218; - goto yy82; - } else { - if (yych <= '-') goto yy218; - if (yych <= '/') goto yy82; - if (yych <= '9') goto yy219; - goto yy82; - } -yy119: - YYDEBUG(119, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy221; - } - goto yy82; -yy120: - YYDEBUG(120, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 8) { - goto yy28; - } - goto yy82; -yy121: - YYDEBUG(121, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(122, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1461 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_PAAMAYIM_NEKUDOTAYIM); -} -#line 2785 "Zend/zend_language_scanner.c" -yy123: - YYDEBUG(123, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ';') goto yy124; - if (yych <= '<') goto yy224; - if (yych <= '=') goto yy226; -yy124: - YYDEBUG(124, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1728 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_SL); -} -#line 2800 "Zend/zend_language_scanner.c" -yy125: - YYDEBUG(125, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '>') goto yy228; - YYDEBUG(126, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1644 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_IS_SMALLER_OR_EQUAL); -} -#line 2811 "Zend/zend_language_scanner.c" -yy127: - YYDEBUG(127, *YYCURSOR); - ++YYCURSOR; - goto yy70; -yy128: - YYDEBUG(128, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '=') goto yy230; - YYDEBUG(129, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1632 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_IS_EQUAL); -} -#line 2826 "Zend/zend_language_scanner.c" -yy130: - YYDEBUG(130, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(131, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1600 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_DOUBLE_ARROW); -} -#line 2836 "Zend/zend_language_scanner.c" -yy132: - YYDEBUG(132, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(133, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1648 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_IS_GREATER_OR_EQUAL); -} -#line 2846 "Zend/zend_language_scanner.c" -yy134: - YYDEBUG(134, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '=') goto yy232; - YYDEBUG(135, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1732 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_SR); -} -#line 2857 "Zend/zend_language_scanner.c" -yy136: - YYDEBUG(136, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '\n') goto yy234; - if (yych == '\r') goto yy235; -yy137: - YYDEBUG(137, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2210 "Zend/zend_language_scanner.l" - { - BEGIN(INITIAL); - if (yytext[yyleng-1] != '>') { - CG(increment_lineno) = 1; - } - if (PARSER_MODE()) { - RETURN_TOKEN(';'); /* implicit ';' at php-end tag */ - } - RETURN_TOKEN(T_CLOSE_TAG); -} -#line 2877 "Zend/zend_language_scanner.c" -yy138: - YYDEBUG(138, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '=') goto yy236; - YYDEBUG(139, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1473 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_COALESCE); -} -#line 2888 "Zend/zend_language_scanner.c" -yy140: - YYDEBUG(140, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy238; - if (yych == 's') goto yy238; - goto yy44; -yy141: - YYDEBUG(141, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy239; - if (yych == 'd') goto yy239; - goto yy44; -yy142: - YYDEBUG(142, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy241; - if (yych == 'r') goto yy241; - goto yy44; -yy143: - YYDEBUG(143, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(144, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1377 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_AS); -} -#line 2919 "Zend/zend_language_scanner.c" -yy145: - YYDEBUG(145, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '<') goto yy242; - goto yy82; -yy146: - YYDEBUG(146, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy243; - if (yych == 'e') goto yy243; - goto yy44; -yy147: - YYDEBUG(147, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= 'L') { - if (yych <= 'K') goto yy44; - goto yy244; - } else { - if (yych <= 'R') goto yy44; - if (yych <= 'S') goto yy245; - goto yy246; - } - } else { - if (yych <= 'r') { - if (yych == 'l') goto yy244; - goto yy44; - } else { - if (yych <= 's') goto yy245; - if (yych <= 't') goto yy246; - goto yy44; - } - } -yy148: - YYDEBUG(148, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych == 'A') goto yy247; - if (yych <= 'N') goto yy44; - goto yy248; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy44; - goto yy247; - } else { - if (yych == 'o') goto yy248; - goto yy44; - } - } -yy149: - YYDEBUG(149, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy249; - if (yych == 'n') goto yy249; - goto yy44; -yy150: - YYDEBUG(150, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'F') { - if (yych == 'C') goto yy250; - if (yych <= 'E') goto yy44; - goto yy251; - } else { - if (yych <= 'c') { - if (yych <= 'b') goto yy44; - goto yy250; - } else { - if (yych == 'f') goto yy251; - goto yy44; - } - } -yy151: - YYDEBUG(151, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy252; - if (yych == 'e') goto yy252; - goto yy44; -yy152: - YYDEBUG(152, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(153, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1345 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_DO); -} -#line 3009 "Zend/zend_language_scanner.c" -yy154: - YYDEBUG(154, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy254; - if (yych == 'h') goto yy254; - goto yy44; -yy155: - YYDEBUG(155, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy255; - if (yych == 's') goto yy255; - goto yy44; -yy156: - YYDEBUG(156, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy256; - if (yych == 'p') goto yy256; - goto yy44; -yy157: - YYDEBUG(157, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy257; - if (yych == 'd') goto yy257; - goto yy44; -yy158: - YYDEBUG(158, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy258; - if (yych == 'a') goto yy258; - goto yy44; -yy159: - YYDEBUG(159, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych == 'I') goto yy259; - if (yych <= 'S') goto yy44; - goto yy260; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy44; - goto yy259; - } else { - if (yych == 't') goto yy260; - goto yy44; - } - } -yy160: - YYDEBUG(160, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy261; - if (yych == 'n') goto yy261; - goto yy44; -yy161: - YYDEBUG(161, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(162, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1279 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_FN); -} -#line 3074 "Zend/zend_language_scanner.c" -yy163: - YYDEBUG(163, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy262; - if (yych == 'r') goto yy262; - goto yy44; -yy164: - YYDEBUG(164, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy264; - if (yych == 'n') goto yy264; - goto yy44; -yy165: - YYDEBUG(165, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy265; - if (yych == 'o') goto yy265; - goto yy44; -yy166: - YYDEBUG(166, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy266; - if (yych == 't') goto yy266; - goto yy44; -yy167: - YYDEBUG(167, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(168, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1321 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_IF); -} -#line 3111 "Zend/zend_language_scanner.c" -yy169: - YYDEBUG(169, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy267; - if (yych == 'p') goto yy267; - goto yy44; -yy170: - YYDEBUG(170, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= 'C') { - if (yych <= 'B') goto yy44; - goto yy268; - } else { - if (yych <= 'R') goto yy44; - if (yych <= 'S') goto yy269; - goto yy270; - } - } else { - if (yych <= 'r') { - if (yych == 'c') goto yy268; - goto yy44; - } else { - if (yych <= 's') goto yy269; - if (yych <= 't') goto yy270; - goto yy44; - } - } -yy171: - YYDEBUG(171, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy271; - if (yych == 's') goto yy271; - goto yy44; -yy172: - YYDEBUG(172, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy272; - if (yych == 's') goto yy272; - goto yy44; -yy173: - YYDEBUG(173, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy273; - if (yych == 'm') goto yy273; - goto yy44; -yy174: - YYDEBUG(174, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'W') goto yy274; - if (yych == 'w') goto yy274; - goto yy44; -yy175: - YYDEBUG(175, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(176, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1716 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_LOGICAL_OR); -} -#line 3176 "Zend/zend_language_scanner.c" -yy177: - YYDEBUG(177, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych == 'I') goto yy276; - if (yych <= 'N') goto yy44; - goto yy277; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy44; - goto yy276; - } else { - if (yych == 'o') goto yy277; - goto yy44; - } - } -yy178: - YYDEBUG(178, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy278; - if (yych == 'b') goto yy278; - goto yy44; -yy179: - YYDEBUG(179, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych == 'Q') goto yy279; - if (yych <= 'S') goto yy44; - goto yy280; - } else { - if (yych <= 'q') { - if (yych <= 'p') goto yy44; - goto yy279; - } else { - if (yych == 't') goto yy280; - goto yy44; - } - } -yy180: - YYDEBUG(180, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy281; - if (yych == 'a') goto yy281; - goto yy44; -yy181: - YYDEBUG(181, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy282; - if (yych == 'i') goto yy282; - goto yy44; -yy182: - YYDEBUG(182, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy283; - if (yych == 'r') goto yy283; - goto yy44; -yy183: - YYDEBUG(183, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych == 'A') goto yy284; - if (yych <= 'X') goto yy44; - goto yy285; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy44; - goto yy284; - } else { - if (yych == 'y') goto yy285; - goto yy44; - } - } -yy184: - YYDEBUG(184, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy287; - if (yych == 's') goto yy287; - goto yy44; -yy185: - YYDEBUG(185, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy288; - if (yych == 'e') goto yy288; - goto yy44; -yy186: - YYDEBUG(186, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy290; - if (yych == 'r') goto yy290; - goto yy44; -yy187: - YYDEBUG(187, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy292; - if (yych == 'i') goto yy292; - goto yy44; -yy188: - YYDEBUG(188, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy293; - if (yych == 'r') goto yy293; - goto yy44; -yy189: - YYDEBUG(189, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy295; - if (yych == 'e') goto yy295; - goto yy44; -yy190: - YYDEBUG(190, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(191, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1700 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_XOR_EQUAL); -} -#line 3294 "Zend/zend_language_scanner.c" -yy192: - YYDEBUG(192, *YYCURSOR); - yych = *++YYCURSOR; - switch (yych) { - case 'C': - case 'c': goto yy296; - case 'D': - case 'd': goto yy297; - case 'F': - case 'f': goto yy298; - case 'H': - case 'h': goto yy299; - case 'L': - case 'l': goto yy300; - case 'M': - case 'm': goto yy301; - case 'N': - case 'n': goto yy302; - case 'T': - case 't': goto yy303; - default: goto yy44; - } -yy193: - YYDEBUG(193, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(194, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1696 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_OR_EQUAL); -} -#line 3326 "Zend/zend_language_scanner.c" -yy195: - YYDEBUG(195, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(196, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1708 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_BOOLEAN_OR); -} -#line 3336 "Zend/zend_language_scanner.c" -yy197: - YYDEBUG(197, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(198, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1628 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_IS_NOT_IDENTICAL); -} -#line 3346 "Zend/zend_language_scanner.c" -yy199: - YYDEBUG(199, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy304; - if (yych == 'r') goto yy304; - goto yy82; -yy200: - YYDEBUG(200, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy305; - if (yych == 'n') goto yy305; - goto yy82; -yy201: - YYDEBUG(201, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy306; - if (yych == 'o') goto yy306; - goto yy82; -yy202: - YYDEBUG(202, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy307; - if (yych == 'u') goto yy307; - goto yy82; -yy203: - YYDEBUG(203, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy308; - if (yych == 'o') goto yy308; - goto yy82; -yy204: - YYDEBUG(204, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy309; - if (yych == 't') goto yy309; - goto yy82; -yy205: - YYDEBUG(205, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'J') goto yy310; - if (yych == 'j') goto yy310; - goto yy82; -yy206: - YYDEBUG(206, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy311; - if (yych == 'a') goto yy311; - goto yy82; -yy207: - YYDEBUG(207, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy312; - if (yych == 'r') goto yy312; - goto yy82; -yy208: - YYDEBUG(208, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy313; - if (yych == 's') goto yy313; - goto yy82; -yy209: - YYDEBUG(209, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(210, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1668 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_POW_EQUAL); -} -#line 3416 "Zend/zend_language_scanner.c" -yy211: - YYDEBUG(211, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(212, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1469 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ELLIPSIS); -} -#line 3426 "Zend/zend_language_scanner.c" -yy213: - YYDEBUG(213, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych <= '/') goto yy82; - if (yych <= '9') goto yy107; - goto yy82; -yy214: - YYDEBUG(214, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\f') { - if (yych <= 0x08) goto yy82; - if (yych <= '\n') goto yy314; - goto yy82; - } else { - if (yych <= '\r') goto yy314; - if (yych == ' ') goto yy314; - goto yy82; - } -yy215: - YYDEBUG(215, *YYCURSOR); - yyaccept = 6; - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(216, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy215; - } - if (yych == '_') goto yy117; -yy217: - YYDEBUG(217, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1777 "Zend/zend_language_scanner.l" - { - /* The +/- 2 skips "0b" */ - size_t len = yyleng - 2; - char *end, *bin = yytext + 2; - zend_bool contains_underscores; - - /* Skip any leading 0s */ - while (len > 0 && (*bin == '0' || *bin == '_')) { - ++bin; - --len; - } - - contains_underscores = (memchr(bin, '_', len) != NULL); - - if (contains_underscores) { - bin = estrndup(bin, len); - strip_underscores(bin, &len); - } - - if (len < SIZEOF_ZEND_LONG * 8) { - if (len == 0) { - ZVAL_LONG(zendlval, 0); - } else { - errno = 0; - ZVAL_LONG(zendlval, ZEND_STRTOL(bin, &end, 2)); - ZEND_ASSERT(!errno && end == bin + len); - } - if (contains_underscores) { - efree(bin); - } - RETURN_TOKEN_WITH_VAL(T_LNUMBER); - } else { - ZVAL_DOUBLE(zendlval, zend_bin_strtod(bin, (const char **)&end)); - /* errno isn't checked since we allow HUGE_VAL/INF overflow */ - ZEND_ASSERT(end == bin + len); - if (contains_underscores) { - efree(bin); - } - RETURN_TOKEN_WITH_VAL(T_DNUMBER); - } -} -#line 3503 "Zend/zend_language_scanner.c" -yy218: - YYDEBUG(218, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych <= '/') goto yy82; - if (yych >= ':') goto yy82; -yy219: - YYDEBUG(219, *YYCURSOR); - yyaccept = 3; - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(220, *YYCURSOR); - if (yych <= '/') goto yy109; - if (yych <= '9') goto yy219; - if (yych == '_') goto yy218; - goto yy109; -yy221: - YYDEBUG(221, *YYCURSOR); - yyaccept = 7; - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(222, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy221; - } - if (yych == '_') goto yy119; -yy223: - YYDEBUG(223, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1882 "Zend/zend_language_scanner.l" - { - /* The +/- 2 skips "0x" */ - size_t len = yyleng - 2; - char *end, *hex = yytext + 2; - zend_bool contains_underscores; - - /* Skip any leading 0s */ - while (len > 0 && (*hex == '0' || *hex == '_')) { - ++hex; - --len; - } - - contains_underscores = (memchr(hex, '_', len) != NULL); - - if (contains_underscores) { - hex = estrndup(hex, len); - strip_underscores(hex, &len); - } - - if (len < SIZEOF_ZEND_LONG * 2 || (len == SIZEOF_ZEND_LONG * 2 && *hex <= '7')) { - if (len == 0) { - ZVAL_LONG(zendlval, 0); - } else { - errno = 0; - ZVAL_LONG(zendlval, ZEND_STRTOL(hex, &end, 16)); - ZEND_ASSERT(!errno && end == hex + len); - } - if (contains_underscores) { - efree(hex); - } - RETURN_TOKEN_WITH_VAL(T_LNUMBER); - } else { - ZVAL_DOUBLE(zendlval, zend_hex_strtod(hex, (const char **)&end)); - /* errno isn't checked since we allow HUGE_VAL/INF overflow */ - ZEND_ASSERT(end == hex + len); - if (contains_underscores) { - efree(hex); - } - RETURN_TOKEN_WITH_VAL(T_DNUMBER); - } -} -#line 3578 "Zend/zend_language_scanner.c" -yy224: - YYDEBUG(224, *YYCURSOR); - ++YYCURSOR; - YYFILL(2); - yych = *YYCURSOR; - YYDEBUG(225, *YYCURSOR); - if (yych <= '\'') { - if (yych <= ' ') { - if (yych == '\t') goto yy224; - if (yych <= 0x1F) goto yy82; - goto yy224; - } else { - if (yych == '"') goto yy316; - if (yych <= '&') goto yy82; - goto yy317; - } - } else { - if (yych <= '_') { - if (yych <= '@') goto yy82; - if (yych <= 'Z') goto yy318; - if (yych <= '^') goto yy82; - goto yy318; - } else { - if (yych <= '`') goto yy82; - if (yych <= 'z') goto yy318; - if (yych <= 0x7F) goto yy82; - goto yy318; - } - } -yy226: - YYDEBUG(226, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(227, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1684 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_SL_EQUAL); -} -#line 3617 "Zend/zend_language_scanner.c" -yy228: - YYDEBUG(228, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(229, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1640 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_SPACESHIP); -} -#line 3627 "Zend/zend_language_scanner.c" -yy230: - YYDEBUG(230, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(231, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1624 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_IS_IDENTICAL); -} -#line 3637 "Zend/zend_language_scanner.c" -yy232: - YYDEBUG(232, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(233, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1688 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_SR_EQUAL); -} -#line 3647 "Zend/zend_language_scanner.c" -yy234: - YYDEBUG(234, *YYCURSOR); - ++YYCURSOR; - goto yy137; -yy235: - YYDEBUG(235, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '\n') goto yy234; - goto yy137; -yy236: - YYDEBUG(236, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(237, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1704 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_COALESCE_EQUAL); -} -#line 3666 "Zend/zend_language_scanner.c" -yy238: - YYDEBUG(238, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy320; - if (yych == 't') goto yy320; - goto yy44; -yy239: - YYDEBUG(239, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(240, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1720 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_LOGICAL_AND); -} -#line 3685 "Zend/zend_language_scanner.c" -yy241: - YYDEBUG(241, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy321; - if (yych == 'a') goto yy321; - goto yy44; -yy242: - YYDEBUG(242, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '<') goto yy224; - goto yy82; -yy243: - YYDEBUG(243, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy322; - if (yych == 'a') goto yy322; - goto yy44; -yy244: - YYDEBUG(244, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy323; - if (yych == 'l') goto yy323; - goto yy44; -yy245: - YYDEBUG(245, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy324; - if (yych == 'e') goto yy324; - goto yy44; -yy246: - YYDEBUG(246, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy326; - if (yych == 'c') goto yy326; - goto yy44; -yy247: - YYDEBUG(247, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy327; - if (yych == 's') goto yy327; - goto yy44; -yy248: - YYDEBUG(248, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy328; - if (yych == 'n') goto yy328; - goto yy44; -yy249: - YYDEBUG(249, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= 'R') goto yy44; - if (yych <= 'S') goto yy329; - goto yy330; - } else { - if (yych <= 'r') goto yy44; - if (yych <= 's') goto yy329; - if (yych <= 't') goto yy330; - goto yy44; - } -yy250: - YYDEBUG(250, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy331; - if (yych == 'l') goto yy331; - goto yy44; -yy251: - YYDEBUG(251, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy332; - if (yych == 'a') goto yy332; - goto yy44; -yy252: - YYDEBUG(252, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(253, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1275 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_EXIT); -} -#line 3770 "Zend/zend_language_scanner.c" -yy254: - YYDEBUG(254, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy333; - if (yych == 'o') goto yy333; - goto yy44; -yy255: - YYDEBUG(255, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy335; - if (yych == 'e') goto yy335; - goto yy44; -yy256: - YYDEBUG(256, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy337; - if (yych == 't') goto yy337; - goto yy44; -yy257: - YYDEBUG(257, *YYCURSOR); - yych = *++YYCURSOR; - switch (yych) { - case 'D': - case 'd': goto yy338; - case 'F': - case 'f': goto yy339; - case 'I': - case 'i': goto yy340; - case 'S': - case 's': goto yy341; - case 'W': - case 'w': goto yy342; - default: goto yy44; - } -yy258: - YYDEBUG(258, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy343; - if (yych == 'l') goto yy343; - goto yy44; -yy259: - YYDEBUG(259, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy345; - if (yych == 't') goto yy345; - goto yy44; -yy260: - YYDEBUG(260, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy347; - if (yych == 'e') goto yy347; - goto yy44; -yy261: - YYDEBUG(261, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy348; - if (yych == 'a') goto yy348; - goto yy44; -yy262: - YYDEBUG(262, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '^') { - if (yych <= '@') { - if (yych <= '/') goto yy263; - if (yych <= '9') goto yy43; - } else { - if (yych == 'E') goto yy349; - if (yych <= 'Z') goto yy43; - } - } else { - if (yych <= 'd') { - if (yych != '`') goto yy43; - } else { - if (yych <= 'e') goto yy349; - if (yych <= 'z') goto yy43; - if (yych >= 0x80) goto yy43; - } - } -yy263: - YYDEBUG(263, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1349 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_FOR); -} -#line 3856 "Zend/zend_language_scanner.c" -yy264: - YYDEBUG(264, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy350; - if (yych == 'c') goto yy350; - goto yy44; -yy265: - YYDEBUG(265, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy351; - if (yych == 'b') goto yy351; - goto yy44; -yy266: - YYDEBUG(266, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy352; - if (yych == 'o') goto yy352; - goto yy44; -yy267: - YYDEBUG(267, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy354; - if (yych == 'l') goto yy354; - goto yy44; -yy268: - YYDEBUG(268, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy355; - if (yych == 'l') goto yy355; - goto yy44; -yy269: - YYDEBUG(269, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy356; - if (yych == 't') goto yy356; - goto yy44; -yy270: - YYDEBUG(270, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy357; - if (yych == 'e') goto yy357; - goto yy44; -yy271: - YYDEBUG(271, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy358; - if (yych == 'e') goto yy358; - goto yy44; -yy272: - YYDEBUG(272, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy359; - if (yych == 't') goto yy359; - goto yy44; -yy273: - YYDEBUG(273, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy361; - if (yych == 'e') goto yy361; - goto yy44; -yy274: - YYDEBUG(274, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(275, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1477 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_NEW); -} -#line 3929 "Zend/zend_language_scanner.c" -yy276: - YYDEBUG(276, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'V') { - if (yych == 'N') goto yy362; - if (yych <= 'U') goto yy44; - goto yy363; - } else { - if (yych <= 'n') { - if (yych <= 'm') goto yy44; - goto yy362; - } else { - if (yych == 'v') goto yy363; - goto yy44; - } - } -yy277: - YYDEBUG(277, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy364; - if (yych == 't') goto yy364; - goto yy44; -yy278: - YYDEBUG(278, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy365; - if (yych == 'l') goto yy365; - goto yy44; -yy279: - YYDEBUG(279, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy366; - if (yych == 'u') goto yy366; - goto yy44; -yy280: - YYDEBUG(280, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy367; - if (yych == 'u') goto yy367; - goto yy44; -yy281: - YYDEBUG(281, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy368; - if (yych == 't') goto yy368; - goto yy44; -yy282: - YYDEBUG(282, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy369; - if (yych == 't') goto yy369; - goto yy44; -yy283: - YYDEBUG(283, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy370; - if (yych == 'o') goto yy370; - goto yy44; -yy284: - YYDEBUG(284, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy371; - if (yych == 'i') goto yy371; - goto yy44; -yy285: - YYDEBUG(285, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(286, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1305 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_TRY); -} -#line 4006 "Zend/zend_language_scanner.c" -yy287: - YYDEBUG(287, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy372; - if (yych == 'e') goto yy372; - goto yy44; -yy288: - YYDEBUG(288, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(289, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1548 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_USE); -} -#line 4025 "Zend/zend_language_scanner.c" -yy290: - YYDEBUG(290, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(291, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1485 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_VAR); -} -#line 4038 "Zend/zend_language_scanner.c" -yy292: - YYDEBUG(292, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy373; - if (yych == 'l') goto yy373; - goto yy44; -yy293: - YYDEBUG(293, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(294, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1724 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_LOGICAL_XOR); -} -#line 4057 "Zend/zend_language_scanner.c" -yy295: - YYDEBUG(295, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy374; - if (yych == 'l') goto yy374; - goto yy44; -yy296: - YYDEBUG(296, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy375; - if (yych == 'l') goto yy375; - goto yy44; -yy297: - YYDEBUG(297, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy376; - if (yych == 'i') goto yy376; - goto yy44; -yy298: - YYDEBUG(298, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'I') goto yy377; - if (yych <= 'T') goto yy44; - goto yy378; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy44; - goto yy377; - } else { - if (yych == 'u') goto yy378; - goto yy44; - } - } -yy299: - YYDEBUG(299, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy379; - if (yych == 'a') goto yy379; - goto yy44; -yy300: - YYDEBUG(300, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy380; - if (yych == 'i') goto yy380; - goto yy44; -yy301: - YYDEBUG(301, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy381; - if (yych == 'e') goto yy381; - goto yy44; -yy302: - YYDEBUG(302, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy382; - if (yych == 'a') goto yy382; - goto yy44; -yy303: - YYDEBUG(303, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy383; - if (yych == 'r') goto yy383; - goto yy44; -yy304: - YYDEBUG(304, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy384; - if (yych == 'a') goto yy384; - goto yy82; -yy305: - YYDEBUG(305, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy385; - if (yych == 'a') goto yy385; - goto yy82; -yy306: - YYDEBUG(306, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy386; - if (yych == 'l') goto yy386; - goto yy82; -yy307: - YYDEBUG(307, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy387; - if (yych == 'b') goto yy387; - goto yy82; -yy308: - YYDEBUG(308, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy388; - if (yych == 'a') goto yy388; - goto yy82; -yy309: - YYDEBUG(309, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy393; - if (yych == 'e') goto yy393; - goto yy390; -yy310: - YYDEBUG(310, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy394; - if (yych == 'e') goto yy394; - goto yy82; -yy311: - YYDEBUG(311, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy395; - if (yych == 'l') goto yy395; - goto yy82; -yy312: - YYDEBUG(312, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy397; - if (yych == 'i') goto yy397; - goto yy82; -yy313: - YYDEBUG(313, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy398; - if (yych == 'e') goto yy398; - goto yy82; -yy314: - YYDEBUG(314, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(315, *YYCURSOR); - if (yych <= '\f') { - if (yych <= 0x08) goto yy113; - if (yych <= '\n') goto yy314; - goto yy113; - } else { - if (yych <= '\r') goto yy314; - if (yych == ' ') goto yy314; - goto yy113; - } -yy316: - YYDEBUG(316, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '"') goto yy82; - if (yych <= '/') goto yy400; - if (yych <= '9') goto yy82; - goto yy400; -yy317: - YYDEBUG(317, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '\'') goto yy82; - if (yych <= '/') goto yy402; - if (yych <= '9') goto yy82; - goto yy402; -yy318: - YYDEBUG(318, *YYCURSOR); - ++YYCURSOR; - YYFILL(2); - yych = *YYCURSOR; - YYDEBUG(319, *YYCURSOR); - if (yych <= '@') { - if (yych <= '\f') { - if (yych == '\n') goto yy403; - goto yy82; - } else { - if (yych <= '\r') goto yy405; - if (yych <= '/') goto yy82; - if (yych <= '9') goto yy318; - goto yy82; - } - } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy318; - if (yych <= '^') goto yy82; - goto yy318; - } else { - if (yych <= '`') goto yy82; - if (yych <= 'z') goto yy318; - if (yych <= 0x7F) goto yy82; - goto yy318; - } - } -yy320: - YYDEBUG(320, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy406; - if (yych == 'r') goto yy406; - goto yy44; -yy321: - YYDEBUG(321, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy407; - if (yych == 'y') goto yy407; - goto yy44; -yy322: - YYDEBUG(322, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy409; - if (yych == 'k') goto yy409; - goto yy44; -yy323: - YYDEBUG(323, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy411; - if (yych == 'a') goto yy411; - goto yy44; -yy324: - YYDEBUG(324, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(325, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1389 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_CASE); -} -#line 4275 "Zend/zend_language_scanner.c" -yy326: - YYDEBUG(326, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy412; - if (yych == 'h') goto yy412; - goto yy44; -yy327: - YYDEBUG(327, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy414; - if (yych == 's') goto yy414; - goto yy44; -yy328: - YYDEBUG(328, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy416; - if (yych == 'e') goto yy416; - goto yy44; -yy329: - YYDEBUG(329, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy418; - if (yych == 't') goto yy418; - goto yy44; -yy330: - YYDEBUG(330, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy420; - if (yych == 'i') goto yy420; - goto yy44; -yy331: - YYDEBUG(331, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy421; - if (yych == 'a') goto yy421; - goto yy44; -yy332: - YYDEBUG(332, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy422; - if (yych == 'u') goto yy422; - goto yy44; -yy333: - YYDEBUG(333, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(334, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1409 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ECHO); -} -#line 4330 "Zend/zend_language_scanner.c" -yy335: - YYDEBUG(335, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '^') { - if (yych <= '@') { - if (yych <= '/') goto yy336; - if (yych <= '9') goto yy43; - } else { - if (yych == 'I') goto yy423; - if (yych <= 'Z') goto yy43; - } - } else { - if (yych <= 'h') { - if (yych != '`') goto yy43; - } else { - if (yych <= 'i') goto yy423; - if (yych <= 'z') goto yy43; - if (yych >= 0x80) goto yy43; - } - } -yy336: - YYDEBUG(336, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1333 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ELSE); -} -#line 4358 "Zend/zend_language_scanner.c" -yy337: - YYDEBUG(337, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy424; - if (yych == 'y') goto yy424; - goto yy44; -yy338: - YYDEBUG(338, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy426; - if (yych == 'e') goto yy426; - goto yy44; -yy339: - YYDEBUG(339, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy427; - if (yych == 'o') goto yy427; - goto yy44; -yy340: - YYDEBUG(340, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy428; - if (yych == 'f') goto yy428; - goto yy44; -yy341: - YYDEBUG(341, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'W') goto yy430; - if (yych == 'w') goto yy430; - goto yy44; -yy342: - YYDEBUG(342, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy431; - if (yych == 'h') goto yy431; - goto yy44; -yy343: - YYDEBUG(343, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(344, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1524 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_EVAL); -} -#line 4407 "Zend/zend_language_scanner.c" -yy345: - YYDEBUG(345, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(346, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1271 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_EXIT); -} -#line 4420 "Zend/zend_language_scanner.c" -yy347: - YYDEBUG(347, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy432; - if (yych == 'n') goto yy432; - goto yy44; -yy348: - YYDEBUG(348, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy433; - if (yych == 'l') goto yy433; - goto yy44; -yy349: - YYDEBUG(349, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy435; - if (yych == 'a') goto yy435; - goto yy44; -yy350: - YYDEBUG(350, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy436; - if (yych == 't') goto yy436; - goto yy44; -yy351: - YYDEBUG(351, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy437; - if (yych == 'a') goto yy437; - goto yy44; -yy352: - YYDEBUG(352, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(353, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1405 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_GOTO); -} -#line 4463 "Zend/zend_language_scanner.c" -yy354: - YYDEBUG(354, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy438; - if (yych == 'e') goto yy438; - goto yy44; -yy355: - YYDEBUG(355, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy439; - if (yych == 'u') goto yy439; - goto yy44; -yy356: - YYDEBUG(356, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych == 'A') goto yy440; - if (yych <= 'D') goto yy44; - goto yy441; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy44; - goto yy440; - } else { - if (yych == 'e') goto yy441; - goto yy44; - } - } -yy357: - YYDEBUG(357, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy442; - if (yych == 'r') goto yy442; - goto yy44; -yy358: - YYDEBUG(358, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy443; - if (yych == 't') goto yy443; - goto yy44; -yy359: - YYDEBUG(359, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(360, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1604 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_LIST); -} -#line 4516 "Zend/zend_language_scanner.c" -yy361: - YYDEBUG(361, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy445; - if (yych == 's') goto yy445; - goto yy44; -yy362: - YYDEBUG(362, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy446; - if (yych == 't') goto yy446; - goto yy44; -yy363: - YYDEBUG(363, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy448; - if (yych == 'a') goto yy448; - goto yy44; -yy364: - YYDEBUG(364, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy449; - if (yych == 'e') goto yy449; - goto yy44; -yy365: - YYDEBUG(365, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy450; - if (yych == 'i') goto yy450; - goto yy44; -yy366: - YYDEBUG(366, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy451; - if (yych == 'i') goto yy451; - goto yy44; -yy367: - YYDEBUG(367, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy452; - if (yych == 'r') goto yy452; - goto yy44; -yy368: - YYDEBUG(368, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy453; - if (yych == 'i') goto yy453; - goto yy44; -yy369: - YYDEBUG(369, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy454; - if (yych == 'c') goto yy454; - goto yy44; -yy370: - YYDEBUG(370, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'W') goto yy455; - if (yych == 'w') goto yy455; - goto yy44; -yy371: - YYDEBUG(371, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy457; - if (yych == 't') goto yy457; - goto yy44; -yy372: - YYDEBUG(372, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy459; - if (yych == 't') goto yy459; - goto yy44; -yy373: - YYDEBUG(373, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy461; - if (yych == 'e') goto yy461; - goto yy44; -yy374: - YYDEBUG(374, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy463; - if (yych == 'd') goto yy463; - goto yy44; -yy375: - YYDEBUG(375, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy465; - if (yych == 'a') goto yy465; - goto yy44; -yy376: - YYDEBUG(376, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy466; - if (yych == 'r') goto yy466; - goto yy44; -yy377: - YYDEBUG(377, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy467; - if (yych == 'l') goto yy467; - goto yy44; -yy378: - YYDEBUG(378, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy468; - if (yych == 'n') goto yy468; - goto yy44; -yy379: - YYDEBUG(379, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy469; - if (yych == 'l') goto yy469; - goto yy44; -yy380: - YYDEBUG(380, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy470; - if (yych == 'n') goto yy470; - goto yy44; -yy381: - YYDEBUG(381, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy471; - if (yych == 't') goto yy471; - goto yy44; -yy382: - YYDEBUG(382, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy472; - if (yych == 'm') goto yy472; - goto yy44; -yy383: - YYDEBUG(383, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy473; - if (yych == 'a') goto yy473; - goto yy44; -yy384: - YYDEBUG(384, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy474; - if (yych == 'y') goto yy474; - goto yy82; -yy385: - YYDEBUG(385, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy476; - if (yych == 'r') goto yy476; - goto yy82; -yy386: - YYDEBUG(386, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy481; - if (yych == 'e') goto yy481; - goto yy478; -yy387: - YYDEBUG(387, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy482; - if (yych == 'l') goto yy482; - goto yy82; -yy388: - YYDEBUG(388, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy483; - if (yych == 't') goto yy483; - goto yy82; -yy389: - YYDEBUG(389, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; -yy390: - YYDEBUG(390, *YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy389; - goto yy82; - } else { - if (yych <= ' ') goto yy389; - if (yych != ')') goto yy82; - } - YYDEBUG(391, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(392, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1489 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_INT_CAST); -} -#line 4707 "Zend/zend_language_scanner.c" -yy393: - YYDEBUG(393, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy485; - if (yych == 'g') goto yy485; - goto yy82; -yy394: - YYDEBUG(394, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy486; - if (yych == 'c') goto yy486; - goto yy82; -yy395: - YYDEBUG(395, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(396, *YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy395; - goto yy82; - } else { - if (yych <= ' ') goto yy395; - if (yych == ')') goto yy487; - goto yy82; - } -yy397: - YYDEBUG(397, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy489; - if (yych == 'n') goto yy489; - goto yy82; -yy398: - YYDEBUG(398, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy490; - if (yych == 't') goto yy490; - goto yy82; -yy399: - YYDEBUG(399, *YYCURSOR); - ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; -yy400: - YYDEBUG(400, *YYCURSOR); - if (yych <= 'Z') { - if (yych <= '/') { - if (yych == '"') goto yy492; - goto yy82; - } else { - if (yych <= '9') goto yy399; - if (yych <= '@') goto yy82; - goto yy399; - } - } else { - if (yych <= '`') { - if (yych == '_') goto yy399; - goto yy82; - } else { - if (yych <= 'z') goto yy399; - if (yych <= 0x7F) goto yy82; - goto yy399; - } - } -yy401: - YYDEBUG(401, *YYCURSOR); - ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; -yy402: - YYDEBUG(402, *YYCURSOR); - if (yych <= 'Z') { - if (yych <= '/') { - if (yych == '\'') goto yy492; - goto yy82; - } else { - if (yych <= '9') goto yy401; - if (yych <= '@') goto yy82; - goto yy401; - } - } else { - if (yych <= '`') { - if (yych == '_') goto yy401; - goto yy82; - } else { - if (yych <= 'z') goto yy401; - if (yych <= 0x7F) goto yy82; - goto yy401; - } - } -yy403: - YYDEBUG(403, *YYCURSOR); - ++YYCURSOR; -yy404: - YYDEBUG(404, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2364 "Zend/zend_language_scanner.l" - { - char *s; - unsigned char *saved_cursor; - int bprefix = (yytext[0] != '<') ? 1 : 0, spacing = 0, indentation = 0; - zend_heredoc_label *heredoc_label = emalloc(sizeof(zend_heredoc_label)); - zend_bool is_heredoc = 1; - - CG(zend_lineno)++; - heredoc_label->length = yyleng-bprefix-3-1-(yytext[yyleng-2]=='\r'?1:0); - s = yytext+bprefix+3; - while ((*s == ' ') || (*s == '\t')) { - s++; - heredoc_label->length--; - } - - if (*s == '\'') { - s++; - heredoc_label->length -= 2; - is_heredoc = 0; - - BEGIN(ST_NOWDOC); - } else { - if (*s == '"') { - s++; - heredoc_label->length -= 2; - } - - BEGIN(ST_HEREDOC); - } - - heredoc_label->label = estrndup(s, heredoc_label->length); - heredoc_label->indentation = 0; - saved_cursor = YYCURSOR; - - zend_ptr_stack_push(&SCNG(heredoc_label_stack), (void *) heredoc_label); - - while (YYCURSOR < YYLIMIT && (*YYCURSOR == ' ' || *YYCURSOR == '\t')) { - if (*YYCURSOR == '\t') { - spacing |= HEREDOC_USING_TABS; - } else { - spacing |= HEREDOC_USING_SPACES; - } - ++YYCURSOR; - ++indentation; - } - - if (YYCURSOR == YYLIMIT) { - YYCURSOR = saved_cursor; - RETURN_TOKEN(T_START_HEREDOC); - } - - /* Check for ending label on the next line */ - if (heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, s, heredoc_label->length)) { - if (!IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) { - if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) { - zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0); - if (PARSER_MODE()) { - RETURN_TOKEN(T_ERROR); - } - } - - YYCURSOR = saved_cursor; - heredoc_label->indentation = indentation; - - BEGIN(ST_END_HEREDOC); - RETURN_TOKEN(T_START_HEREDOC); - } - } - - YYCURSOR = saved_cursor; - - if (is_heredoc && !SCNG(heredoc_scan_ahead)) { - zend_lex_state current_state; - zend_string *saved_doc_comment = CG(doc_comment); - int heredoc_nesting_level = 1; - int first_token = 0; - int error = 0; - - zend_save_lexical_state(¤t_state); - - SCNG(heredoc_scan_ahead) = 1; - SCNG(heredoc_indentation) = 0; - SCNG(heredoc_indentation_uses_spaces) = 0; - LANG_SCNG(on_event) = NULL; - CG(doc_comment) = NULL; - - zend_ptr_stack_reverse_apply(¤t_state.heredoc_label_stack, copy_heredoc_label_stack); - - zend_exception_save(); - while (heredoc_nesting_level) { - zval zv; - int retval; - - ZVAL_UNDEF(&zv); - retval = lex_scan(&zv, NULL); - zval_ptr_dtor_nogc(&zv); - - if (EG(exception)) { - zend_clear_exception(); - break; - } - - if (!first_token) { - first_token = retval; - } - - switch (retval) { - case T_START_HEREDOC: - ++heredoc_nesting_level; - break; - case T_END_HEREDOC: - --heredoc_nesting_level; - break; - case END: - heredoc_nesting_level = 0; - } - } - zend_exception_restore(); - - if ( - (first_token == T_VARIABLE - || first_token == T_DOLLAR_OPEN_CURLY_BRACES - || first_token == T_CURLY_OPEN - ) && SCNG(heredoc_indentation)) { - zend_throw_exception_ex(zend_ce_parse_error, 0, "Invalid body indentation level (expecting an indentation level of at least %d)", SCNG(heredoc_indentation)); - error = 1; - } - - heredoc_label->indentation = SCNG(heredoc_indentation); - heredoc_label->indentation_uses_spaces = SCNG(heredoc_indentation_uses_spaces); - - zend_restore_lexical_state(¤t_state); - SCNG(heredoc_scan_ahead) = 0; - CG(increment_lineno) = 0; - CG(doc_comment) = saved_doc_comment; - - if (PARSER_MODE() && error) { - RETURN_TOKEN(T_ERROR); - } - } - - RETURN_TOKEN(T_START_HEREDOC); -} -#line 4948 "Zend/zend_language_scanner.c" -yy405: - YYDEBUG(405, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '\n') goto yy403; - goto yy404; -yy406: - YYDEBUG(406, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy493; - if (yych == 'a') goto yy493; - goto yy44; -yy407: - YYDEBUG(407, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(408, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1608 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ARRAY); -} -#line 4972 "Zend/zend_language_scanner.c" -yy409: - YYDEBUG(409, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(410, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1397 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_BREAK); -} -#line 4985 "Zend/zend_language_scanner.c" -yy411: - YYDEBUG(411, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy494; - if (yych == 'b') goto yy494; - goto yy44; -yy412: - YYDEBUG(412, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(413, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1309 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_CATCH); -} -#line 5004 "Zend/zend_language_scanner.c" -yy414: - YYDEBUG(414, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(415, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1417 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_CLASS); -} -#line 5017 "Zend/zend_language_scanner.c" -yy416: - YYDEBUG(416, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(417, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1481 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_CLONE); -} -#line 5030 "Zend/zend_language_scanner.c" -yy418: - YYDEBUG(418, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(419, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1287 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_CONST); -} -#line 5043 "Zend/zend_language_scanner.c" -yy420: - YYDEBUG(420, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy495; - if (yych == 'n') goto yy495; - goto yy44; -yy421: - YYDEBUG(421, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy496; - if (yych == 'r') goto yy496; - goto yy44; -yy422: - YYDEBUG(422, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy497; - if (yych == 'l') goto yy497; - goto yy44; -yy423: - YYDEBUG(423, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy498; - if (yych == 'f') goto yy498; - goto yy44; -yy424: - YYDEBUG(424, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(425, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1564 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_EMPTY); -} -#line 5080 "Zend/zend_language_scanner.c" -yy426: - YYDEBUG(426, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy500; - if (yych == 'c') goto yy500; - goto yy44; -yy427: - YYDEBUG(427, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy501; - if (yych == 'r') goto yy501; - goto yy44; -yy428: - YYDEBUG(428, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(429, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1329 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ENDIF); -} -#line 5105 "Zend/zend_language_scanner.c" -yy430: - YYDEBUG(430, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy503; - if (yych == 'i') goto yy503; - goto yy44; -yy431: - YYDEBUG(431, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy504; - if (yych == 'i') goto yy504; - goto yy44; -yy432: - YYDEBUG(432, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy505; - if (yych == 'd') goto yy505; - goto yy44; -yy433: - YYDEBUG(433, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '^') { - if (yych <= '@') { - if (yych <= '/') goto yy434; - if (yych <= '9') goto yy43; - } else { - if (yych == 'L') goto yy506; - if (yych <= 'Z') goto yy43; - } - } else { - if (yych <= 'k') { - if (yych != '`') goto yy43; - } else { - if (yych <= 'l') goto yy506; - if (yych <= 'z') goto yy43; - if (yych >= 0x80) goto yy43; - } - } -yy434: - YYDEBUG(434, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1580 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_FINAL); -} -#line 5151 "Zend/zend_language_scanner.c" -yy435: - YYDEBUG(435, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy507; - if (yych == 'c') goto yy507; - goto yy44; -yy436: - YYDEBUG(436, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy508; - if (yych == 'i') goto yy508; - goto yy44; -yy437: - YYDEBUG(437, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy509; - if (yych == 'l') goto yy509; - goto yy44; -yy438: - YYDEBUG(438, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy511; - if (yych == 'm') goto yy511; - goto yy44; -yy439: - YYDEBUG(439, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy512; - if (yych == 'd') goto yy512; - goto yy44; -yy440: - YYDEBUG(440, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy513; - if (yych == 'n') goto yy513; - goto yy44; -yy441: - YYDEBUG(441, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy514; - if (yych == 'a') goto yy514; - goto yy44; -yy442: - YYDEBUG(442, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy515; - if (yych == 'f') goto yy515; - goto yy44; -yy443: - YYDEBUG(443, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(444, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1560 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ISSET); -} -#line 5212 "Zend/zend_language_scanner.c" -yy445: - YYDEBUG(445, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy516; - if (yych == 'p') goto yy516; - goto yy44; -yy446: - YYDEBUG(446, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(447, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1413 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_PRINT); -} -#line 5231 "Zend/zend_language_scanner.c" -yy448: - YYDEBUG(448, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy517; - if (yych == 't') goto yy517; - goto yy44; -yy449: - YYDEBUG(449, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy518; - if (yych == 'c') goto yy518; - goto yy44; -yy450: - YYDEBUG(450, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy519; - if (yych == 'c') goto yy519; - goto yy44; -yy451: - YYDEBUG(451, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy521; - if (yych == 'r') goto yy521; - goto yy44; -yy452: - YYDEBUG(452, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy522; - if (yych == 'n') goto yy522; - goto yy44; -yy453: - YYDEBUG(453, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy524; - if (yych == 'c') goto yy524; - goto yy44; -yy454: - YYDEBUG(454, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy526; - if (yych == 'h') goto yy526; - goto yy44; -yy455: - YYDEBUG(455, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(456, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1317 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_THROW); -} -#line 5286 "Zend/zend_language_scanner.c" -yy457: - YYDEBUG(457, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(458, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1425 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_TRAIT); -} -#line 5299 "Zend/zend_language_scanner.c" -yy459: - YYDEBUG(459, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(460, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1596 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_UNSET); -} -#line 5312 "Zend/zend_language_scanner.c" -yy461: - YYDEBUG(461, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(462, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1337 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_WHILE); -} -#line 5325 "Zend/zend_language_scanner.c" -yy463: - YYDEBUG(463, *YYCURSOR); - yyaccept = 8; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy43; - } - if (yych <= '\f') { - if (yych <= 0x08) goto yy464; - if (yych <= '\n') goto yy528; - } else { - if (yych <= '\r') goto yy528; - if (yych == ' ') goto yy528; - } -yy464: - YYDEBUG(464, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1301 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_YIELD); -} -#line 5347 "Zend/zend_language_scanner.c" -yy465: - YYDEBUG(465, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy530; - if (yych == 's') goto yy530; - goto yy44; -yy466: - YYDEBUG(466, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy531; - goto yy44; -yy467: - YYDEBUG(467, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy532; - if (yych == 'e') goto yy532; - goto yy44; -yy468: - YYDEBUG(468, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy533; - if (yych == 'c') goto yy533; - goto yy44; -yy469: - YYDEBUG(469, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy534; - if (yych == 't') goto yy534; - goto yy44; -yy470: - YYDEBUG(470, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy535; - if (yych == 'e') goto yy535; - goto yy44; -yy471: - YYDEBUG(471, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy536; - if (yych == 'h') goto yy536; - goto yy44; -yy472: - YYDEBUG(472, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy537; - if (yych == 'e') goto yy537; - goto yy44; -yy473: - YYDEBUG(473, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy538; - if (yych == 'i') goto yy538; - goto yy44; -yy474: - YYDEBUG(474, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(475, *YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy474; - goto yy82; - } else { - if (yych <= ' ') goto yy474; - if (yych == ')') goto yy539; - goto yy82; - } -yy476: - YYDEBUG(476, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy541; - if (yych == 'y') goto yy541; - goto yy82; -yy477: - YYDEBUG(477, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; -yy478: - YYDEBUG(478, *YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy477; - goto yy82; - } else { - if (yych <= ' ') goto yy477; - if (yych != ')') goto yy82; - } - YYDEBUG(479, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(480, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1516 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_BOOL_CAST); -} -#line 5443 "Zend/zend_language_scanner.c" -yy481: - YYDEBUG(481, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy543; - if (yych == 'a') goto yy543; - goto yy82; -yy482: - YYDEBUG(482, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy483; - if (yych != 'e') goto yy82; -yy483: - YYDEBUG(483, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(484, *YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy483; - goto yy82; - } else { - if (yych <= ' ') goto yy483; - if (yych == ')') goto yy544; - goto yy82; - } -yy485: - YYDEBUG(485, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy546; - if (yych == 'e') goto yy546; - goto yy82; -yy486: - YYDEBUG(486, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy547; - if (yych == 't') goto yy547; - goto yy82; -yy487: - YYDEBUG(487, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(488, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1497 "Zend/zend_language_scanner.l" - { - if (PARSER_MODE()) { - zend_error(E_DEPRECATED, "The (real) cast is deprecated, use (float) instead"); - } - RETURN_TOKEN(T_DOUBLE_CAST); -} -#line 5493 "Zend/zend_language_scanner.c" -yy489: - YYDEBUG(489, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy541; - if (yych == 'g') goto yy541; - goto yy82; -yy490: - YYDEBUG(490, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(491, *YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy490; - goto yy82; - } else { - if (yych <= ' ') goto yy490; - if (yych == ')') goto yy549; - goto yy82; - } -yy492: - YYDEBUG(492, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '\n') goto yy403; - if (yych == '\r') goto yy405; - goto yy82; -yy493: - YYDEBUG(493, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy551; - if (yych == 'c') goto yy551; - goto yy44; -yy494: - YYDEBUG(494, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy552; - if (yych == 'l') goto yy552; - goto yy44; -yy495: - YYDEBUG(495, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy553; - if (yych == 'u') goto yy553; - goto yy44; -yy496: - YYDEBUG(496, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy554; - if (yych == 'e') goto yy554; - goto yy44; -yy497: - YYDEBUG(497, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy556; - if (yych == 't') goto yy556; - goto yy44; -yy498: - YYDEBUG(498, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(499, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1325 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ELSEIF); -} -#line 5562 "Zend/zend_language_scanner.c" -yy500: - YYDEBUG(500, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy558; - if (yych == 'l') goto yy558; - goto yy44; -yy501: - YYDEBUG(501, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '^') { - if (yych <= '@') { - if (yych <= '/') goto yy502; - if (yych <= '9') goto yy43; - } else { - if (yych == 'E') goto yy559; - if (yych <= 'Z') goto yy43; - } - } else { - if (yych <= 'd') { - if (yych != '`') goto yy43; - } else { - if (yych <= 'e') goto yy559; - if (yych <= 'z') goto yy43; - if (yych >= 0x80) goto yy43; - } - } -yy502: - YYDEBUG(502, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1353 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ENDFOR); -} -#line 5596 "Zend/zend_language_scanner.c" -yy503: - YYDEBUG(503, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy560; - if (yych == 't') goto yy560; - goto yy44; -yy504: - YYDEBUG(504, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy561; - if (yych == 'l') goto yy561; - goto yy44; -yy505: - YYDEBUG(505, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy562; - if (yych == 's') goto yy562; - goto yy44; -yy506: - YYDEBUG(506, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy564; - if (yych == 'y') goto yy564; - goto yy44; -yy507: - YYDEBUG(507, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy566; - if (yych == 'h') goto yy566; - goto yy44; -yy508: - YYDEBUG(508, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy568; - if (yych == 'o') goto yy568; - goto yy44; -yy509: - YYDEBUG(509, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(510, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1556 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_GLOBAL); -} -#line 5645 "Zend/zend_language_scanner.c" -yy511: - YYDEBUG(511, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy569; - if (yych == 'e') goto yy569; - goto yy44; -yy512: - YYDEBUG(512, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy570; - if (yych == 'e') goto yy570; - goto yy44; -yy513: - YYDEBUG(513, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy572; - if (yych == 'c') goto yy572; - goto yy44; -yy514: - YYDEBUG(514, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy573; - if (yych == 'd') goto yy573; - goto yy44; -yy515: - YYDEBUG(515, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy574; - if (yych == 'a') goto yy574; - goto yy44; -yy516: - YYDEBUG(516, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy575; - if (yych == 'a') goto yy575; - goto yy44; -yy517: - YYDEBUG(517, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy576; - if (yych == 'e') goto yy576; - goto yy44; -yy518: - YYDEBUG(518, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy578; - if (yych == 't') goto yy578; - goto yy44; -yy519: - YYDEBUG(519, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(520, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1592 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_PUBLIC); -} -#line 5706 "Zend/zend_language_scanner.c" -yy521: - YYDEBUG(521, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy579; - if (yych == 'e') goto yy579; - goto yy44; -yy522: - YYDEBUG(522, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(523, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1291 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_RETURN); -} -#line 5725 "Zend/zend_language_scanner.c" -yy524: - YYDEBUG(524, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(525, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1572 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_STATIC); -} -#line 5738 "Zend/zend_language_scanner.c" -yy526: - YYDEBUG(526, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(527, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1381 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_SWITCH); -} -#line 5751 "Zend/zend_language_scanner.c" -yy528: - YYDEBUG(528, *YYCURSOR); - ++YYCURSOR; - YYFILL(5); - yych = *YYCURSOR; - YYDEBUG(529, *YYCURSOR); - if (yych <= 0x1F) { - if (yych <= '\n') { - if (yych <= 0x08) goto yy82; - goto yy528; - } else { - if (yych == '\r') goto yy528; - goto yy82; - } - } else { - if (yych <= 'F') { - if (yych <= ' ') goto yy528; - if (yych <= 'E') goto yy82; - goto yy581; - } else { - if (yych == 'f') goto yy581; - goto yy82; - } - } -yy530: - YYDEBUG(530, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy582; - if (yych == 's') goto yy582; - goto yy44; -yy531: - YYDEBUG(531, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy583; - goto yy44; -yy532: - YYDEBUG(532, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy585; - goto yy44; -yy533: - YYDEBUG(533, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy586; - if (yych == 't') goto yy586; - goto yy44; -yy534: - YYDEBUG(534, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy587; - goto yy44; -yy535: - YYDEBUG(535, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy588; - goto yy44; -yy536: - YYDEBUG(536, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy589; - if (yych == 'o') goto yy589; - goto yy44; -yy537: - YYDEBUG(537, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy590; - if (yych == 's') goto yy590; - goto yy44; -yy538: - YYDEBUG(538, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy591; - if (yych == 't') goto yy591; - goto yy44; -yy539: - YYDEBUG(539, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(540, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1508 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ARRAY_CAST); -} -#line 5835 "Zend/zend_language_scanner.c" -yy541: - YYDEBUG(541, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(542, *YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy541; - goto yy82; - } else { - if (yych <= ' ') goto yy541; - if (yych == ')') goto yy592; - goto yy82; - } -yy543: - YYDEBUG(543, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy477; - if (yych == 'n') goto yy477; - goto yy82; -yy544: - YYDEBUG(544, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(545, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1493 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_DOUBLE_CAST); -} -#line 5865 "Zend/zend_language_scanner.c" -yy546: - YYDEBUG(546, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy389; - if (yych == 'r') goto yy389; - goto yy82; -yy547: - YYDEBUG(547, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(548, *YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy547; - goto yy82; - } else { - if (yych <= ' ') goto yy547; - if (yych == ')') goto yy594; - goto yy82; - } -yy549: - YYDEBUG(549, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(550, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1520 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_UNSET_CAST); -} -#line 5895 "Zend/zend_language_scanner.c" -yy551: - YYDEBUG(551, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy596; - if (yych == 't') goto yy596; - goto yy44; -yy552: - YYDEBUG(552, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy598; - if (yych == 'e') goto yy598; - goto yy44; -yy553: - YYDEBUG(553, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy600; - if (yych == 'e') goto yy600; - goto yy44; -yy554: - YYDEBUG(554, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(555, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1365 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_DECLARE); -} -#line 5926 "Zend/zend_language_scanner.c" -yy556: - YYDEBUG(556, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(557, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1393 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_DEFAULT); -} -#line 5939 "Zend/zend_language_scanner.c" -yy558: - YYDEBUG(558, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy602; - if (yych == 'a') goto yy602; - goto yy44; -yy559: - YYDEBUG(559, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy603; - if (yych == 'a') goto yy603; - goto yy44; -yy560: - YYDEBUG(560, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy604; - if (yych == 'c') goto yy604; - goto yy44; -yy561: - YYDEBUG(561, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy605; - if (yych == 'e') goto yy605; - goto yy44; -yy562: - YYDEBUG(562, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(563, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1429 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_EXTENDS); -} -#line 5976 "Zend/zend_language_scanner.c" -yy564: - YYDEBUG(564, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(565, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1313 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_FINALLY); -} -#line 5989 "Zend/zend_language_scanner.c" -yy566: - YYDEBUG(566, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(567, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1357 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_FOREACH); -} -#line 6002 "Zend/zend_language_scanner.c" -yy568: - YYDEBUG(568, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy607; - if (yych == 'n') goto yy607; - goto yy44; -yy569: - YYDEBUG(569, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy609; - if (yych == 'n') goto yy609; - goto yy44; -yy570: - YYDEBUG(570, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '^') { - if (yych <= '9') { - if (yych >= '0') goto yy43; - } else { - if (yych <= '@') goto yy571; - if (yych <= 'Z') goto yy43; - } - } else { - if (yych <= '`') { - if (yych <= '_') goto yy610; - } else { - if (yych <= 'z') goto yy43; - if (yych >= 0x80) goto yy43; - } - } -yy571: - YYDEBUG(571, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1528 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_INCLUDE); -} -#line 6040 "Zend/zend_language_scanner.c" -yy572: - YYDEBUG(572, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy611; - if (yych == 'e') goto yy611; - goto yy44; -yy573: - YYDEBUG(573, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy612; - if (yych == 'o') goto yy612; - goto yy44; -yy574: - YYDEBUG(574, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy613; - if (yych == 'c') goto yy613; - goto yy44; -yy575: - YYDEBUG(575, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy614; - if (yych == 'c') goto yy614; - goto yy44; -yy576: - YYDEBUG(576, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(577, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1584 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_PRIVATE); -} -#line 6077 "Zend/zend_language_scanner.c" -yy578: - YYDEBUG(578, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy615; - if (yych == 'e') goto yy615; - goto yy44; -yy579: - YYDEBUG(579, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '^') { - if (yych <= '9') { - if (yych >= '0') goto yy43; - } else { - if (yych <= '@') goto yy580; - if (yych <= 'Z') goto yy43; - } - } else { - if (yych <= '`') { - if (yych <= '_') goto yy616; - } else { - if (yych <= 'z') goto yy43; - if (yych >= 0x80) goto yy43; - } - } -yy580: - YYDEBUG(580, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1536 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_REQUIRE); -} -#line 6109 "Zend/zend_language_scanner.c" -yy581: - YYDEBUG(581, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy617; - if (yych == 'r') goto yy617; - goto yy82; -yy582: - YYDEBUG(582, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy618; - goto yy44; -yy583: - YYDEBUG(583, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(584, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1993 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_DIR); -} -#line 6133 "Zend/zend_language_scanner.c" -yy585: - YYDEBUG(585, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy619; - goto yy44; -yy586: - YYDEBUG(586, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy621; - if (yych == 'i') goto yy621; - goto yy44; -yy587: - YYDEBUG(587, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy622; - if (yych == 'c') goto yy622; - goto yy44; -yy588: - YYDEBUG(588, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy623; - goto yy44; -yy589: - YYDEBUG(589, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy625; - if (yych == 'd') goto yy625; - goto yy44; -yy590: - YYDEBUG(590, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy626; - if (yych == 'p') goto yy626; - goto yy44; -yy591: - YYDEBUG(591, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy627; - goto yy44; -yy592: - YYDEBUG(592, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(593, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1504 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_STRING_CAST); -} -#line 6182 "Zend/zend_language_scanner.c" -yy594: - YYDEBUG(594, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(595, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1512 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_OBJECT_CAST); -} -#line 6192 "Zend/zend_language_scanner.c" -yy596: - YYDEBUG(596, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(597, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1576 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ABSTRACT); -} -#line 6205 "Zend/zend_language_scanner.c" -yy598: - YYDEBUG(598, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(599, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1612 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_CALLABLE); -} -#line 6218 "Zend/zend_language_scanner.c" -yy600: - YYDEBUG(600, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(601, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1401 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_CONTINUE); -} -#line 6231 "Zend/zend_language_scanner.c" -yy602: - YYDEBUG(602, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy628; - if (yych == 'r') goto yy628; - goto yy44; -yy603: - YYDEBUG(603, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy629; - if (yych == 'c') goto yy629; - goto yy44; -yy604: - YYDEBUG(604, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy630; - if (yych == 'h') goto yy630; - goto yy44; -yy605: - YYDEBUG(605, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(606, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1341 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ENDWHILE); -} -#line 6262 "Zend/zend_language_scanner.c" -yy607: - YYDEBUG(607, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(608, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1283 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_FUNCTION); -} -#line 6275 "Zend/zend_language_scanner.c" -yy609: - YYDEBUG(609, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy632; - if (yych == 't') goto yy632; - goto yy44; -yy610: - YYDEBUG(610, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy633; - if (yych == 'o') goto yy633; - goto yy44; -yy611: - YYDEBUG(611, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy634; - if (yych == 'o') goto yy634; - goto yy44; -yy612: - YYDEBUG(612, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy635; - if (yych == 'f') goto yy635; - goto yy44; -yy613: - YYDEBUG(613, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy637; - if (yych == 'e') goto yy637; - goto yy44; -yy614: - YYDEBUG(614, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy639; - if (yych == 'e') goto yy639; - goto yy44; -yy615: - YYDEBUG(615, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy641; - if (yych == 'd') goto yy641; - goto yy44; -yy616: - YYDEBUG(616, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy643; - if (yych == 'o') goto yy643; - goto yy44; -yy617: - YYDEBUG(617, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy644; - if (yych == 'o') goto yy644; - goto yy82; -yy618: - YYDEBUG(618, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy645; - goto yy44; -yy619: - YYDEBUG(619, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(620, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1989 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_FILE); -} -#line 6347 "Zend/zend_language_scanner.c" -yy621: - YYDEBUG(621, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy647; - if (yych == 'o') goto yy647; - goto yy44; -yy622: - YYDEBUG(622, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy648; - if (yych == 'o') goto yy648; - goto yy44; -yy623: - YYDEBUG(623, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(624, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1985 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_LINE); -} -#line 6372 "Zend/zend_language_scanner.c" -yy625: - YYDEBUG(625, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy649; - goto yy44; -yy626: - YYDEBUG(626, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy650; - if (yych == 'a') goto yy650; - goto yy44; -yy627: - YYDEBUG(627, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy651; - goto yy44; -yy628: - YYDEBUG(628, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy653; - if (yych == 'e') goto yy653; - goto yy44; -yy629: - YYDEBUG(629, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy655; - if (yych == 'h') goto yy655; - goto yy44; -yy630: - YYDEBUG(630, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(631, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1385 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ENDSWITCH); -} -#line 6413 "Zend/zend_language_scanner.c" -yy632: - YYDEBUG(632, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy657; - if (yych == 's') goto yy657; - goto yy44; -yy633: - YYDEBUG(633, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy659; - if (yych == 'n') goto yy659; - goto yy44; -yy634: - YYDEBUG(634, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy660; - if (yych == 'f') goto yy660; - goto yy44; -yy635: - YYDEBUG(635, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(636, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1552 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_INSTEADOF); -} -#line 6444 "Zend/zend_language_scanner.c" -yy637: - YYDEBUG(637, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(638, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1421 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_INTERFACE); -} -#line 6457 "Zend/zend_language_scanner.c" -yy639: - YYDEBUG(639, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(640, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1544 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_NAMESPACE); -} -#line 6470 "Zend/zend_language_scanner.c" -yy641: - YYDEBUG(641, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(642, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1588 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_PROTECTED); -} -#line 6483 "Zend/zend_language_scanner.c" -yy643: - YYDEBUG(643, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy662; - if (yych == 'n') goto yy662; - goto yy44; -yy644: - YYDEBUG(644, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy663; - if (yych == 'm') goto yy663; - goto yy82; -yy645: - YYDEBUG(645, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(646, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1969 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_CLASS_C); -} -#line 6508 "Zend/zend_language_scanner.c" -yy647: - YYDEBUG(647, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy664; - if (yych == 'n') goto yy664; - goto yy44; -yy648: - YYDEBUG(648, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy665; - if (yych == 'm') goto yy665; - goto yy44; -yy649: - YYDEBUG(649, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy666; - goto yy44; -yy650: - YYDEBUG(650, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy668; - if (yych == 'c') goto yy668; - goto yy44; -yy651: - YYDEBUG(651, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(652, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1973 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_TRAIT_C); -} -#line 6544 "Zend/zend_language_scanner.c" -yy653: - YYDEBUG(653, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(654, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1369 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ENDDECLARE); -} -#line 6557 "Zend/zend_language_scanner.c" -yy655: - YYDEBUG(655, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(656, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1361 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_ENDFOREACH); -} -#line 6570 "Zend/zend_language_scanner.c" -yy657: - YYDEBUG(657, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(658, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1433 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_IMPLEMENTS); -} -#line 6583 "Zend/zend_language_scanner.c" -yy659: - YYDEBUG(659, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy669; - if (yych == 'c') goto yy669; - goto yy44; -yy660: - YYDEBUG(660, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(661, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1373 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_INSTANCEOF); -} -#line 6602 "Zend/zend_language_scanner.c" -yy662: - YYDEBUG(662, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy670; - if (yych == 'c') goto yy670; - goto yy44; -yy663: - YYDEBUG(663, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '^') { - if (yych <= '9') { - if (yych <= '/') goto yy671; - goto yy82; - } else { - if (yych <= '@') goto yy671; - if (yych <= 'Z') goto yy82; - goto yy671; - } - } else { - if (yych <= '`') { - if (yych <= '_') goto yy82; - goto yy671; - } else { - if (yych <= 'z') goto yy82; - if (yych <= 0x7F) goto yy671; - goto yy82; - } - } -yy664: - YYDEBUG(664, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy673; - goto yy44; -yy665: - YYDEBUG(665, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy674; - if (yych == 'p') goto yy674; - goto yy44; -yy666: - YYDEBUG(666, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(667, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1981 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_METHOD_C); -} -#line 6654 "Zend/zend_language_scanner.c" -yy668: - YYDEBUG(668, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy675; - if (yych == 'e') goto yy675; - goto yy44; -yy669: - YYDEBUG(669, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy676; - if (yych == 'e') goto yy676; - goto yy44; -yy670: - YYDEBUG(670, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy678; - if (yych == 'e') goto yy678; - goto yy44; -yy671: - YYDEBUG(671, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(672, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1295 "Zend/zend_language_scanner.l" - { - yyless(yyleng - 1); - HANDLE_NEWLINES(yytext, yyleng); - RETURN_TOKEN(T_YIELD_FROM); -} -#line 6684 "Zend/zend_language_scanner.c" -yy673: - YYDEBUG(673, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy680; - goto yy44; -yy674: - YYDEBUG(674, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy682; - if (yych == 'i') goto yy682; - goto yy44; -yy675: - YYDEBUG(675, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy683; - goto yy44; -yy676: - YYDEBUG(676, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(677, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1532 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_INCLUDE_ONCE); -} -#line 6713 "Zend/zend_language_scanner.c" -yy678: - YYDEBUG(678, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(679, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1540 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_REQUIRE_ONCE); -} -#line 6726 "Zend/zend_language_scanner.c" -yy680: - YYDEBUG(680, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(681, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1977 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_FUNC_C); -} -#line 6739 "Zend/zend_language_scanner.c" -yy682: - YYDEBUG(682, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy684; - if (yych == 'l') goto yy684; - goto yy44; -yy683: - YYDEBUG(683, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '_') goto yy685; - goto yy44; -yy684: - YYDEBUG(684, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy687; - if (yych == 'e') goto yy687; - goto yy44; -yy685: - YYDEBUG(685, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(686, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1997 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_NS_C); -} -#line 6769 "Zend/zend_language_scanner.c" -yy687: - YYDEBUG(687, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy688; - if (yych != 'r') goto yy44; -yy688: - YYDEBUG(688, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy43; - } - YYDEBUG(689, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1568 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_HALT_COMPILER); -} -#line 6787 "Zend/zend_language_scanner.c" - } -/* *********************************** */ -yyc_ST_LOOKING_FOR_PROPERTY: - { - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 64, 64, 0, 0, 64, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 64, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 128, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - }; - YYDEBUG(690, *YYCURSOR); - YYFILL(2); - yych = *YYCURSOR; - if (yybm[0+yych] & 64) { - goto yy694; - } - if (yych <= '^') { - if (yych <= '-') { - if (yych >= '-') goto yy697; - } else { - if (yych <= '@') goto yy692; - if (yych <= 'Z') goto yy698; - } - } else { - if (yych <= '`') { - if (yych <= '_') goto yy698; - } else { - if (yych <= 'z') goto yy698; - if (yych >= 0x80) goto yy698; - } - } -yy692: - YYDEBUG(692, *YYCURSOR); - ++YYCURSOR; -yy693: - YYDEBUG(693, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1455 "Zend/zend_language_scanner.l" - { - yyless(0); - yy_pop_state(); - goto restart; -} -#line 6859 "Zend/zend_language_scanner.c" -yy694: - YYDEBUG(694, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(695, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy694; - } - YYDEBUG(696, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1442 "Zend/zend_language_scanner.l" - { - goto return_whitespace; -} -#line 6875 "Zend/zend_language_scanner.c" -yy697: - YYDEBUG(697, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '>') goto yy701; - goto yy693; -yy698: - YYDEBUG(698, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(699, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy698; - } - YYDEBUG(700, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1450 "Zend/zend_language_scanner.l" - { - yy_pop_state(); - RETURN_TOKEN_WITH_STR(T_STRING, 0); -} -#line 6897 "Zend/zend_language_scanner.c" -yy701: - YYDEBUG(701, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(702, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1446 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN(T_OBJECT_OPERATOR); -} -#line 6907 "Zend/zend_language_scanner.c" - } -/* *********************************** */ -yyc_ST_BACKQUOTE: - { - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 128, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - }; - YYDEBUG(703, *YYCURSOR); - YYFILL(2); - yych = *YYCURSOR; - if (yych <= '_') { - if (yych == '$') goto yy707; - } else { - if (yych <= '`') goto yy708; - if (yych == '{') goto yy710; - } - YYDEBUG(705, *YYCURSOR); - ++YYCURSOR; -yy706: - YYDEBUG(706, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2601 "Zend/zend_language_scanner.l" - { - if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); - } - if (yytext[0] == '\\' && YYCURSOR < YYLIMIT) { - YYCURSOR++; - } - - while (YYCURSOR < YYLIMIT) { - switch (*YYCURSOR++) { - case '`': - break; - case '$': - if (IS_LABEL_START(*YYCURSOR) || *YYCURSOR == '{') { - break; - } - continue; - case '{': - if (*YYCURSOR == '$') { - break; - } - continue; - case '\\': - if (YYCURSOR < YYLIMIT) { - YYCURSOR++; - } - /* fall through */ - default: - continue; - } - - YYCURSOR--; - break; - } - - yyleng = YYCURSOR - SCNG(yy_text); - - if (EXPECTED(zend_scan_escape_string(zendlval, yytext, yyleng, '`') == SUCCESS) - || !PARSER_MODE()) { - RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); - } else { - RETURN_TOKEN(T_ERROR); - } -} -#line 7005 "Zend/zend_language_scanner.c" -yy707: - YYDEBUG(707, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '_') { - if (yych <= '@') goto yy706; - if (yych <= 'Z') goto yy711; - if (yych <= '^') goto yy706; - goto yy711; - } else { - if (yych <= 'z') { - if (yych <= '`') goto yy706; - goto yy711; - } else { - if (yych <= '{') goto yy714; - if (yych <= 0x7F) goto yy706; - goto yy711; - } - } -yy708: - YYDEBUG(708, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(709, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2541 "Zend/zend_language_scanner.l" - { - BEGIN(ST_IN_SCRIPTING); - RETURN_TOKEN('`'); -} -#line 7034 "Zend/zend_language_scanner.c" -yy710: - YYDEBUG(710, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '$') goto yy716; - goto yy706; -yy711: - YYDEBUG(711, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - YYDEBUG(712, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy711; - } - if (yych == '-') goto yy718; - if (yych <= '@') goto yy713; - if (yych <= '[') goto yy720; -yy713: - YYDEBUG(713, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2122 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 7059 "Zend/zend_language_scanner.c" -yy714: - YYDEBUG(714, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(715, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1747 "Zend/zend_language_scanner.l" - { - yy_push_state(ST_LOOKING_FOR_VARNAME); - RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); -} -#line 7070 "Zend/zend_language_scanner.c" -yy716: - YYDEBUG(716, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(717, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2529 "Zend/zend_language_scanner.l" - { - yy_push_state(ST_IN_SCRIPTING); - yyless(1); - RETURN_TOKEN(T_CURLY_OPEN); -} -#line 7082 "Zend/zend_language_scanner.c" -yy718: - YYDEBUG(718, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '>') goto yy722; -yy719: - YYDEBUG(719, *YYCURSOR); - YYCURSOR = YYMARKER; - goto yy713; -yy720: - YYDEBUG(720, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(721, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2116 "Zend/zend_language_scanner.l" - { - yyless(yyleng - 1); - yy_push_state(ST_VAR_OFFSET); - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 7102 "Zend/zend_language_scanner.c" -yy722: - YYDEBUG(722, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '_') { - if (yych <= '@') goto yy719; - if (yych <= 'Z') goto yy723; - if (yych <= '^') goto yy719; - } else { - if (yych <= '`') goto yy719; - if (yych <= 'z') goto yy723; - if (yych <= 0x7F) goto yy719; - } -yy723: - YYDEBUG(723, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(724, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2108 "Zend/zend_language_scanner.l" - { - yyless(yyleng - 3); - yy_push_state(ST_LOOKING_FOR_PROPERTY); - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 7126 "Zend/zend_language_scanner.c" - } -/* *********************************** */ -yyc_ST_DOUBLE_QUOTES: - { - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 128, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - }; - YYDEBUG(725, *YYCURSOR); - YYFILL(2); - yych = *YYCURSOR; - if (yych <= '#') { - if (yych == '"') goto yy729; - } else { - if (yych <= '$') goto yy731; - if (yych == '{') goto yy732; - } - YYDEBUG(727, *YYCURSOR); - ++YYCURSOR; -yy728: - YYDEBUG(728, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2547 "Zend/zend_language_scanner.l" - { - if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) { - YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1; - SET_DOUBLE_QUOTES_SCANNED_LENGTH(0); - - goto double_quotes_scan_done; - } - - if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); - } - if (yytext[0] == '\\' && YYCURSOR < YYLIMIT) { - YYCURSOR++; - } - - while (YYCURSOR < YYLIMIT) { - switch (*YYCURSOR++) { - case '"': - break; - case '$': - if (IS_LABEL_START(*YYCURSOR) || *YYCURSOR == '{') { - break; - } - continue; - case '{': - if (*YYCURSOR == '$') { - break; - } - continue; - case '\\': - if (YYCURSOR < YYLIMIT) { - YYCURSOR++; - } - /* fall through */ - default: - continue; - } - - YYCURSOR--; - break; - } - -double_quotes_scan_done: - yyleng = YYCURSOR - SCNG(yy_text); - - if (EXPECTED(zend_scan_escape_string(zendlval, yytext, yyleng, '"') == SUCCESS) - || !PARSER_MODE()) { - RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); - } else { - RETURN_TOKEN(T_ERROR); - } -} -#line 7232 "Zend/zend_language_scanner.c" -yy729: - YYDEBUG(729, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(730, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2536 "Zend/zend_language_scanner.l" - { - BEGIN(ST_IN_SCRIPTING); - RETURN_TOKEN('"'); -} -#line 7243 "Zend/zend_language_scanner.c" -yy731: - YYDEBUG(731, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '_') { - if (yych <= '@') goto yy728; - if (yych <= 'Z') goto yy733; - if (yych <= '^') goto yy728; - goto yy733; - } else { - if (yych <= 'z') { - if (yych <= '`') goto yy728; - goto yy733; - } else { - if (yych <= '{') goto yy736; - if (yych <= 0x7F) goto yy728; - goto yy733; - } - } -yy732: - YYDEBUG(732, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '$') goto yy738; - goto yy728; -yy733: - YYDEBUG(733, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - YYDEBUG(734, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy733; - } - if (yych == '-') goto yy740; - if (yych <= '@') goto yy735; - if (yych <= '[') goto yy742; -yy735: - YYDEBUG(735, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2122 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 7286 "Zend/zend_language_scanner.c" -yy736: - YYDEBUG(736, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(737, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1747 "Zend/zend_language_scanner.l" - { - yy_push_state(ST_LOOKING_FOR_VARNAME); - RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); -} -#line 7297 "Zend/zend_language_scanner.c" -yy738: - YYDEBUG(738, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(739, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2529 "Zend/zend_language_scanner.l" - { - yy_push_state(ST_IN_SCRIPTING); - yyless(1); - RETURN_TOKEN(T_CURLY_OPEN); -} -#line 7309 "Zend/zend_language_scanner.c" -yy740: - YYDEBUG(740, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '>') goto yy744; -yy741: - YYDEBUG(741, *YYCURSOR); - YYCURSOR = YYMARKER; - goto yy735; -yy742: - YYDEBUG(742, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(743, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2116 "Zend/zend_language_scanner.l" - { - yyless(yyleng - 1); - yy_push_state(ST_VAR_OFFSET); - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 7329 "Zend/zend_language_scanner.c" -yy744: - YYDEBUG(744, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '_') { - if (yych <= '@') goto yy741; - if (yych <= 'Z') goto yy745; - if (yych <= '^') goto yy741; - } else { - if (yych <= '`') goto yy741; - if (yych <= 'z') goto yy745; - if (yych <= 0x7F) goto yy741; - } -yy745: - YYDEBUG(745, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(746, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2108 "Zend/zend_language_scanner.l" - { - yyless(yyleng - 3); - yy_push_state(ST_LOOKING_FOR_PROPERTY); - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 7353 "Zend/zend_language_scanner.c" - } -/* *********************************** */ -yyc_ST_HEREDOC: - { - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 128, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - }; - YYDEBUG(747, *YYCURSOR); - YYFILL(2); - yych = *YYCURSOR; - if (yych == '$') goto yy751; - if (yych == '{') goto yy752; - YYDEBUG(749, *YYCURSOR); - ++YYCURSOR; -yy750: - YYDEBUG(750, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2647 "Zend/zend_language_scanner.l" - { - zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack)); - int newline = 0, indentation = 0, spacing = 0; - - if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); - } - - YYCURSOR--; - - while (YYCURSOR < YYLIMIT) { - switch (*YYCURSOR++) { - case '\r': - if (*YYCURSOR == '\n') { - YYCURSOR++; - } - /* fall through */ - case '\n': - indentation = spacing = 0; - - while (YYCURSOR < YYLIMIT && (*YYCURSOR == ' ' || *YYCURSOR == '\t')) { - if (*YYCURSOR == '\t') { - spacing |= HEREDOC_USING_TABS; - } else { - spacing |= HEREDOC_USING_SPACES; - } - ++YYCURSOR; - ++indentation; - } - - if (YYCURSOR == YYLIMIT) { - yyleng = YYCURSOR - SCNG(yy_text); - HANDLE_NEWLINES(yytext, yyleng); - ZVAL_NULL(zendlval); - RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); - } - - /* Check for ending label on the next line */ - if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) { - if (IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) { - continue; - } - - if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) { - zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0); - if (PARSER_MODE()) { - RETURN_TOKEN(T_ERROR); - } - } - - /* newline before label will be subtracted from returned text, but - * yyleng/yytext will include it, for zend_highlight/strip, tokenizer, etc. */ - if (YYCURSOR[-indentation - 2] == '\r' && YYCURSOR[-indentation - 1] == '\n') { - newline = 2; /* Windows newline */ - } else { - newline = 1; - } - - CG(increment_lineno) = 1; /* For newline before label */ - - if (SCNG(heredoc_scan_ahead)) { - SCNG(heredoc_indentation) = indentation; - SCNG(heredoc_indentation_uses_spaces) = (spacing == HEREDOC_USING_SPACES); - } else { - YYCURSOR -= indentation; - } - - BEGIN(ST_END_HEREDOC); - - goto heredoc_scan_done; - } - continue; - case '$': - if (IS_LABEL_START(*YYCURSOR) || *YYCURSOR == '{') { - break; - } - continue; - case '{': - if (*YYCURSOR == '$') { - break; - } - continue; - case '\\': - if (YYCURSOR < YYLIMIT && *YYCURSOR != '\n' && *YYCURSOR != '\r') { - YYCURSOR++; - } - /* fall through */ - default: - continue; - } - - YYCURSOR--; - break; - } - -heredoc_scan_done: - - yyleng = YYCURSOR - SCNG(yy_text); - ZVAL_STRINGL(zendlval, yytext, yyleng - newline); - - if (!SCNG(heredoc_scan_ahead) && !EG(exception) && PARSER_MODE()) { - zend_bool newline_at_start = *(yytext - 1) == '\n' || *(yytext - 1) == '\r'; - zend_string *copy = Z_STR_P(zendlval); - - if (!strip_multiline_string_indentation( - zendlval, heredoc_label->indentation, heredoc_label->indentation_uses_spaces, - newline_at_start, newline != 0)) { - RETURN_TOKEN(T_ERROR); - } - - if (UNEXPECTED(zend_scan_escape_string(zendlval, ZSTR_VAL(copy), ZSTR_LEN(copy), 0) != SUCCESS)) { - zend_string_efree(copy); - RETURN_TOKEN(T_ERROR); - } - - zend_string_efree(copy); - } else { - HANDLE_NEWLINES(yytext, yyleng - newline); - } - - RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); -} -#line 7525 "Zend/zend_language_scanner.c" -yy751: - YYDEBUG(751, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '_') { - if (yych <= '@') goto yy750; - if (yych <= 'Z') goto yy753; - if (yych <= '^') goto yy750; - goto yy753; - } else { - if (yych <= 'z') { - if (yych <= '`') goto yy750; - goto yy753; - } else { - if (yych <= '{') goto yy756; - if (yych <= 0x7F) goto yy750; - goto yy753; - } - } -yy752: - YYDEBUG(752, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '$') goto yy758; - goto yy750; -yy753: - YYDEBUG(753, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - YYDEBUG(754, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy753; - } - if (yych == '-') goto yy760; - if (yych <= '@') goto yy755; - if (yych <= '[') goto yy762; -yy755: - YYDEBUG(755, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2122 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 7568 "Zend/zend_language_scanner.c" -yy756: - YYDEBUG(756, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(757, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1747 "Zend/zend_language_scanner.l" - { - yy_push_state(ST_LOOKING_FOR_VARNAME); - RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); -} -#line 7579 "Zend/zend_language_scanner.c" -yy758: - YYDEBUG(758, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(759, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2529 "Zend/zend_language_scanner.l" - { - yy_push_state(ST_IN_SCRIPTING); - yyless(1); - RETURN_TOKEN(T_CURLY_OPEN); -} -#line 7591 "Zend/zend_language_scanner.c" -yy760: - YYDEBUG(760, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '>') goto yy764; -yy761: - YYDEBUG(761, *YYCURSOR); - YYCURSOR = YYMARKER; - goto yy755; -yy762: - YYDEBUG(762, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(763, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2116 "Zend/zend_language_scanner.l" - { - yyless(yyleng - 1); - yy_push_state(ST_VAR_OFFSET); - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 7611 "Zend/zend_language_scanner.c" -yy764: - YYDEBUG(764, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '_') { - if (yych <= '@') goto yy761; - if (yych <= 'Z') goto yy765; - if (yych <= '^') goto yy761; - } else { - if (yych <= '`') goto yy761; - if (yych <= 'z') goto yy765; - if (yych <= 0x7F) goto yy761; - } -yy765: - YYDEBUG(765, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(766, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2108 "Zend/zend_language_scanner.l" - { - yyless(yyleng - 3); - yy_push_state(ST_LOOKING_FOR_PROPERTY); - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 7635 "Zend/zend_language_scanner.c" - } -/* *********************************** */ -yyc_ST_LOOKING_FOR_VARNAME: - { - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 128, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - }; - YYDEBUG(767, *YYCURSOR); - YYFILL(2); - yych = *YYCURSOR; - if (yych <= '_') { - if (yych <= '@') goto yy769; - if (yych <= 'Z') goto yy771; - if (yych >= '_') goto yy771; - } else { - if (yych <= '`') goto yy769; - if (yych <= 'z') goto yy771; - if (yych >= 0x80) goto yy771; - } -yy769: - YYDEBUG(769, *YYCURSOR); - ++YYCURSOR; -yy770: - YYDEBUG(770, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1770 "Zend/zend_language_scanner.l" - { - yyless(0); - yy_pop_state(); - yy_push_state(ST_IN_SCRIPTING); - goto restart; -} -#line 7699 "Zend/zend_language_scanner.c" -yy771: - YYDEBUG(771, *YYCURSOR); - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '_') { - if (yych <= '@') { - if (yych <= '/') goto yy770; - if (yych <= '9') goto yy773; - goto yy770; - } else { - if (yych <= '[') goto yy773; - if (yych <= '^') goto yy770; - goto yy773; - } - } else { - if (yych <= '|') { - if (yych <= '`') goto yy770; - if (yych <= 'z') goto yy773; - goto yy770; - } else { - if (yych <= '}') goto yy773; - if (yych <= 0x7F) goto yy770; - goto yy773; - } - } -yy772: - YYDEBUG(772, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; -yy773: - YYDEBUG(773, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy772; - } - if (yych <= '@') goto yy774; - if (yych <= '[') goto yy775; - if (yych == '}') goto yy775; -yy774: - YYDEBUG(774, *YYCURSOR); - YYCURSOR = YYMARKER; - goto yy770; -yy775: - YYDEBUG(775, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(776, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1762 "Zend/zend_language_scanner.l" - { - yyless(yyleng - 1); - yy_pop_state(); - yy_push_state(ST_IN_SCRIPTING); - RETURN_TOKEN_WITH_STR(T_STRING_VARNAME, 0); -} -#line 7753 "Zend/zend_language_scanner.c" - } -/* *********************************** */ -yyc_ST_VAR_OFFSET: - { - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 240, 240, 176, 176, 176, 176, 176, 176, - 176, 176, 0, 0, 0, 0, 0, 0, - 0, 160, 160, 160, 160, 160, 160, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 0, 0, 0, 0, 32, - 0, 160, 160, 160, 160, 160, 160, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 0, 0, 0, 0, 0, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - }; - YYDEBUG(777, *YYCURSOR); - YYFILL(2); - yych = *YYCURSOR; - if (yych <= '0') { - if (yych <= ' ') { - if (yych <= '\f') { - if (yych <= 0x08) goto yy779; - if (yych <= '\n') goto yy781; - } else { - if (yych <= '\r') goto yy781; - if (yych >= ' ') goto yy781; - } - } else { - if (yych <= '$') { - if (yych <= '"') goto yy783; - if (yych <= '#') goto yy781; - goto yy785; - } else { - if (yych == '\'') goto yy781; - if (yych <= '/') goto yy783; - goto yy786; - } - } - } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych <= '9') goto yy788; - if (yych <= '@') goto yy783; - goto yy790; - } else { - if (yych <= '[') goto yy783; - if (yych <= '\\') goto yy781; - goto yy793; - } - } else { - if (yych <= '`') { - if (yych == '_') goto yy790; - goto yy783; - } else { - if (yych <= 'z') goto yy790; - if (yych <= '~') goto yy783; - if (yych >= 0x80) goto yy790; - } - } - } -yy779: - YYDEBUG(779, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(780, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2862 "Zend/zend_language_scanner.l" - { - if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); - } - - if (!SCNG(heredoc_scan_ahead)) { - zend_error(E_COMPILE_WARNING, "Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE); - } - if (PARSER_MODE()) { - goto restart; - } else { - RETURN_TOKEN(T_BAD_CHARACTER); - } -} -#line 7857 "Zend/zend_language_scanner.c" -yy781: - YYDEBUG(781, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(782, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2136 "Zend/zend_language_scanner.l" - { - /* Invalid rule to return a more explicit parse error with proper line number */ - yyless(0); - yy_pop_state(); - ZVAL_NULL(zendlval); - RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); -} -#line 7871 "Zend/zend_language_scanner.c" -yy783: - YYDEBUG(783, *YYCURSOR); - ++YYCURSOR; -yy784: - YYDEBUG(784, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2131 "Zend/zend_language_scanner.l" - { - /* Only '[' or '-' can be valid, but returning other tokens will allow a more explicit parse error */ - RETURN_TOKEN(yytext[0]); -} -#line 7883 "Zend/zend_language_scanner.c" -yy785: - YYDEBUG(785, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '_') { - if (yych <= '@') goto yy784; - if (yych <= 'Z') goto yy795; - if (yych <= '^') goto yy784; - goto yy795; - } else { - if (yych <= '`') goto yy784; - if (yych <= 'z') goto yy795; - if (yych <= 0x7F) goto yy784; - goto yy795; - } -yy786: - YYDEBUG(786, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= 'A') { - if (yych <= '/') goto yy787; - if (yych <= '9') goto yy798; - } else { - if (yych <= 'B') goto yy801; - if (yych >= 'X') goto yy803; - } - } else { - if (yych <= 'a') { - if (yych == '_') goto yy804; - } else { - if (yych <= 'b') goto yy801; - if (yych == 'x') goto yy803; - } - } -yy787: - YYDEBUG(787, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1924 "Zend/zend_language_scanner.l" - { /* Offset could be treated as a long */ - if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) { - char *end; - errno = 0; - ZVAL_LONG(zendlval, ZEND_STRTOL(yytext, &end, 10)); - if (errno == ERANGE) { - goto string; - } - ZEND_ASSERT(end == yytext + yyleng); - } else { -string: - ZVAL_STRINGL(zendlval, yytext, yyleng); - } - RETURN_TOKEN_WITH_VAL(T_NUM_STRING); -} -#line 7937 "Zend/zend_language_scanner.c" -yy788: - YYDEBUG(788, *YYCURSOR); - yyaccept = 0; - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(789, *YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy788; - } - if (yych == '_') goto yy804; - goto yy787; -yy790: - YYDEBUG(790, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(791, *YYCURSOR); - if (yybm[0+yych] & 32) { - goto yy790; - } - YYDEBUG(792, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2144 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN_WITH_STR(T_STRING, 0); -} -#line 7965 "Zend/zend_language_scanner.c" -yy793: - YYDEBUG(793, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(794, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2126 "Zend/zend_language_scanner.l" - { - yy_pop_state(); - RETURN_TOKEN(']'); -} -#line 7976 "Zend/zend_language_scanner.c" -yy795: - YYDEBUG(795, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(796, *YYCURSOR); - if (yych <= '^') { - if (yych <= '9') { - if (yych >= '0') goto yy795; - } else { - if (yych <= '@') goto yy797; - if (yych <= 'Z') goto yy795; - } - } else { - if (yych <= '`') { - if (yych <= '_') goto yy795; - } else { - if (yych <= 'z') goto yy795; - if (yych >= 0x80) goto yy795; - } - } -yy797: - YYDEBUG(797, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2122 "Zend/zend_language_scanner.l" - { - RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); -} -#line 8005 "Zend/zend_language_scanner.c" -yy798: - YYDEBUG(798, *YYCURSOR); - yyaccept = 1; - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(799, *YYCURSOR); - if (yych <= '/') goto yy800; - if (yych <= '9') goto yy798; - if (yych == '_') goto yy804; -yy800: - YYDEBUG(800, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 1940 "Zend/zend_language_scanner.l" - { /* Offset must be treated as a string */ - if (yyleng == 1) { - ZVAL_INTERNED_STR(zendlval, ZSTR_CHAR((zend_uchar)*(yytext))); - } else { - ZVAL_STRINGL(zendlval, yytext, yyleng); - } - RETURN_TOKEN_WITH_VAL(T_NUM_STRING); -} -#line 8028 "Zend/zend_language_scanner.c" -yy801: - YYDEBUG(801, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 64) { - goto yy805; - } -yy802: - YYDEBUG(802, *YYCURSOR); - YYCURSOR = YYMARKER; - if (yyaccept == 0) { - goto yy787; - } else { - goto yy800; - } -yy803: - YYDEBUG(803, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy807; - } - goto yy802; -yy804: - YYDEBUG(804, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych <= '/') goto yy802; - if (yych <= '9') goto yy798; - goto yy802; -yy805: - YYDEBUG(805, *YYCURSOR); - yyaccept = 1; - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(806, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy805; - } - if (yych == '_') goto yy801; - goto yy800; -yy807: - YYDEBUG(807, *YYCURSOR); - yyaccept = 1; - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(808, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy807; - } - if (yych == '_') goto yy803; - goto yy800; - } -/* *********************************** */ -yyc_SHEBANG: - { - static const unsigned char yybm[] = { - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - }; - YYDEBUG(809, *YYCURSOR); - YYFILL(2); - yych = *YYCURSOR; - if (yych == '#') goto yy813; - YYDEBUG(811, *YYCURSOR); - ++YYCURSOR; -yy812: - YYDEBUG(812, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2007 "Zend/zend_language_scanner.l" - { - yyless(0); - BEGIN(INITIAL); - goto restart; -} -#line 8139 "Zend/zend_language_scanner.c" -yy813: - YYDEBUG(813, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '!') goto yy812; -yy814: - YYDEBUG(814, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(815, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy814; - } - YYDEBUG(816, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(817, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2001 "Zend/zend_language_scanner.l" - { - CG(zend_lineno)++; - BEGIN(INITIAL); - goto restart; -} -#line 8163 "Zend/zend_language_scanner.c" - } -/* *********************************** */ -yyc_INITIAL: - YYDEBUG(818, *YYCURSOR); - YYFILL(7); - yych = *YYCURSOR; - if (yych == '<') goto yy822; - YYDEBUG(820, *YYCURSOR); - ++YYCURSOR; -yy821: - YYDEBUG(821, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2052 "Zend/zend_language_scanner.l" - { - if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); - } - -inline_char_handler: - - while (1) { - YYCTYPE *ptr = memchr(YYCURSOR, '<', YYLIMIT - YYCURSOR); - - YYCURSOR = ptr ? ptr + 1 : YYLIMIT; - - if (YYCURSOR >= YYLIMIT) { - break; - } - - if (*YYCURSOR == '?') { - if (CG(short_tags) /* indentation + heredoc_label->length; - YYCURSOR += yyleng - 1; - - heredoc_label_dtor(heredoc_label); - efree(heredoc_label); - - BEGIN(ST_IN_SCRIPTING); - RETURN_TOKEN(T_END_HEREDOC); -} -#line 8351 "Zend/zend_language_scanner.c" -/* *********************************** */ -yyc_ST_NOWDOC: - YYDEBUG(839, *YYCURSOR); - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(841, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(842, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 2771 "Zend/zend_language_scanner.l" - { - zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack)); - int newline = 0, indentation = 0, spacing = -1; - - if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); - } - - YYCURSOR--; - - while (YYCURSOR < YYLIMIT) { - switch (*YYCURSOR++) { - case '\r': - if (*YYCURSOR == '\n') { - YYCURSOR++; - } - /* fall through */ - case '\n': - indentation = spacing = 0; - - while (YYCURSOR < YYLIMIT && (*YYCURSOR == ' ' || *YYCURSOR == '\t')) { - if (*YYCURSOR == '\t') { - spacing |= HEREDOC_USING_TABS; - } else { - spacing |= HEREDOC_USING_SPACES; - } - ++YYCURSOR; - ++indentation; - } - - if (YYCURSOR == YYLIMIT) { - yyleng = YYCURSOR - SCNG(yy_text); - HANDLE_NEWLINES(yytext, yyleng); - ZVAL_NULL(zendlval); - RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); - } - - /* Check for ending label on the next line */ - if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) { - if (IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) { - continue; - } - - if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) { - zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0); - if (PARSER_MODE()) { - RETURN_TOKEN(T_ERROR); - } - } - - /* newline before label will be subtracted from returned text, but - * yyleng/yytext will include it, for zend_highlight/strip, tokenizer, etc. */ - if (YYCURSOR[-indentation - 2] == '\r' && YYCURSOR[-indentation - 1] == '\n') { - newline = 2; /* Windows newline */ - } else { - newline = 1; - } - - CG(increment_lineno) = 1; /* For newline before label */ - - YYCURSOR -= indentation; - heredoc_label->indentation = indentation; - - BEGIN(ST_END_HEREDOC); - - goto nowdoc_scan_done; - } - /* fall through */ - default: - continue; - } - } - -nowdoc_scan_done: - yyleng = YYCURSOR - SCNG(yy_text); - ZVAL_STRINGL(zendlval, yytext, yyleng - newline); - - if (!EG(exception) && spacing != -1 && PARSER_MODE()) { - zend_bool newline_at_start = *(yytext - 1) == '\n' || *(yytext - 1) == '\r'; - if (!strip_multiline_string_indentation( - zendlval, indentation, spacing == HEREDOC_USING_SPACES, - newline_at_start, newline != 0)) { - RETURN_TOKEN(T_ERROR); - } - } - - HANDLE_NEWLINES(yytext, yyleng - newline); - RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); -} -#line 8451 "Zend/zend_language_scanner.c" -} -#line 2877 "Zend/zend_language_scanner.l" - - -emit_token_with_str: - zend_copy_value(zendlval, (yytext + offset), (yyleng - offset)); - -emit_token_with_val: - if (PARSER_MODE()) { - ZEND_ASSERT(Z_TYPE_P(zendlval) != IS_UNDEF); - elem->ast = zend_ast_create_zval_with_lineno(zendlval, start_line); - } - -emit_token: - if (SCNG(on_event)) { - SCNG(on_event)(ON_TOKEN, token, start_line, SCNG(on_event_context)); - } - return token; - -return_whitespace: - HANDLE_NEWLINES(yytext, yyleng); - if (SCNG(on_event)) { - SCNG(on_event)(ON_TOKEN, T_WHITESPACE, start_line, SCNG(on_event_context)); - } - if (PARSER_MODE()) { - start_line = CG(zend_lineno); - goto restart; - } else { - return T_WHITESPACE; - } - -skip_token: - if (SCNG(on_event)) { - SCNG(on_event)(ON_TOKEN, token, start_line, SCNG(on_event_context)); - } - start_line = CG(zend_lineno); - goto restart; -} From 531ea6d3401d9f37899569a5c3e2ddff40ee880c Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Fri, 28 Feb 2020 17:35:54 +0100 Subject: [PATCH 125/201] Add upgrading note regarding merge of RFC for new DOMParentNode/DOMChildNode APIs. --- UPGRADING | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UPGRADING b/UPGRADING index 133747d28f58a..07d7f86f7c4a9 100644 --- a/UPGRADING +++ b/UPGRADING @@ -415,6 +415,10 @@ PHP 8.0 UPGRADE NOTES . Added DateTime::createFromInterface() and DateTimeImmutable::createFromInterface(). +- dom: + . Introduce DOMParentNode and DOMChildNode with new traversal and manipulation APIs + RFC: https://wiki.php.net/rfc/dom_living_standard_api + ======================================== 3. Changes in SAPI modules ======================================== From 118b04bd6e6fc5d09e3de9eb4ece30f22e49daf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 22 Feb 2020 11:06:17 +0100 Subject: [PATCH 126/201] Improve argument error messages in ext/sodium Closes GH-5197 --- Zend/zend.c | 7 +- ext/sodium/libsodium.c | 375 ++++++++++-------------------- ext/sodium/libsodium.stub.php | 2 +- ext/sodium/libsodium_arginfo.h | 5 +- ext/sodium/tests/crypto_auth.phpt | 2 +- ext/sodium/tests/crypto_box.phpt | 2 +- 6 files changed, 132 insertions(+), 261 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index 9f3c05f973248..10d1b578e1ae0 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1528,12 +1528,7 @@ ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const c va_list va; char *message = NULL; - if (exception_ce) { - if (!instanceof_function(exception_ce, zend_ce_error)) { - zend_error(E_NOTICE, "Error exceptions must be derived from Error"); - exception_ce = zend_ce_error; - } - } else { + if (!exception_ce) { exception_ce = zend_ce_error; } diff --git a/ext/sodium/libsodium.c b/ext/sodium/libsodium.c index 02a3537b27c4a..1c86c73ee31a3 100644 --- a/ext/sodium/libsodium.c +++ b/ext/sodium/libsodium.c @@ -558,7 +558,7 @@ PHP_FUNCTION(sodium_add) val = (unsigned char *) Z_STRVAL(*val_zv); val_len = Z_STRLEN(*val_zv); if (val_len != addv_len) { - zend_throw_exception(sodium_exception_ce, "values must have the same length", 0); + zend_argument_error(sodium_exception_ce, 1, "and argument #2 ($string_2) must have the same length"); RETURN_THROWS(); } sodium_add(val, addv, val_len); @@ -578,7 +578,7 @@ PHP_FUNCTION(sodium_memcmp) RETURN_THROWS(); } if (len1 != len2) { - zend_throw_exception(sodium_exception_ce, "arguments have different sizes", 0); + zend_argument_error(sodium_exception_ce, 1, "and argument #2 ($string_2) must have the same length"); RETURN_THROWS(); } RETURN_LONG(sodium_memcmp(buf1, buf2, len1)); @@ -599,9 +599,7 @@ PHP_FUNCTION(sodium_crypto_shorthash) RETURN_THROWS(); } if (key_len != crypto_shorthash_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "key size should be SODIUM_CRYPTO_SHORTHASH_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SHORTHASH_KEYBYTES bytes long"); RETURN_THROWS(); } hash = zend_string_alloc(crypto_shorthash_BYTES, 0); @@ -634,15 +632,11 @@ PHP_FUNCTION(sodium_crypto_secretbox) RETURN_THROWS(); } if (nonce_len != crypto_secretbox_NONCEBYTES) { - zend_throw_exception(sodium_exception_ce, - "nonce size should be SODIUM_CRYPTO_SECRETBOX_NONCEBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SECRETBOX_NONCEBYTES bytes long"); RETURN_THROWS(); } if (key_len != crypto_secretbox_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "key size should be SODIUM_CRYPTO_SECRETBOX_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_SECRETBOX_KEYBYTES bytes long"); RETURN_THROWS(); } if (SIZE_MAX - msg_len <= crypto_secretbox_MACBYTES) { @@ -680,15 +674,11 @@ PHP_FUNCTION(sodium_crypto_secretbox_open) RETURN_THROWS(); } if (nonce_len != crypto_secretbox_NONCEBYTES) { - zend_throw_exception(sodium_exception_ce, - "nonce size should be SODIUM_CRYPTO_SECRETBOX_NONCEBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SECRETBOX_NONCEBYTES bytes long"); RETURN_THROWS(); } if (key_len != crypto_secretbox_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "key size should be SODIUM_CRYPTO_SECRETBOX_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_SECRETBOX_KEYBYTES bytes long"); RETURN_THROWS(); } if (ciphertext_len < crypto_secretbox_MACBYTES) { @@ -803,7 +793,7 @@ PHP_FUNCTION(sodium_crypto_generichash_update) } ZVAL_DEREF(state_zv); if (Z_TYPE_P(state_zv) != IS_STRING) { - zend_throw_exception(sodium_exception_ce, "a reference to a state is required", 0); + zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); RETURN_THROWS(); } sodium_separate_string(state_zv); @@ -842,7 +832,7 @@ PHP_FUNCTION(sodium_crypto_generichash_final) } ZVAL_DEREF(state_zv); if (Z_TYPE_P(state_zv) != IS_STRING) { - zend_throw_exception(sodium_exception_ce, "a reference to a state is required", 0); + zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); RETURN_THROWS(); } sodium_separate_string(state_zv); @@ -910,9 +900,7 @@ PHP_FUNCTION(sodium_crypto_box_seed_keypair) RETURN_THROWS(); } if (seed_len != crypto_box_SEEDBYTES) { - zend_throw_exception(sodium_exception_ce, - "seed should be SODIUM_CRYPTO_BOX_SEEDBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_SEEDBYTES bytes long"); RETURN_THROWS(); } keypair_len = crypto_box_SECRETKEYBYTES + crypto_box_PUBLICKEYBYTES; @@ -946,15 +934,11 @@ PHP_FUNCTION(sodium_crypto_box_keypair_from_secretkey_and_publickey) RETURN_THROWS(); } if (secretkey_len != crypto_box_SECRETKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secretkey should be SODIUM_CRYPTO_BOX_SECRETKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_SECRETKEYBYTES bytes long"); RETURN_THROWS(); } if (publickey_len != crypto_box_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "publickey should be SODIUM_CRYPTO_BOX_PUBLICKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_PUBLICKEYBYTES bytes long"); RETURN_THROWS(); } keypair_len = crypto_box_SECRETKEYBYTES + crypto_box_PUBLICKEYBYTES; @@ -980,9 +964,7 @@ PHP_FUNCTION(sodium_crypto_box_secretkey) } if (keypair_len != crypto_box_SECRETKEYBYTES + crypto_box_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "keypair should be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } secretkey = zend_string_alloc(crypto_box_SECRETKEYBYTES, 0); @@ -1005,9 +987,7 @@ PHP_FUNCTION(sodium_crypto_box_publickey) } if (keypair_len != crypto_box_SECRETKEYBYTES + crypto_box_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "keypair should be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } publickey = zend_string_alloc(crypto_box_PUBLICKEYBYTES, 0); @@ -1030,9 +1010,7 @@ PHP_FUNCTION(sodium_crypto_box_publickey_from_secretkey) RETURN_THROWS(); } if (secretkey_len != crypto_box_SECRETKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "key should be SODIUM_CRYPTO_BOX_SECRETKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_SECRETKEYBYTES bytes long"); RETURN_THROWS(); } publickey = zend_string_alloc(crypto_box_PUBLICKEYBYTES, 0); @@ -1066,15 +1044,11 @@ PHP_FUNCTION(sodium_crypto_box) RETURN_THROWS(); } if (nonce_len != crypto_box_NONCEBYTES) { - zend_throw_exception(sodium_exception_ce, - "nonce size should be SODIUM_CRYPTO_BOX_NONCEBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_NONCEBYTES bytes long"); RETURN_THROWS(); } if (keypair_len != crypto_box_SECRETKEYBYTES + crypto_box_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "keypair size should be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } secretkey = keypair; @@ -1116,15 +1090,11 @@ PHP_FUNCTION(sodium_crypto_box_open) RETURN_THROWS(); } if (nonce_len != crypto_box_NONCEBYTES) { - zend_throw_exception(sodium_exception_ce, - "nonce size should be SODIUM_CRYPTO_BOX_NONCEBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_NONCEBYTES bytes long"); RETURN_THROWS(); } if (keypair_len != crypto_box_SECRETKEYBYTES + crypto_box_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "keypair size should be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } secretkey = keypair; @@ -1159,9 +1129,7 @@ PHP_FUNCTION(sodium_crypto_box_seal) RETURN_THROWS(); } if (publickey_len != crypto_box_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "public key size should be SODIUM_CRYPTO_BOX_PUBLICKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_PUBLICKEYBYTES bytes long"); RETURN_THROWS(); } if (SIZE_MAX - msg_len <= crypto_box_SEALBYTES) { @@ -1197,9 +1165,7 @@ PHP_FUNCTION(sodium_crypto_box_seal_open) RETURN_THROWS(); } if (keypair_len != crypto_box_SECRETKEYBYTES + crypto_box_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "keypair size should be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } secretkey = keypair; @@ -1254,9 +1220,7 @@ PHP_FUNCTION(sodium_crypto_sign_seed_keypair) RETURN_THROWS(); } if (seed_len != crypto_sign_SEEDBYTES) { - zend_throw_exception(sodium_exception_ce, - "seed should be SODIUM_CRYPTO_SIGN_SEEDBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_SEEDBYTES bytes long"); RETURN_THROWS(); } keypair_len = crypto_sign_SECRETKEYBYTES + crypto_sign_PUBLICKEYBYTES; @@ -1290,15 +1254,11 @@ PHP_FUNCTION(sodium_crypto_sign_keypair_from_secretkey_and_publickey) RETURN_THROWS(); } if (secretkey_len != crypto_sign_SECRETKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secretkey should be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"); RETURN_THROWS(); } if (publickey_len != crypto_sign_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "publickey should be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes long"); RETURN_THROWS(); } keypair_len = crypto_sign_SECRETKEYBYTES + crypto_sign_PUBLICKEYBYTES; @@ -1323,9 +1283,7 @@ PHP_FUNCTION(sodium_crypto_sign_publickey_from_secretkey) RETURN_THROWS(); } if (secretkey_len != crypto_sign_SECRETKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secretkey should be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"); RETURN_THROWS(); } publickey = zend_string_alloc(crypto_sign_PUBLICKEYBYTES, 0); @@ -1354,9 +1312,7 @@ PHP_FUNCTION(sodium_crypto_sign_secretkey) } if (keypair_len != crypto_sign_SECRETKEYBYTES + crypto_sign_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "keypair should be SODIUM_CRYPTO_SIGN_KEYPAIRBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } secretkey = zend_string_alloc(crypto_sign_SECRETKEYBYTES, 0); @@ -1379,9 +1335,7 @@ PHP_FUNCTION(sodium_crypto_sign_publickey) } if (keypair_len != crypto_sign_SECRETKEYBYTES + crypto_sign_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "keypair should be SODIUM_CRYPTO_SIGN_KEYPAIRBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } publickey = zend_string_alloc(crypto_sign_PUBLICKEYBYTES, 0); @@ -1409,9 +1363,7 @@ PHP_FUNCTION(sodium_crypto_sign) RETURN_THROWS(); } if (secretkey_len != crypto_sign_SECRETKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"); RETURN_THROWS(); } if (SIZE_MAX - msg_len <= crypto_sign_BYTES) { @@ -1455,9 +1407,7 @@ PHP_FUNCTION(sodium_crypto_sign_open) RETURN_THROWS(); } if (publickey_len != crypto_sign_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "public key size should be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes long"); RETURN_THROWS(); } msg_len = msg_signed_len; @@ -1499,9 +1449,7 @@ PHP_FUNCTION(sodium_crypto_sign_detached) RETURN_THROWS(); } if (secretkey_len != crypto_sign_SECRETKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"); RETURN_THROWS(); } signature = zend_string_alloc((size_t) crypto_sign_BYTES, 0); @@ -1541,15 +1489,11 @@ PHP_FUNCTION(sodium_crypto_sign_verify_detached) RETURN_THROWS(); } if (signature_len != crypto_sign_BYTES) { - zend_throw_exception(sodium_exception_ce, - "signature size should be SODIUM_CRYPTO_SIGN_BYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_BYTES bytes long"); RETURN_THROWS(); } if (publickey_len != crypto_sign_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "public key size should be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes long"); RETURN_THROWS(); } if (crypto_sign_verify_detached(signature, @@ -1577,15 +1521,15 @@ PHP_FUNCTION(sodium_crypto_stream) RETURN_THROWS(); } if (ciphertext_len <= 0 || ciphertext_len >= SIZE_MAX) { - zend_throw_exception(sodium_exception_ce, "ciphertext length must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 1, "must be greater than 0"); RETURN_THROWS(); } if (nonce_len != crypto_stream_NONCEBYTES) { - zend_throw_exception(sodium_exception_ce, "nonce should be SODIUM_CRYPTO_STREAM_NONCEBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_STREAM_NONCEBYTES bytes long"); RETURN_THROWS(); } if (key_len != crypto_stream_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, "key should be SODIUM_CRYPTO_STREAM_KEYBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_STREAM_KEYBYTES bytes long"); RETURN_THROWS(); } ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); @@ -1619,11 +1563,11 @@ PHP_FUNCTION(sodium_crypto_stream_xor) RETURN_THROWS(); } if (nonce_len != crypto_stream_NONCEBYTES) { - zend_throw_exception(sodium_exception_ce, "nonce should be SODIUM_CRYPTO_STREAM_NONCEBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_STREAM_NONCEBYTES bytes long"); RETURN_THROWS(); } if (key_len != crypto_stream_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, "key should be SODIUM_CRYPTO_STREAM_KEYBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_STREAM_KEYBYTES bytes long"); RETURN_THROWS(); } ciphertext_len = msg_len; @@ -1662,20 +1606,24 @@ PHP_FUNCTION(sodium_crypto_pwhash) sodium_remove_param_values_from_backtrace(EG(exception)); RETURN_THROWS(); } - if (hash_len <= 0 || hash_len >= 0xffffffff) { - zend_throw_exception(sodium_exception_ce, "hash length must be greater than 0", 0); + if (hash_len <= 0) { + zend_argument_error(sodium_exception_ce, 1, "must be greater than 0"); + RETURN_THROWS(); + } + if (hash_len >= 0xffffffff) { + zend_argument_error(sodium_exception_ce, 1, "is too large"); RETURN_THROWS(); } if (passwd_len >= 0xffffffff) { - zend_throw_exception(sodium_exception_ce, "unsupported password length", 0); + zend_argument_error(sodium_exception_ce, 2, "is too long"); RETURN_THROWS(); } if (opslimit <= 0) { - zend_throw_exception(sodium_exception_ce, "ops limit must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 4, "must be greater than 0"); RETURN_THROWS(); } if (memlimit <= 0 || memlimit > SIZE_MAX) { - zend_throw_exception(sodium_exception_ce, "memory limit must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 5, "must be greater than 0"); RETURN_THROWS(); } if (alg != crypto_pwhash_ALG_ARGON2I13 @@ -1690,17 +1638,15 @@ PHP_FUNCTION(sodium_crypto_pwhash) zend_error(E_WARNING, "empty password"); } if (salt_len != crypto_pwhash_SALTBYTES) { - zend_throw_exception(sodium_exception_ce, "salt should be SODIUM_CRYPTO_PWHASH_SALTBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_PWHASH_SALTBYTES bytes long"); RETURN_THROWS(); } if (opslimit < crypto_pwhash_OPSLIMIT_MIN) { - zend_throw_exception(sodium_exception_ce, - "number of operations for the password hashing function is too low", 0); + zend_argument_error(sodium_exception_ce, 4, "must be greater than or equal to %d", crypto_pwhash_OPSLIMIT_MIN); RETURN_THROWS(); } if (memlimit < crypto_pwhash_MEMLIMIT_MIN) { - zend_throw_exception(sodium_exception_ce, - "maximum memory for the password hashing function is too low", 0); + zend_argument_error(sodium_exception_ce, 5, "must be greater than or equal to %d", crypto_pwhash_MEMLIMIT_MIN); } hash = zend_string_alloc((size_t) hash_len, 0); ret = -1; @@ -1744,27 +1690,25 @@ PHP_FUNCTION(sodium_crypto_pwhash_str) RETURN_THROWS(); } if (opslimit <= 0) { - zend_throw_exception(sodium_exception_ce, "ops limit must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 2, "must be greater than 0"); RETURN_THROWS(); } if (memlimit <= 0 || memlimit > SIZE_MAX) { - zend_throw_exception(sodium_exception_ce, "memory limit must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 3, "must be greater than 0"); RETURN_THROWS(); } if (passwd_len >= 0xffffffff) { - zend_throw_exception(sodium_exception_ce, "unsupported password length", 0); + zend_argument_error(sodium_exception_ce, 1, "is too long"); RETURN_THROWS(); } if (passwd_len <= 0) { zend_error(E_WARNING, "empty password"); } if (opslimit < crypto_pwhash_OPSLIMIT_MIN) { - zend_throw_exception(sodium_exception_ce, - "number of operations for the password hashing function is too low", 0); + zend_argument_error(sodium_exception_ce, 2, "must be greater than or equal to %d", crypto_pwhash_OPSLIMIT_MIN); } if (memlimit < crypto_pwhash_MEMLIMIT_MIN) { - zend_throw_exception(sodium_exception_ce, - "maximum memory for the password hashing function is too low", 0); + zend_argument_error(sodium_exception_ce, 3, "must be greater than or equal to %d", crypto_pwhash_MEMLIMIT_MIN); } hash_str = zend_string_alloc(crypto_pwhash_STRBYTES - 1, 0); if (crypto_pwhash_str @@ -1792,7 +1736,6 @@ PHP_FUNCTION(sodium_crypto_pwhash_str_needs_rehash) if (zend_parse_parameters(ZEND_NUM_ARGS(), "sll", &hash_str, &hash_str_len, &opslimit, &memlimit) == FAILURE) { - zend_throw_exception(sodium_exception_ce, "a PHP string is required", 0); RETURN_THROWS(); } if (crypto_pwhash_str_needs_rehash(hash_str, opslimit, memlimit) == 0) { @@ -1816,8 +1759,7 @@ PHP_FUNCTION(sodium_crypto_pwhash_str_verify) RETURN_THROWS(); } if (passwd_len >= 0xffffffff) { - zend_throw_exception(sodium_exception_ce, - "unsupported password length", 0); + zend_argument_error(sodium_exception_ce, 2, "is too long"); RETURN_THROWS(); } if (passwd_len <= 0) { @@ -1852,33 +1794,29 @@ PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256) RETURN_THROWS(); } if (hash_len <= 0 || hash_len >= SIZE_MAX || hash_len > 0x1fffffffe0ULL) { - zend_throw_exception(sodium_exception_ce, "hash length must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 1, "must be greater than 0"); RETURN_THROWS(); } if (opslimit <= 0) { - zend_throw_exception(sodium_exception_ce, "ops limit must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 4, "must be greater than 0"); RETURN_THROWS(); } if (memlimit <= 0 || memlimit > SIZE_MAX) { - zend_throw_exception(sodium_exception_ce, "memory limit must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 5, "must be greater than 0"); RETURN_THROWS(); } if (passwd_len <= 0) { zend_error(E_WARNING, "empty password"); } if (salt_len != crypto_pwhash_scryptsalsa208sha256_SALTBYTES) { - zend_throw_exception(sodium_exception_ce, - "salt should be SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES bytes long"); RETURN_THROWS(); } if (opslimit < crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE) { - zend_throw_exception(sodium_exception_ce, - "number of operations for the scrypt function is too low", 0); + zend_argument_error(sodium_exception_ce, 4, "must be greater than or equal to %d", crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE); } if (memlimit < crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE) { - zend_throw_exception(sodium_exception_ce, - "maximum memory for the scrypt function is too low", 0); + zend_argument_error(sodium_exception_ce, 5, "must be greater than or equal to %d", crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE); } hash = zend_string_alloc((size_t) hash_len, 0); if (crypto_pwhash_scryptsalsa208sha256 @@ -1909,23 +1847,21 @@ PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str) RETURN_THROWS(); } if (opslimit <= 0) { - zend_throw_exception(sodium_exception_ce, "ops limit must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 2, "must be greater than 0"); RETURN_THROWS(); } if (memlimit <= 0 || memlimit > SIZE_MAX) { - zend_throw_exception(sodium_exception_ce, "memory limit must be greater than 0", 0); + zend_argument_error(sodium_exception_ce, 3, "must be greater than 0"); RETURN_THROWS(); } if (passwd_len <= 0) { zend_error(E_WARNING, "empty password"); } if (opslimit < crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE) { - zend_throw_exception(sodium_exception_ce, - "number of operations for the scrypt function is too low", 0); + zend_argument_error(sodium_exception_ce, 2, "must be greater than or equal to %d", crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE); } if (memlimit < crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE) { - zend_throw_exception(sodium_exception_ce, - "maximum memory for the scrypt function is too low", 0); + zend_argument_error(sodium_exception_ce, 3, "must be greater than or equal to %d", crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE); } hash_str = zend_string_alloc (crypto_pwhash_scryptsalsa208sha256_STRBYTES - 1, 0); @@ -2005,17 +1941,11 @@ PHP_FUNCTION(sodium_crypto_aead_aes256gcm_encrypt) RETURN_THROWS(); } if (npub_len != crypto_aead_aes256gcm_NPUBBYTES) { - zend_throw_exception(sodium_exception_ce, - "public nonce size should be " - "SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES bytes long"); RETURN_THROWS(); } if (secretkey_len != crypto_aead_aes256gcm_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be " - "SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES bytes long"); RETURN_THROWS(); } if (SIZE_MAX - msg_len <= crypto_aead_aes256gcm_ABYTES) { @@ -2071,24 +2001,18 @@ PHP_FUNCTION(sodium_crypto_aead_aes256gcm_decrypt) RETURN_THROWS(); } if (npub_len != crypto_aead_aes256gcm_NPUBBYTES) { - zend_throw_exception(sodium_exception_ce, - "public nonce size should be " - "SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES bytes long"); RETURN_THROWS(); } if (secretkey_len != crypto_aead_aes256gcm_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be " - "SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES bytes long"); RETURN_THROWS(); } if (ciphertext_len < crypto_aead_aes256gcm_ABYTES) { RETURN_FALSE; } if (ciphertext_len - crypto_aead_aes256gcm_ABYTES > 16ULL * ((1ULL << 32) - 2ULL)) { - zend_throw_exception(sodium_exception_ce, "message too long for a single key", 0); + zend_argument_error(sodium_exception_ce, 1, "is too long"); RETURN_THROWS(); } msg_len = ciphertext_len; @@ -2139,17 +2063,11 @@ PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_encrypt) RETURN_THROWS(); } if (npub_len != crypto_aead_chacha20poly1305_NPUBBYTES) { - zend_throw_exception(sodium_exception_ce, - "public nonce size should be " - "SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES bytes long"); RETURN_THROWS(); } if (secretkey_len != crypto_aead_chacha20poly1305_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be " - "SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES bytes long"); RETURN_THROWS(); } if (SIZE_MAX - msg_len <= crypto_aead_chacha20poly1305_ABYTES) { @@ -2201,17 +2119,11 @@ PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_decrypt) RETURN_THROWS(); } if (npub_len != crypto_aead_chacha20poly1305_NPUBBYTES) { - zend_throw_exception(sodium_exception_ce, - "public nonce size should be " - "SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES bytes long"); RETURN_THROWS(); } if (secretkey_len != crypto_aead_chacha20poly1305_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be " - "SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES bytes long"); RETURN_THROWS(); } if (ciphertext_len < crypto_aead_chacha20poly1305_ABYTES) { @@ -2264,17 +2176,11 @@ PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_encrypt) RETURN_THROWS(); } if (npub_len != crypto_aead_chacha20poly1305_IETF_NPUBBYTES) { - zend_throw_exception(sodium_exception_ce, - "public nonce size should be " - "SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES bytes long"); RETURN_THROWS(); } if (secretkey_len != crypto_aead_chacha20poly1305_IETF_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be " - "SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes long"); RETURN_THROWS(); } if (SIZE_MAX - msg_len <= crypto_aead_chacha20poly1305_IETF_ABYTES) { @@ -2330,17 +2236,11 @@ PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_decrypt) RETURN_THROWS(); } if (npub_len != crypto_aead_chacha20poly1305_IETF_NPUBBYTES) { - zend_throw_exception(sodium_exception_ce, - "public nonce size should be " - "SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES bytes long"); RETURN_THROWS(); } if (secretkey_len != crypto_aead_chacha20poly1305_IETF_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be " - "SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes long"); RETURN_THROWS(); } msg_len = ciphertext_len; @@ -2399,17 +2299,11 @@ PHP_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt) RETURN_THROWS(); } if (npub_len != crypto_aead_xchacha20poly1305_IETF_NPUBBYTES) { - zend_throw_exception(sodium_exception_ce, - "public nonce size should be " - "SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes long"); RETURN_THROWS(); } if (secretkey_len != crypto_aead_xchacha20poly1305_IETF_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be " - "SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES bytes long"); RETURN_THROWS(); } if (SIZE_MAX - msg_len <= crypto_aead_xchacha20poly1305_IETF_ABYTES) { @@ -2461,17 +2355,11 @@ PHP_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt) RETURN_THROWS(); } if (npub_len != crypto_aead_xchacha20poly1305_IETF_NPUBBYTES) { - zend_throw_exception(sodium_exception_ce, - "public nonce size should be " - "SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes long"); RETURN_THROWS(); } if (secretkey_len != crypto_aead_xchacha20poly1305_IETF_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "secret key size should be " - "SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES bytes long"); RETURN_THROWS(); } if (ciphertext_len < crypto_aead_xchacha20poly1305_IETF_ABYTES) { @@ -2554,7 +2442,7 @@ PHP_FUNCTION(sodium_hex2bin) ignore, &bin_real_len, &end) != 0 || end != hex + hex_len) { zend_string_efree(bin); - zend_throw_exception(sodium_exception_ce, "invalid hex string", 0); + zend_argument_error(sodium_exception_ce, 1, "must be a valid hexadecimal string"); RETURN_THROWS(); } if (bin_real_len >= SIZE_MAX || bin_real_len > bin_len) { @@ -2583,8 +2471,7 @@ PHP_FUNCTION(sodium_bin2base64) RETURN_THROWS(); } if ((((unsigned int) variant) & ~ 0x6U) != 0x1U) { - zend_throw_exception(sodium_exception_ce, - "invalid base64 variant identifier", 0); + zend_argument_error(sodium_exception_ce, 2, "must be a valid base64 variant identifier"); RETURN_THROWS(); } if (bin_len >= SIZE_MAX / 4U * 3U - 3U - 1U) { @@ -2617,8 +2504,7 @@ PHP_FUNCTION(sodium_base642bin) RETURN_THROWS(); } if ((((unsigned int) variant) & ~ 0x6U) != 0x1U) { - zend_throw_exception(sodium_exception_ce, - "invalid base64 variant identifier", 0); + zend_argument_error(sodium_exception_ce, 2, "must be a valid base64 variant identifier"); RETURN_THROWS(); } bin_len = b64_len / 4U * 3U + 2U; @@ -2628,7 +2514,7 @@ PHP_FUNCTION(sodium_base642bin) ignore, &bin_real_len, &end, (int) variant) != 0 || end != b64 + b64_len) { zend_string_efree(bin); - zend_throw_exception(sodium_exception_ce, "invalid base64 string", 0); + zend_argument_error(sodium_exception_ce, 1, "must be a valid base64 string"); RETURN_THROWS(); } if (bin_real_len >= SIZE_MAX || bin_real_len > bin_len) { @@ -2656,11 +2542,12 @@ PHP_FUNCTION(sodium_crypto_scalarmult) sodium_remove_param_values_from_backtrace(EG(exception)); RETURN_THROWS(); } - if (n_len != crypto_scalarmult_SCALARBYTES || - p_len != crypto_scalarmult_BYTES) { - zend_throw_exception(sodium_exception_ce, "scalar and point must be " - "SODIUM_CRYPTO_SCALARMULT_SCALARBYTES bytes", - 0); + if (n_len != crypto_scalarmult_SCALARBYTES) { + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SCALARMULT_SCALARBYTES bytes long"); + RETURN_THROWS(); + } + if (p_len != crypto_scalarmult_BYTES) { + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SCALARMULT_SCALARBYTES bytes long"); RETURN_THROWS(); } q = zend_string_alloc(crypto_scalarmult_BYTES, 0); @@ -2688,7 +2575,7 @@ PHP_FUNCTION(sodium_crypto_kx_seed_keypair) RETURN_THROWS(); } if (seed_len != crypto_kx_SEEDBYTES) { - zend_throw_exception(sodium_exception_ce, "seed must be SODIUM_CRYPTO_KX_SEEDBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_SEEDBYTES bytes long"); RETURN_THROWS(); } (void) sizeof(int[crypto_scalarmult_SCALARBYTES == crypto_kx_PUBLICKEYBYTES ? 1 : -1]); @@ -2739,9 +2626,7 @@ PHP_FUNCTION(sodium_crypto_kx_secretkey) } if (keypair_len != crypto_kx_SECRETKEYBYTES + crypto_kx_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "keypair should be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } secretkey = zend_string_alloc(crypto_kx_SECRETKEYBYTES, 0); @@ -2764,9 +2649,7 @@ PHP_FUNCTION(sodium_crypto_kx_publickey) } if (keypair_len != crypto_kx_SECRETKEYBYTES + crypto_kx_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "keypair should be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } publickey = zend_string_alloc(crypto_kx_PUBLICKEYBYTES, 0); @@ -2796,11 +2679,11 @@ PHP_FUNCTION(sodium_crypto_kx_client_session_keys) RETURN_THROWS(); } if (keypair_len != crypto_kx_SECRETKEYBYTES + crypto_kx_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, "keypair must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } if (server_pk_len != crypto_kx_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, "public keys must be SODIUM_CRYPTO_KX_PUBLICKEYBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_KX_PUBLICKEYBYTES bytes long"); RETURN_THROWS(); } client_sk = &keypair[0]; @@ -2846,11 +2729,11 @@ PHP_FUNCTION(sodium_crypto_kx_server_session_keys) RETURN_THROWS(); } if (keypair_len != crypto_kx_SECRETKEYBYTES + crypto_kx_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, "keypair must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes long"); RETURN_THROWS(); } if (client_pk_len != crypto_kx_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, "public keys must be SODIUM_CRYPTO_KX_PUBLICKEYBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_KX_PUBLICKEYBYTES bytes long"); RETURN_THROWS(); } server_sk = &keypair[0]; @@ -2892,7 +2775,7 @@ PHP_FUNCTION(sodium_crypto_auth) RETURN_THROWS(); } if (key_len != crypto_auth_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, "key must be SODIUM_CRYPTO_AUTH_KEYBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_AUTH_KEYBYTES bytes long"); RETURN_THROWS(); } mac = zend_string_alloc(crypto_auth_BYTES, 0); @@ -2924,11 +2807,11 @@ PHP_FUNCTION(sodium_crypto_auth_verify) RETURN_THROWS(); } if (key_len != crypto_auth_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, "key must be SODIUM_CRYPTO_AUTH_KEYBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AUTH_KEYBYTES bytes long"); RETURN_THROWS(); } if (mac_len != crypto_auth_BYTES) { - zend_throw_exception(sodium_exception_ce, "authentication tag must be SODIUM_CRYPTO_AUTH_BYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_AUTH_BYTES bytes long"); RETURN_THROWS(); } if (crypto_auth_verify((const unsigned char *) mac, @@ -2951,9 +2834,7 @@ PHP_FUNCTION(sodium_crypto_sign_ed25519_sk_to_curve25519) RETURN_THROWS(); } if (eddsakey_len != crypto_sign_SECRETKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "Ed25519 key should be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"); RETURN_THROWS(); } ecdhkey = zend_string_alloc(crypto_box_SECRETKEYBYTES, 0); @@ -2980,9 +2861,7 @@ PHP_FUNCTION(sodium_crypto_sign_ed25519_pk_to_curve25519) RETURN_THROWS(); } if (eddsakey_len != crypto_sign_PUBLICKEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "Ed25519 key should be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes long"); RETURN_THROWS(); } ecdhkey = zend_string_alloc(crypto_sign_PUBLICKEYBYTES, 0); @@ -3011,7 +2890,7 @@ PHP_FUNCTION(sodium_compare) RETURN_THROWS(); } if (len1 != len2) { - zend_throw_exception(sodium_exception_ce, "arguments have different sizes", 0); + zend_argument_error(sodium_exception_ce, 1, "and argument #2 ($string_2) must have the same length"); RETURN_THROWS(); } else { RETURN_LONG(sodium_compare((const unsigned char *) buf1, @@ -3156,23 +3035,23 @@ PHP_FUNCTION(sodium_crypto_kdf_derive_from_key) RETURN_THROWS(); } if (subkey_len < crypto_kdf_BYTES_MIN) { - zend_throw_exception(sodium_exception_ce, "subkey cannot be smaller than SODIUM_CRYPTO_KDF_BYTES_MIN", 0); + zend_argument_error(sodium_exception_ce, 1, "must be greater than or equal to SODIUM_CRYPTO_KDF_BYTES_MIN"); RETURN_THROWS(); } if (subkey_len > crypto_kdf_BYTES_MAX || subkey_len > SIZE_MAX) { - zend_throw_exception(sodium_exception_ce, "subkey cannot be larger than SODIUM_CRYPTO_KDF_BYTES_MAX", 0); + zend_argument_error(sodium_exception_ce, 1, "must be less than or equal to SODIUM_CRYPTO_KDF_BYTES_MAX"); RETURN_THROWS(); } if (subkey_id < 0) { - zend_throw_exception(sodium_exception_ce, "subkey_id cannot be negative", 0); + zend_argument_error(sodium_exception_ce, 2, "must be greater than or equal to 0"); RETURN_THROWS(); } if (ctx_len != crypto_kdf_CONTEXTBYTES) { - zend_throw_exception(sodium_exception_ce, "context should be SODIUM_CRYPTO_KDF_CONTEXTBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_KDF_CONTEXTBYTES bytes long"); RETURN_THROWS(); } if (key_len != crypto_kdf_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, "key should be SODIUM_CRYPTO_KDF_KEYBYTES bytes", 0); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_KDF_BYTES_MIN bytes long"); RETURN_THROWS(); } memcpy(ctx_padded, ctx, crypto_kdf_CONTEXTBYTES); @@ -3221,11 +3100,11 @@ PHP_FUNCTION(sodium_pad) RETURN_THROWS(); } if (blocksize <= 0) { - zend_throw_exception(sodium_exception_ce, "block size cannot be less than 1", 0); + zend_argument_error(sodium_exception_ce, 2, "must be greater than 0"); RETURN_THROWS(); } if (blocksize > SIZE_MAX) { - zend_throw_exception(sodium_exception_ce, "block size is too large", 0); + zend_argument_error(sodium_exception_ce, 2, "is too large"); RETURN_THROWS(); } xpadlen = blocksize - 1U; @@ -3294,15 +3173,15 @@ PHP_FUNCTION(sodium_unpad) RETURN_THROWS(); } if (blocksize <= 0) { - zend_throw_exception(sodium_exception_ce, "block size cannot be less than 1", 0); + zend_argument_error(sodium_exception_ce, 2, "must be greater than 0"); RETURN_THROWS(); } if (blocksize > SIZE_MAX) { - zend_throw_exception(sodium_exception_ce, "block size is too large", 0); + zend_argument_error(sodium_exception_ce, 2, "is too large"); RETURN_THROWS(); } if (padded_len < blocksize) { - zend_throw_exception(sodium_exception_ce, "invalid padding", 0); + zend_argument_error(sodium_exception_ce, 1, "must not be shorter than the block size"); RETURN_THROWS(); } @@ -3368,9 +3247,7 @@ PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_push) RETURN_THROWS(); } if (key_len != crypto_secretstream_xchacha20poly1305_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "key size should be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES bytes long"); RETURN_THROWS(); } if (crypto_secretstream_xchacha20poly1305_init_push(&state, @@ -3405,23 +3282,23 @@ PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_push) } ZVAL_DEREF(state_zv); if (Z_TYPE_P(state_zv) != IS_STRING) { - zend_throw_exception(sodium_exception_ce, "a reference to a state is required", 0); + zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); RETURN_THROWS(); } sodium_separate_string(state_zv); state = (unsigned char *) Z_STRVAL(*state_zv); state_len = Z_STRLEN(*state_zv); if (state_len != sizeof (crypto_secretstream_xchacha20poly1305_state)) { - zend_throw_exception(sodium_exception_ce, "incorrect state length", 0); + zend_argument_error(sodium_exception_ce, 1, "must have a correct length"); RETURN_THROWS(); } if (msg_len > crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX || msg_len > SIZE_MAX - crypto_secretstream_xchacha20poly1305_ABYTES) { - zend_throw_exception(sodium_exception_ce, "message cannot be larger than SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX bytes", 0); + zend_argument_error(sodium_exception_ce, 2, "must be at most SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX bytes long"); RETURN_THROWS(); } if (tag < 0 || tag > 255) { - zend_throw_exception(sodium_exception_ce, "unsupported value for the tag", 0); + zend_argument_error(sodium_exception_ce, 4, "must be in the range of 0-255"); RETURN_THROWS(); } c_len = msg_len + crypto_secretstream_xchacha20poly1305_ABYTES; @@ -3460,15 +3337,11 @@ PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_pull) RETURN_THROWS(); } if (header_len != crypto_secretstream_xchacha20poly1305_HEADERBYTES) { - zend_throw_exception(sodium_exception_ce, - "header size should be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES bytes long"); RETURN_THROWS(); } if (key_len != crypto_secretstream_xchacha20poly1305_KEYBYTES) { - zend_throw_exception(sodium_exception_ce, - "key size should be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES bytes", - 0); + zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES bytes long"); RETURN_THROWS(); } if (crypto_secretstream_xchacha20poly1305_init_pull(&state, @@ -3501,7 +3374,7 @@ PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_pull) } ZVAL_DEREF(state_zv); if (Z_TYPE_P(state_zv) != IS_STRING) { - zend_throw_exception(sodium_exception_ce, "a reference to a state is required", 0); + zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); RETURN_THROWS(); } sodium_separate_string(state_zv); @@ -3546,7 +3419,7 @@ PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_rekey) } ZVAL_DEREF(state_zv); if (Z_TYPE_P(state_zv) != IS_STRING) { - zend_throw_exception(sodium_exception_ce, "a reference to a state is required", 0); + zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); RETURN_THROWS(); } sodium_separate_string(state_zv); diff --git a/ext/sodium/libsodium.stub.php b/ext/sodium/libsodium.stub.php index 1af1e98a7fe75..228248d604430 100644 --- a/ext/sodium/libsodium.stub.php +++ b/ext/sodium/libsodium.stub.php @@ -170,7 +170,7 @@ function sodium_memzero(string &$reference): void {} function sodium_pad(string $string, int $length): string {} -function sodium_unpad(string $string, int $length): string {} +function sodium_unpad(string $string, int $block_size): string {} function sodium_bin2hex(string $string): string {} diff --git a/ext/sodium/libsodium_arginfo.h b/ext/sodium/libsodium_arginfo.h index 90b1d2d5fd85c..77f06ec2d6c67 100644 --- a/ext/sodium/libsodium_arginfo.h +++ b/ext/sodium/libsodium_arginfo.h @@ -353,7 +353,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_pad, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_sodium_unpad arginfo_sodium_pad +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_unpad, 0, 2, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, block_size, IS_LONG, 0) +ZEND_END_ARG_INFO() #define arginfo_sodium_bin2hex arginfo_sodium_crypto_kx_seed_keypair diff --git a/ext/sodium/tests/crypto_auth.phpt b/ext/sodium/tests/crypto_auth.phpt index 3c6e75098a031..58d8350078b36 100644 --- a/ext/sodium/tests/crypto_auth.phpt +++ b/ext/sodium/tests/crypto_auth.phpt @@ -41,7 +41,7 @@ var_dump(sodium_crypto_auth_verify($badmac, $msg, $key)); ?> --EXPECT-- bool(true) -key must be SODIUM_CRYPTO_AUTH_KEYBYTES bytes +sodium_crypto_auth(): Argument #2 ($key) must be SODIUM_CRYPTO_AUTH_KEYBYTES bytes long bool(false) bool(false) bool(false) diff --git a/ext/sodium/tests/crypto_box.phpt b/ext/sodium/tests/crypto_box.phpt index 392fad1d91b1a..b5c1d79d85098 100644 --- a/ext/sodium/tests/crypto_box.phpt +++ b/ext/sodium/tests/crypto_box.phpt @@ -142,7 +142,7 @@ bool(true) bool(true) bool(true) bool(true) -keypair size should be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes +sodium_crypto_box(): Argument #3 ($key) must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long bool(true) string(17) "Hi, this is Alice" string(21) "Hi Alice! This is Bob" From cb933d63c2a6df13d58054da1ea2c48f21a2469e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 28 Feb 2020 18:10:48 +0100 Subject: [PATCH 127/201] Add stubs for IntlChar Closes GH-5217 --- ext/intl/uchar/uchar.c | 93 +-------- ext/intl/uchar/uchar.stub.php | 334 +++++++++++++++++++++++++++++++++ ext/intl/uchar/uchar_arginfo.h | 167 +++++++++++++++++ 3 files changed, 504 insertions(+), 90 deletions(-) create mode 100644 ext/intl/uchar/uchar.stub.php create mode 100644 ext/intl/uchar/uchar_arginfo.h diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c index f9ed3153ad308..670976e2f3c64 100644 --- a/ext/intl/uchar/uchar.c +++ b/ext/intl/uchar/uchar.c @@ -1,6 +1,7 @@ #include "uchar.h" #include "intl_data.h" #include "intl_convert.h" +#include "uchar_arginfo.h" #include #include @@ -30,7 +31,7 @@ static inline int convert_cp(UChar32* pcp, zval *zcp) { } } else { intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR); - intl_error_set_custom_msg(NULL, "Invalid parameter for unicode point. Must be either integer or UTF-8 sequence.", 0); + intl_error_set_custom_msg(NULL, "Invalid parameter for unicode point. Must be either integer or UTF-8 sequence.", 0); return FAILURE; } if ((cp < UCHAR_MIN_VALUE) || (cp > UCHAR_MAX_VALUE)) { @@ -46,9 +47,6 @@ static inline int convert_cp(UChar32* pcp, zval *zcp) { * Converts a numeric codepoint to UTF-8 * Acts as an identify function when given a valid UTF-8 encoded codepoint */ -ZEND_BEGIN_ARG_INFO_EX(chr_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, codepoint) -ZEND_END_ARG_INFO(); IC_METHOD(chr) { UChar32 cp; zval *zcp; @@ -76,9 +74,6 @@ IC_METHOD(chr) { * Converts a UTf-8 encoded codepoint to its integer U32 value * Acts as an identity function when passed a valid integer codepoint */ -ZEND_BEGIN_ARG_INFO_EX(ord_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, character) -ZEND_END_ARG_INFO(); IC_METHOD(ord) { UChar32 cp; zval *zcp; @@ -96,10 +91,6 @@ IC_METHOD(ord) { /* }}} */ /* {{{ proto bool IntlChar::hasBinaryProperty(int|string $codepoint, int $property) */ -ZEND_BEGIN_ARG_INFO_EX(hasBinaryProperty_arginfo, 0, ZEND_RETURN_VALUE, 2) - ZEND_ARG_INFO(0, codepoint) - ZEND_ARG_INFO(0, property) -ZEND_END_ARG_INFO(); IC_METHOD(hasBinaryProperty) { UChar32 cp; zend_long prop; @@ -118,10 +109,6 @@ IC_METHOD(hasBinaryProperty) { /* }}} */ /* {{{ proto int IntlChar::getIntPropertyValue(int|string $codepoint, int $property) */ -ZEND_BEGIN_ARG_INFO_EX(getIntPropertyValue_arginfo, 0, ZEND_RETURN_VALUE, 2) - ZEND_ARG_INFO(0, codepoint) - ZEND_ARG_INFO(0, property) -ZEND_END_ARG_INFO(); IC_METHOD(getIntPropertyValue) { UChar32 cp; zend_long prop; @@ -140,9 +127,6 @@ IC_METHOD(getIntPropertyValue) { /* }}} */ /* {{{ proto int IntlChar::getIntPropertyMinValue(int $property) */ -ZEND_BEGIN_ARG_INFO_EX(getIntPropertyMinValue_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, property) -ZEND_END_ARG_INFO(); IC_METHOD(getIntPropertyMinValue) { zend_long prop; @@ -155,9 +139,6 @@ IC_METHOD(getIntPropertyMinValue) { /* }}} */ /* {{{ proto int IntlChar::getIntPropertyMaxValue(int $property) */ -ZEND_BEGIN_ARG_INFO_EX(getIntPropertyMaxValue_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, property) -ZEND_END_ARG_INFO(); IC_METHOD(getIntPropertyMaxValue) { zend_long prop; @@ -170,9 +151,6 @@ IC_METHOD(getIntPropertyMaxValue) { /* }}} */ /* {{{ proto float IntlChar::getNumericValue(int|string $codepoint) */ -ZEND_BEGIN_ARG_INFO_EX(getNumericValue_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, codepoint) -ZEND_END_ARG_INFO(); IC_METHOD(getNumericValue) { UChar32 cp; zval *zcp; @@ -190,9 +168,6 @@ IC_METHOD(getNumericValue) { /* }}} */ /* {{{ proto void IntlChar::enumCharTypes(callable $callback) */ -ZEND_BEGIN_ARG_INFO_EX(enumCharTypes_arginfo, 0, ZEND_RETURN_VALUE, 0) - ZEND_ARG_INFO(0, callback) -ZEND_END_ARG_INFO(); typedef struct _enumCharType_data { zend_fcall_info fci; zend_fcall_info_cache fci_cache; @@ -235,9 +210,6 @@ IC_METHOD(enumCharTypes) { /* }}} */ /* {{{ proto int IntlChar::getBlockCode(int|string $codepoint) */ -ZEND_BEGIN_ARG_INFO_EX(getBlockCode_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, codepoint) -ZEND_END_ARG_INFO() IC_METHOD(getBlockCode) { UChar32 cp; zval *zcp; @@ -255,10 +227,6 @@ IC_METHOD(getBlockCode) { /* }}} */ /* {{{ proto string IntlChar::charName(int|string $codepoint, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) */ -ZEND_BEGIN_ARG_INFO_EX(charName_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, codepoint) - ZEND_ARG_INFO(0, nameChoice) -ZEND_END_ARG_INFO() IC_METHOD(charName) { UChar32 cp; zval *zcp; @@ -288,10 +256,6 @@ IC_METHOD(charName) { /* }}} */ /* {{{ proto int IntlChar::charFromName(string $characterName, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) */ -ZEND_BEGIN_ARG_INFO_EX(charFromName_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, characterName) - ZEND_ARG_INFO(0, nameChoice) -ZEND_END_ARG_INFO() IC_METHOD(charFromName) { char *name; size_t name_len; @@ -310,12 +274,6 @@ IC_METHOD(charFromName) { /* }}} */ /* {{{ void void IntlChar::enumCharNames(int|string $start, int|string $limit, callable $callback, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) */ -ZEND_BEGIN_ARG_INFO_EX(enumCharNames_arginfo, 0, ZEND_RETURN_VALUE, 3) - ZEND_ARG_INFO(0, start) - ZEND_ARG_INFO(0, limit) - ZEND_ARG_INFO(0, callback) - ZEND_ARG_INFO(0, nameChoice) -ZEND_END_ARG_INFO(); typedef struct _enumCharNames_data { zend_fcall_info fci; zend_fcall_info_cache fci_cache; @@ -367,10 +325,6 @@ IC_METHOD(enumCharNames) { /* }}} */ /* {{{ proto string IntlChar::getPropertyName(int $property, int $nameChoice = IntlChar::LONG_PROPERTY_NAME) */ -ZEND_BEGIN_ARG_INFO_EX(getPropertyName_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, property) - ZEND_ARG_INFO(0, nameChoice) -ZEND_END_ARG_INFO(); IC_METHOD(getPropertyName) { zend_long property; zend_long nameChoice = U_LONG_PROPERTY_NAME; @@ -392,9 +346,6 @@ IC_METHOD(getPropertyName) { /* }}} */ /* {{{ proto int IntlChar::getPropertyEnum(string $alias) */ -ZEND_BEGIN_ARG_INFO_EX(getPropertyEnum_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, alias) -ZEND_END_ARG_INFO(); IC_METHOD(getPropertyEnum) { char *alias; size_t alias_len; @@ -408,11 +359,6 @@ IC_METHOD(getPropertyEnum) { /* }}} */ /* {{{ proto string IntlChar::getPropertyValueName(int $property, int $value[, int $nameChoice = IntlChar::LONG_PROPERTY_NAME) */ -ZEND_BEGIN_ARG_INFO_EX(getPropertyValueName_arginfo, 0, ZEND_RETURN_VALUE, 2) - ZEND_ARG_INFO(0, property) - ZEND_ARG_INFO(0, value) - ZEND_ARG_INFO(0, nameChoice) -ZEND_END_ARG_INFO(); IC_METHOD(getPropertyValueName) { zend_long property, value, nameChoice = U_LONG_PROPERTY_NAME; const char *ret; @@ -433,10 +379,6 @@ IC_METHOD(getPropertyValueName) { /* }}} */ /* {{{ proto int IntlChar::getPropertyValueEnum(int $property, string $name) */ -ZEND_BEGIN_ARG_INFO_EX(getPropertyValueEnum_arginfo, 0, ZEND_RETURN_VALUE, 2) - ZEND_ARG_INFO(0, property) - ZEND_ARG_INFO(0, name) -ZEND_END_ARG_INFO(); IC_METHOD(getPropertyValueEnum) { zend_long property; char *name; @@ -451,10 +393,6 @@ IC_METHOD(getPropertyValueEnum) { /* }}} */ /* {{{ proto int|string IntlChar::foldCase(int|string $codepoint, int $options = IntlChar::FOLD_CASE_DEFAULT) */ -ZEND_BEGIN_ARG_INFO_EX(foldCase_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, codepoint) - ZEND_ARG_INFO(0, options) -ZEND_END_ARG_INFO(); IC_METHOD(foldCase) { UChar32 cp, ret; zval *zcp; @@ -482,10 +420,6 @@ IC_METHOD(foldCase) { /* }}} */ /* {{{ proto int IntlChar::digit(int|string $codepoint[, int $radix = 10]) */ -ZEND_BEGIN_ARG_INFO_EX(digit_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, codepoint) - ZEND_ARG_INFO(0, radix) -ZEND_END_ARG_INFO(); IC_METHOD(digit) { UChar32 cp; zval *zcp; @@ -511,10 +445,6 @@ IC_METHOD(digit) { /* }}} */ /* {{{ proto int IntlChar::forDigit(int $digit[, int $radix = 10]) */ -ZEND_BEGIN_ARG_INFO_EX(forDigit_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, digit) - ZEND_ARG_INFO(0, radix) -ZEND_END_ARG_INFO(); IC_METHOD(forDigit) { zend_long digit, radix = 10; @@ -527,9 +457,6 @@ IC_METHOD(forDigit) { /* }}} */ /* {{{ proto array IntlChar::charAge(int|string $codepoint) */ -ZEND_BEGIN_ARG_INFO_EX(charAge_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, codepoint) -ZEND_END_ARG_INFO(); IC_METHOD(charAge) { UChar32 cp; zval *zcp; @@ -553,8 +480,6 @@ IC_METHOD(charAge) { /* }}} */ /* {{{ proto array IntlChar::getUnicodeVersion() */ -ZEND_BEGIN_ARG_INFO_EX(getUnicodeVersion_arginfo, 0, ZEND_RETURN_VALUE, 0) -ZEND_END_ARG_INFO(); IC_METHOD(getUnicodeVersion) { UVersionInfo version; int i; @@ -572,9 +497,6 @@ IC_METHOD(getUnicodeVersion) { /* }}} */ /* {{{ proto string IntlChar::getFC_NFKC_Closure(int|string $codepoint) */ -ZEND_BEGIN_ARG_INFO_EX(getFC_NFKC_Closure_arginfo, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, codepoint) -ZEND_END_ARG_INFO(); IC_METHOD(getFC_NFKC_Closure) { UChar32 cp; zval *zcp; @@ -613,9 +535,6 @@ IC_METHOD(getFC_NFKC_Closure) { /* {{{ proto bool IntlChar::(int|string $codepoint) */ #define IC_BOOL_METHOD_CHAR(name) \ -ZEND_BEGIN_ARG_INFO_EX(name##_arginfo, 0, ZEND_RETURN_VALUE, 1) \ - ZEND_ARG_INFO(0, codepoint) \ -ZEND_END_ARG_INFO(); \ IC_METHOD(name) { \ UChar32 cp; zval *zcp; \ if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) || \ @@ -655,9 +574,6 @@ IC_BOOL_METHOD_CHAR(isJavaIDPart) /* {{{ proto int IntlChar::(int|string $codepoint) */ #define IC_INT_METHOD_CHAR(name) \ -ZEND_BEGIN_ARG_INFO_EX(name##_arginfo, 0, ZEND_RETURN_VALUE, 1) \ - ZEND_ARG_INFO(0, codepoint) \ -ZEND_END_ARG_INFO(); \ IC_METHOD(name) { \ UChar32 cp; zval *zcp; \ if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) || \ @@ -676,9 +592,6 @@ IC_INT_METHOD_CHAR(charDigitValue) * Returns an int otherwise */ #define IC_CHAR_METHOD_CHAR(name) \ -ZEND_BEGIN_ARG_INFO_EX(name##_arginfo, 0, ZEND_RETURN_VALUE, 1) \ - ZEND_ARG_INFO(0, codepoint) \ -ZEND_END_ARG_INFO(); \ IC_METHOD(name) { \ UChar32 cp, ret; zval *zcp; \ if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) || \ @@ -705,7 +618,7 @@ IC_CHAR_METHOD_CHAR(getBidiPairedBracket) /* }}} */ static const zend_function_entry intlchar_methods[] = { -#define IC_ME(mname) PHP_ME(IntlChar, mname, mname##_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) +#define IC_ME(mname) PHP_ME(IntlChar, mname, arginfo_class_IntlChar_##mname, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) IC_ME(chr) IC_ME(ord) IC_ME(hasBinaryProperty) diff --git a/ext/intl/uchar/uchar.stub.php b/ext/intl/uchar/uchar.stub.php new file mode 100644 index 0000000000000..e9c7d0e3ff455 --- /dev/null +++ b/ext/intl/uchar/uchar.stub.php @@ -0,0 +1,334 @@ += 52 + /** + * @param int|string $codepoint + * @return int|string|null + */ + public static function getBidiPairedBracket($codepoint) {} +#endif + + /** + * @param int|string $codepoint + * @return int|null + */ + public static function getBlockCode($codepoint) {} + + /** + * @param int|string $codepoint + * @return int|null + */ + public static function getCombiningClass($codepoint) {} + + /** + * @param int|string $codepoint + * @return string|false|null + */ + public static function getFC_NFKC_Closure($codepoint) {} + + /** @return int */ + public static function getIntPropertyMaxValue(int $property) {} + + /** @return int */ + public static function getIntPropertyMinValue(int $property) {} + + /** + * @param int|string $codepoint + * @return int|null + */ + public static function getIntPropertyValue($codepoint, int $property) {} + + /** + * @param int|string $codepoint + * @return float|null + */ + public static function getNumericValue($codepoint) {} + + /** + * @param string $alias + * @return int + */ + public static function getPropertyEnum(string $alias) {} + + /** @return string|false */ + public static function getPropertyName(int $property, int $nameChoice = IntlChar::LONG_PROPERTY_NAME) {} + + /** @return int */ + public static function getPropertyValueEnum(int $property, string $name) {} + + /** @return string|false */ + public static function getPropertyValueName(int $property, int $value, $nameChoice = IntlChar::LONG_PROPERTY_NAME) {} + + /** @return array */ + public static function getUnicodeVersion() {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isalnum($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isalpha($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isbase($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isblank($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function iscntrl($codepoint ) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isdefined($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isdigit($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isgraph($codepoint ) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isIDIgnorable($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isIDPart($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isIDStart($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isISOControl($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isJavaIDPart($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isJavaIDStart($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isJavaSpaceChar($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function islower($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isMirrored($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isprint($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function ispunct($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isspace($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function istitle($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isUAlphabetic($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isULowercase($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isupper($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isUUppercase($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isUWhiteSpace($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isWhitespace($codepoint) {} + + /** + * @param int|string $codepoint + * @return bool|null + */ + public static function isxdigit($codepoint) {} + + /** + * @param int|string $character + * @return int|null + */ + public static function ord($character) {} + + /** + * @param int|string $codepoint + * @return int|string|null + */ + public static function tolower($codepoint) {} + + /** + * @param mixed $codepoint + * @return int|string|null + */ + public static function totitle($codepoint) {} + + /** + * @param int|string $codepoint + * @return int|string|null + */ + public static function toupper($codepoint) {} +} diff --git a/ext/intl/uchar/uchar_arginfo.h b/ext/intl/uchar/uchar_arginfo.h new file mode 100644 index 0000000000000..e7f6d7a8a3666 --- /dev/null +++ b/ext/intl/uchar/uchar_arginfo.h @@ -0,0 +1,167 @@ +/* This is a generated file, edit the .stub.php file instead. */ + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_hasBinaryProperty, 0, 0, 2) + ZEND_ARG_INFO(0, codepoint) + ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_charAge, 0, 0, 1) + ZEND_ARG_INFO(0, codepoint) +ZEND_END_ARG_INFO() + +#define arginfo_class_IntlChar_charDigitValue arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_charDirection arginfo_class_IntlChar_charAge + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_charFromName, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, characterName, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, nameChoice, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_IntlChar_charMirror arginfo_class_IntlChar_charAge + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_charName, 0, 0, 1) + ZEND_ARG_INFO(0, codepoint) + ZEND_ARG_TYPE_INFO(0, nameChoice, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_IntlChar_charType arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_chr arginfo_class_IntlChar_charAge + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_digit, 0, 0, 1) + ZEND_ARG_INFO(0, codepoint) + ZEND_ARG_TYPE_INFO(0, radix, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_enumCharNames, 0, 0, 3) + ZEND_ARG_INFO(0, start) + ZEND_ARG_INFO(0, limit) + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) + ZEND_ARG_TYPE_INFO(0, nameChoice, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_enumCharTypes, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_foldCase, 0, 0, 1) + ZEND_ARG_INFO(0, codepoint) + ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_forDigit, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, digit, IS_LONG, 0) + ZEND_ARG_INFO(0, radix) +ZEND_END_ARG_INFO() + +#if U_ICU_VERSION_MAJOR_NUM >= 52 +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getBidiPairedBracket, 0, 0, 1) + ZEND_ARG_INFO(0, codepoint) +ZEND_END_ARG_INFO() +#endif + +#define arginfo_class_IntlChar_getBlockCode arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_getCombiningClass arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_getFC_NFKC_Closure arginfo_class_IntlChar_charAge + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getIntPropertyMaxValue, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_IntlChar_getIntPropertyMinValue arginfo_class_IntlChar_getIntPropertyMaxValue + +#define arginfo_class_IntlChar_getIntPropertyValue arginfo_class_IntlChar_hasBinaryProperty + +#define arginfo_class_IntlChar_getNumericValue arginfo_class_IntlChar_charAge + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getPropertyEnum, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getPropertyName, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, nameChoice, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getPropertyValueEnum, 0, 0, 2) + ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getPropertyValueName, 0, 0, 2) + ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) + ZEND_ARG_INFO(0, nameChoice) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getUnicodeVersion, 0, 0, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_IntlChar_isalnum arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isalpha arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isbase arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isblank arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_iscntrl arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isdefined arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isdigit arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isgraph arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isIDIgnorable arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isIDPart arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isIDStart arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isISOControl arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isJavaIDPart arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isJavaIDStart arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isJavaSpaceChar arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_islower arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isMirrored arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isprint arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_ispunct arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isspace arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_istitle arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isUAlphabetic arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isULowercase arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isupper arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isUUppercase arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isUWhiteSpace arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isWhitespace arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_isxdigit arginfo_class_IntlChar_charAge + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_ord, 0, 0, 1) + ZEND_ARG_INFO(0, character) +ZEND_END_ARG_INFO() + +#define arginfo_class_IntlChar_tolower arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_totitle arginfo_class_IntlChar_charAge + +#define arginfo_class_IntlChar_toupper arginfo_class_IntlChar_charAge From 2adf1c4d23467424012db1971d0a0a678d10d782 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 2 Mar 2020 10:45:37 +0100 Subject: [PATCH 128/201] Fix #79332: php_istreams are never freed Releasing the `com_dotnet_istream_wrapper` in `istream_destructor()` is pointless, since `istream_destructor()` is only called when the resource is going to be released. This recursion is not a real issue, though, since the resource is never exposed to userland, and has at most refcount 1, so due to well defined unsigned integer underflow, it never is released twice. However, returning early in this case causes a memory leak which needs to be fixed. --- NEWS | 1 + ext/com_dotnet/com_persist.c | 11 +---------- ext/com_dotnet/tests/bug79332.phpt | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 ext/com_dotnet/tests/bug79332.phpt diff --git a/NEWS b/NEWS index 49feabc5ef2f6..3dd8545c440d1 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ PHP NEWS . Fixed bug #79248 (Traversing empty VT_ARRAY throws com_exception). (cmb) . Fixed bug #79299 (com_print_typeinfo prints duplicate variables). (Litiano Moura) + . Fixed bug #79332 (php_istreams are never freed). (cmb) - DOM: . Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita, diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c index 0fee0efd43c26..743a441f708ac 100644 --- a/ext/com_dotnet/com_persist.c +++ b/ext/com_dotnet/com_persist.c @@ -248,13 +248,6 @@ static struct IStreamVtbl php_istream_vtbl = { static void istream_destructor(php_istream *stm) { - if (stm->res) { - zend_resource *res = stm->res; - stm->res = NULL; - zend_list_delete(res); - return; - } - if (stm->refcount > 0) { CoDisconnectObject((IUnknown*)stm, 0); } @@ -268,7 +261,6 @@ static void istream_destructor(php_istream *stm) PHP_COM_DOTNET_API IStream *php_com_wrapper_export_stream(php_stream *stream) { php_istream *stm = (php_istream*)CoTaskMemAlloc(sizeof(*stm)); - zval *tmp; if (stm == NULL) return NULL; @@ -280,8 +272,7 @@ PHP_COM_DOTNET_API IStream *php_com_wrapper_export_stream(php_stream *stream) stm->stream = stream; GC_ADDREF(stream->res); - tmp = zend_list_insert(stm, le_istream); - stm->res = Z_RES_P(tmp); + stm->res = zend_register_resource(stm, le_istream); return (IStream*)stm; } diff --git a/ext/com_dotnet/tests/bug79332.phpt b/ext/com_dotnet/tests/bug79332.phpt new file mode 100644 index 0000000000000..45856b5488ecb --- /dev/null +++ b/ext/com_dotnet/tests/bug79332.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #79332 (php_istreams are never freed) +--SKIPIF-- + +--FILE-- +LoadFromStream(fopen(__FILE__, 'r')); +} catch (com_exception $ex) { + // use hard-coded message to avoid localization issues + echo "A com_exception has been thrown\n"; +} +?> +--EXPECT-- +A com_exception has been thrown From 53140e5c567af6cba0779e178394404f92213713 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 2 Mar 2020 11:36:30 +0100 Subject: [PATCH 129/201] Fix #79333: com_print_typeinfo() leaks memory We have to free the `ansiname`s, regardless of whether they have been put into the hashtable or not. Since bug79299.phpt already shows the leak when run with a leak checker, there is no need for another regression test. --- NEWS | 1 + ext/com_dotnet/com_typeinfo.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3dd8545c440d1..1cdfac06bb9d8 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ PHP NEWS . Fixed bug #79299 (com_print_typeinfo prints duplicate variables). (Litiano Moura) . Fixed bug #79332 (php_istreams are never freed). (cmb) + . Fixed bug #79333 (com_print_typeinfo() leaks memory). (cmb) - DOM: . Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita, diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index f3cecd82f528b..794922d9380d7 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -582,8 +582,8 @@ int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int pri ZVAL_STRINGL(&tmp, ansiname, ansinamelen); zend_hash_index_update(id_to_name, func->memid, &tmp); // TODO: avoid reallocation??? - efree(ansiname); } + efree(ansiname); } ITypeInfo_ReleaseFuncDesc(typeinfo, func); } From f15ab32af8436f9cbb6c5751f884f25289a13a36 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 26 Feb 2020 09:59:44 +0100 Subject: [PATCH 130/201] Update libmagic.patch Some commits missed to update the patch file, so we're catching up on this. To generally make this easier, we back-port generate_patch.sh from PHP-7.4, where we now also generate magic.h from magic.h.in. --- ext/fileinfo/generate_patch.sh | 8 ++ ext/fileinfo/libmagic.patch | 168 ++++++++++++++++++++------------- 2 files changed, 110 insertions(+), 66 deletions(-) create mode 100644 ext/fileinfo/generate_patch.sh diff --git a/ext/fileinfo/generate_patch.sh b/ext/fileinfo/generate_patch.sh new file mode 100644 index 0000000000000..3c0b4cf2f5c05 --- /dev/null +++ b/ext/fileinfo/generate_patch.sh @@ -0,0 +1,8 @@ +VERSION=5.33 +if [[ ! -d libmagic.orig ]]; then + mkdir libmagic.orig + wget -O - ftp://ftp.astron.com/pub/file/file-$VERSION.tar.gz \ + | tar -xz --strip-components=2 -C libmagic.orig file-$VERSION/src +fi +sed -e "s/X\.YY/${VERSION//.}/g" libmagic.orig/magic.h.in > libmagic.orig/magic.h +diff -u libmagic.orig libmagic | grep -v '^Only in' > libmagic.patch diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch index 9eb377fc1f426..0b545efd68d62 100644 --- a/ext/fileinfo/libmagic.patch +++ b/ext/fileinfo/libmagic.patch @@ -1,6 +1,6 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c --- libmagic.orig/apprentice.c 2018-03-11 01:46:42.000000000 +0100 -+++ libmagic/apprentice.c 2018-11-05 00:16:58.812821826 +0100 ++++ libmagic/apprentice.c 2020-02-26 09:55:13.842042400 +0100 @@ -2,7 +2,7 @@ * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -1245,7 +1245,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c switch (m->str_flags & PSTRING_LEN) { diff -u libmagic.orig/apptype.c libmagic/apptype.c --- libmagic.orig/apptype.c 2011-09-07 23:57:15.000000000 +0200 -+++ libmagic/apptype.c 2018-08-10 11:46:29.210671445 +0200 ++++ libmagic/apptype.c 2020-02-26 09:55:13.843047200 +0100 @@ -1,15 +1,15 @@ /* * Adapted from: apptype.c, Written by Eberhard Mattes and put into the @@ -1280,7 +1280,7 @@ diff -u libmagic.orig/apptype.c libmagic/apptype.c #include "file.h" diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c --- libmagic.orig/ascmagic.c 2017-11-02 21:25:39.000000000 +0100 -+++ libmagic/ascmagic.c 2018-08-10 11:46:29.210671445 +0200 ++++ libmagic/ascmagic.c 2020-02-26 09:55:13.845043300 +0100 @@ -90,7 +90,7 @@ rv = file_ascmagic_with_encoding(ms, &bb, ubuf, ulen, code, type, text); @@ -1311,7 +1311,7 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c } diff -u libmagic.orig/buffer.c libmagic/buffer.c --- libmagic.orig/buffer.c 2018-03-11 01:46:42.000000000 +0100 -+++ libmagic/buffer.c 2018-08-10 11:46:29.210671445 +0200 ++++ libmagic/buffer.c 2020-02-26 09:55:13.846042600 +0100 @@ -31,7 +31,11 @@ #endif /* lint */ @@ -1362,7 +1362,7 @@ diff -u libmagic.orig/buffer.c libmagic/buffer.c diff -u libmagic.orig/cdf.c libmagic/cdf.c --- libmagic.orig/cdf.c 2018-03-11 01:46:42.000000000 +0100 -+++ libmagic/cdf.c 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/cdf.c 2020-02-26 09:55:13.847043900 +0100 @@ -43,7 +43,17 @@ #include #endif @@ -1564,7 +1564,28 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c *maxcount = 0; *info = NULL; return NULL; -@@ -1092,7 +1078,7 @@ +@@ -1003,8 +989,9 @@ + goto out; + } + nelements = CDF_GETUINT32(q, 1); +- if (nelements == 0) { +- DPRINTF(("CDF_VECTOR with nelements == 0\n")); ++ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) { ++ DPRINTF(("CDF_VECTOR with nelements == %" ++ SIZE_T_FORMAT "u\n", nelements)); + goto out; + } + slen = 2; +@@ -1046,8 +1033,6 @@ + goto out; + inp += nelem; + } +- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n", +- nelements)); + for (j = 0; j < nelements && i < sh.sh_properties; + j++, i++) + { +@@ -1092,7 +1077,7 @@ } return 0; out: @@ -1573,7 +1594,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c *info = NULL; *count = 0; *maxcount = 0; -@@ -1383,7 +1369,7 @@ +@@ -1383,7 +1368,7 @@ cdf_directory_t *d; char name[__arraycount(d->d_name)]; cdf_stream_t scn; @@ -1582,7 +1603,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c static const char *types[] = { "empty", "user storage", "user stream", "lockbytes", "property", "root storage" }; -@@ -1425,7 +1411,7 @@ +@@ -1425,7 +1410,7 @@ break; } cdf_dump_stream(&scn); @@ -1591,7 +1612,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c break; default: break; -@@ -1438,7 +1424,7 @@ +@@ -1438,7 +1423,7 @@ cdf_dump_property_info(const cdf_property_info_t *info, size_t count) { cdf_timestamp_t tp; @@ -1600,7 +1621,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c char buf[64]; size_t i, j; -@@ -1523,7 +1509,7 @@ +@@ -1523,7 +1508,7 @@ (void)fprintf(stderr, "Class %s\n", buf); (void)fprintf(stderr, "Count %d\n", ssi.si_count); cdf_dump_property_info(info, count); @@ -1609,7 +1630,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c } -@@ -1544,7 +1530,7 @@ +@@ -1544,7 +1529,7 @@ cdf_u16tos8(sbuf, ce[i].ce_namlen, ce[i].ce_name), cdf_ctime(&ts.tv_sec, tbuf)); } @@ -1620,7 +1641,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c #endif diff -u libmagic.orig/cdf.h libmagic/cdf.h --- libmagic.orig/cdf.h 2017-03-09 17:57:17.000000000 +0100 -+++ libmagic/cdf.h 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/cdf.h 2020-02-26 09:55:13.848043100 +0100 @@ -35,10 +35,10 @@ #ifndef _H_CDF_ #define _H_CDF_ @@ -1635,7 +1656,15 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h #endif #ifdef __DJGPP__ #define timespec timeval -@@ -272,7 +272,7 @@ +@@ -48,6 +48,7 @@ + typedef int32_t cdf_secid_t; + + #define CDF_LOOP_LIMIT 10000 ++#define CDF_ELEMENT_LIMIT 100000 + + #define CDF_SECID_NULL 0 + #define CDF_SECID_FREE -1 +@@ -272,7 +273,7 @@ typedef struct { uint16_t ce_namlen; uint32_t ce_num; @@ -1646,7 +1675,7 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c --- libmagic.orig/cdf_time.c 2017-03-29 17:57:48.000000000 +0200 -+++ libmagic/cdf_time.c 2019-03-08 21:00:46.636733574 +0100 ++++ libmagic/cdf_time.c 2020-02-26 09:55:13.849044200 +0100 @@ -23,6 +23,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. @@ -1693,7 +1722,7 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c (void)snprintf(buf, 26, "*Bad* %#16.16" INT64_T_FORMAT "x\n", diff -u libmagic.orig/compress.c libmagic/compress.c --- libmagic.orig/compress.c 2017-11-02 21:25:39.000000000 +0100 -+++ libmagic/compress.c 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/compress.c 2020-02-26 09:55:13.850043300 +0100 @@ -2,7 +2,7 @@ * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -1994,7 +2023,7 @@ diff -u libmagic.orig/compress.c libmagic/compress.c +#endif /* if PHP_FILEINFO_UNCOMPRESS */ diff -u libmagic.orig/der.c libmagic/der.c --- libmagic.orig/der.c 2017-02-10 19:14:01.000000000 +0100 -+++ libmagic/der.c 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/der.c 2020-02-26 09:55:13.851044000 +0100 @@ -51,7 +51,9 @@ #include "magic.h" #include "der.h" @@ -2051,7 +2080,7 @@ diff -u libmagic.orig/der.c libmagic/der.c der_tag(buf, sizeof(buf), tag), len); diff -u libmagic.orig/elfclass.h libmagic/elfclass.h --- libmagic.orig/elfclass.h 2014-12-17 00:18:40.000000000 +0100 -+++ libmagic/elfclass.h 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/elfclass.h 2020-02-26 09:55:13.852043400 +0100 @@ -1,7 +1,7 @@ /* * Copyright (c) Christos Zoulas 2008. @@ -2099,7 +2128,7 @@ diff -u libmagic.orig/elfclass.h libmagic/elfclass.h (int)elf_getu16(swap, elfhdr.e_shstrndx), diff -u libmagic.orig/encoding.c libmagic/encoding.c --- libmagic.orig/encoding.c 2017-11-02 21:25:39.000000000 +0100 -+++ libmagic/encoding.c 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/encoding.c 2020-02-26 09:55:13.854045100 +0100 @@ -88,12 +88,12 @@ *code_mime = "binary"; @@ -2129,7 +2158,7 @@ diff -u libmagic.orig/encoding.c libmagic/encoding.c } diff -u libmagic.orig/file.h libmagic/file.h --- libmagic.orig/file.h 2018-03-11 01:46:42.000000000 +0100 -+++ libmagic/file.h 2018-11-05 21:31:59.339653700 +0100 ++++ libmagic/file.h 2020-02-26 09:55:13.856043400 +0100 @@ -27,21 +27,15 @@ */ /* @@ -2416,7 +2445,7 @@ diff -u libmagic.orig/file.h libmagic/file.h #endif diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c --- libmagic.orig/fsmagic.c 2017-05-24 21:17:50.000000000 +0200 -+++ libmagic/fsmagic.c 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/fsmagic.c 2020-02-26 09:55:13.857043000 +0100 @@ -2,7 +2,7 @@ * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -2777,7 +2806,7 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c case S_IFSOCK: diff -u libmagic.orig/funcs.c libmagic/funcs.c --- libmagic.orig/funcs.c 2017-11-02 21:25:39.000000000 +0100 -+++ libmagic/funcs.c 2018-11-05 21:31:59.339653700 +0100 ++++ libmagic/funcs.c 2020-02-26 09:55:13.859042500 +0100 @@ -31,7 +31,6 @@ #endif /* lint */ @@ -3025,7 +3054,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c if (ms->c.li == NULL) { file_oomem(ms, len); return -1; -@@ -464,76 +470,41 @@ +@@ -464,76 +470,38 @@ protected int file_replace(struct magic_set *ms, const char *pat, const char *rep) { @@ -3053,11 +3082,9 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c + zend_string *repl; + size_t rep_cnt = 0; + -+ (void)setlocale(LC_CTYPE, "C"); -+ + opts |= PCRE2_MULTILINE; + convert_libmagic_pattern(&patt, (char*)pat, strlen(pat), opts); -+ if ((pce = pcre_get_compiled_regex_cache(Z_STR(patt))) == NULL) { ++ if ((pce = pcre_get_compiled_regex_cache_ex(Z_STR(patt), 0)) == NULL) { + zval_ptr_dtor(&patt); + rep_cnt = -1; + goto out; @@ -3126,12 +3153,11 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c - file_magerror(ms, "regex error %d for `%s', (%s)", rc, rx->pat, - errmsg); +out: -+ (void)setlocale(LC_CTYPE, ""); + return rep_cnt; } protected file_pushbuf_t * -@@ -544,7 +515,7 @@ +@@ -544,7 +512,7 @@ if (ms->event_flags & EVENT_HAD_ERR) return NULL; @@ -3140,7 +3166,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c return NULL; pb->buf = ms->o.buf; -@@ -562,8 +533,8 @@ +@@ -562,8 +530,8 @@ char *rbuf; if (ms->event_flags & EVENT_HAD_ERR) { @@ -3151,7 +3177,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c return NULL; } -@@ -572,7 +543,7 @@ +@@ -572,7 +540,7 @@ ms->o.buf = pb->buf; ms->offset = pb->offset; @@ -3162,7 +3188,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c diff -u libmagic.orig/magic.c libmagic/magic.c --- libmagic.orig/magic.c 2017-08-28 15:39:18.000000000 +0200 -+++ libmagic/magic.c 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/magic.c 2020-02-26 09:55:13.861044300 +0100 @@ -25,11 +25,6 @@ * SUCH DAMAGE. */ @@ -3638,8 +3664,8 @@ diff -u libmagic.orig/magic.c libmagic/magic.c public const char * magic_error(struct magic_set *ms) diff -u libmagic.orig/magic.h libmagic/magic.h ---- libmagic.orig/magic.h 2018-11-13 21:40:06.272616270 +0100 -+++ libmagic/magic.h 2018-08-10 11:46:29.214671395 +0200 +--- libmagic.orig/magic.h 2020-02-26 09:56:58.945274100 +0100 ++++ libmagic/magic.h 2020-02-26 09:55:13.862044300 +0100 @@ -122,6 +122,7 @@ const char *magic_getpath(const char *, int); @@ -3650,7 +3676,7 @@ diff -u libmagic.orig/magic.h libmagic/magic.h diff -u libmagic.orig/print.c libmagic/print.c --- libmagic.orig/print.c 2017-02-10 19:14:01.000000000 +0100 -+++ libmagic/print.c 2019-03-08 21:00:46.636733574 +0100 ++++ libmagic/print.c 2020-02-26 09:55:13.864043900 +0100 @@ -2,7 +2,7 @@ * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -3733,7 +3759,7 @@ diff -u libmagic.orig/print.c libmagic/print.c goto out; diff -u libmagic.orig/readcdf.c libmagic/readcdf.c --- libmagic.orig/readcdf.c 2017-11-02 21:25:39.000000000 +0100 -+++ libmagic/readcdf.c 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/readcdf.c 2020-02-26 09:55:13.865044100 +0100 @@ -31,7 +31,11 @@ #include @@ -3757,12 +3783,13 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c return NULL; } -@@ -116,30 +116,14 @@ +@@ -116,30 +116,24 @@ { size_t i; const char *rv = NULL; -#ifdef USE_C_LOCALE - locale_t old_lc_ctype, c_lc_ctype; ++ char *vbuf_lower; - c_lc_ctype = newlocale(LC_CTYPE_MASK, "C", 0); - assert(c_lc_ctype != NULL); @@ -3771,9 +3798,18 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c -#else - char *old_lc_ctype = setlocale(LC_CTYPE, "C"); -#endif -+ (void)setlocale(LC_CTYPE, "C"); - for (i = 0; nv[i].pattern != NULL; i++) - if (strcasestr(vbuf, nv[i].pattern) != NULL) { +- for (i = 0; nv[i].pattern != NULL; i++) +- if (strcasestr(vbuf, nv[i].pattern) != NULL) { ++ vbuf_lower = zend_str_tolower_dup(vbuf, strlen(vbuf)); ++ for (i = 0; nv[i].pattern != NULL; i++) { ++ char *pattern_lower; ++ int found; ++ ++ pattern_lower = zend_str_tolower_dup(nv[i].pattern, strlen(nv[i].pattern)); ++ found = (strstr(vbuf_lower, pattern_lower) != NULL); ++ efree(pattern_lower); ++ ++ if (found) { rv = nv[i].mime; break; } @@ -3786,11 +3822,13 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c -#else - setlocale(LC_CTYPE, old_lc_ctype); -#endif -+ (void)setlocale(LC_CTYPE, ""); ++ } ++ ++ efree(vbuf_lower); return rv; } -@@ -155,6 +139,8 @@ +@@ -155,6 +149,8 @@ const char *s, *e; int len; @@ -3799,7 +3837,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c if (!NOTMIME(ms) && root_storage) str = cdf_clsid_to_mime(root_storage->d_storage_uuid, clsid2mime); -@@ -281,10 +267,10 @@ +@@ -281,10 +277,10 @@ if (file_printf(ms, "%s%s", cdf_u16tos8(buf, ce[i].ce_namlen, ce[i].ce_name), i == cat->cat_num - 1 ? "]" : ", ") == -1) { @@ -3812,7 +3850,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c } else { if (file_printf(ms, "application/CDFV2") == -1) return -1; -@@ -345,7 +331,7 @@ +@@ -345,7 +341,7 @@ } m = cdf_file_property_info(ms, info, count, root_storage); @@ -3821,7 +3859,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c return m == -1 ? -2 : m; } -@@ -353,11 +339,11 @@ +@@ -353,11 +349,11 @@ #ifdef notdef private char * format_clsid(char *buf, size_t len, const uint64_t uuid[2]) { @@ -3835,7 +3873,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c (uuid[1] >> 48) & (uint64_t)0x0000000000000ffffULL, (uuid[1] >> 0) & (uint64_t)0x0000fffffffffffffULL); return buf; -@@ -436,7 +422,7 @@ +@@ -436,7 +432,7 @@ const char *sections[5]; const int types[5]; } sectioninfo[] = { @@ -3844,7 +3882,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c { "EncryptedPackage", "EncryptedSummary", NULL, NULL, NULL, -@@ -448,7 +434,7 @@ +@@ -448,7 +444,7 @@ }, }, @@ -3853,7 +3891,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c { #if 0 "TaxForms", "PDFTaxForms", "modulesInBackup", -@@ -655,11 +641,11 @@ +@@ -655,11 +651,11 @@ cdf_zero_stream(&scn); cdf_zero_stream(&sst); out3: @@ -3870,7 +3908,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c if (NOTMIME(ms)) { diff -u libmagic.orig/softmagic.c libmagic/softmagic.c --- libmagic.orig/softmagic.c 2018-04-15 20:49:15.000000000 +0200 -+++ libmagic/softmagic.c 2018-11-11 21:42:27.860274508 +0100 ++++ libmagic/softmagic.c 2020-02-26 09:55:13.866043500 +0100 @@ -43,6 +43,10 @@ #include #include "der.h" @@ -3914,14 +3952,13 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c #define FLT (STRING_BINTEST | STRING_TEXTTEST) ((text && (m->str_flags & FLT) == STRING_BINTEST) || (!text && (m->str_flags & FLT) == STRING_TEXTTEST))) || -@@ -416,42 +422,30 @@ +@@ -416,42 +422,28 @@ private int check_fmt(struct magic_set *ms, const char *fmt) { - file_regex_t rx; - int rc, rv = -1; -+ pcre2_code *pce; -+ uint32_t re_options, capture_count; ++ pcre_cache_entry *pce; + int rv = -1; + zend_string *pattern; @@ -3931,22 +3968,21 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c - rc = file_regcomp(&rx, "%[-0-9\\.]*s", REG_EXTENDED|REG_NOSUB); - if (rc) { - file_regerror(&rx, rc, ms); -+ (void)setlocale(LC_CTYPE, "C"); + pattern = zend_string_init("~%[-0-9\\.]*s~", sizeof("~%[-0-9\\.]*s~") - 1, 0); -+ if ((pce = pcre_get_compiled_regex(pattern, &capture_count, &re_options)) == NULL) { ++ if ((pce = pcre_get_compiled_regex_cache_ex(pattern, 0)) == NULL) { + rv = -1; } else { - rc = file_regexec(&rx, fmt, 0, 0, 0); - rv = !rc; -+ pcre2_match_data *match_data = php_pcre_create_match_data(capture_count, pce); ++ pcre2_code *re = php_pcre_pce_re(pce); ++ pcre2_match_data *match_data = php_pcre_create_match_data(0, re); + if (match_data) { -+ rv = pcre2_match(pce, (PCRE2_SPTR)fmt, strlen(fmt), 0, re_options, match_data, php_pcre_mctx()) > 0; ++ rv = pcre2_match(re, (PCRE2_SPTR)fmt, strlen(fmt), 0, 0, match_data, php_pcre_mctx()) > 0; + php_pcre_free_match_data(match_data); + } } - file_regfree(&rx); -+ zend_string_release_ex(pattern, 0); -+ (void)setlocale(LC_CTYPE, ""); ++ zend_string_release(pattern); return rv; } @@ -3972,7 +4008,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c static int varexpand(char *buf, size_t len, const struct buffer *b, const char *str) { -@@ -743,14 +737,10 @@ +@@ -743,14 +735,10 @@ char *cp; int rval; @@ -3989,7 +4025,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c if (rval == -1) return -1; -@@ -1135,7 +1125,7 @@ +@@ -1135,7 +1123,7 @@ * string by p->s, so we need to deduct sz. * Because we can use one of the bytes of the length * after we shifted as NUL termination. @@ -3998,7 +4034,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c len = sz; } while (len--) -@@ -1209,7 +1199,7 @@ +@@ -1209,7 +1197,7 @@ goto out; return 1; case FILE_BEDOUBLE: @@ -4007,7 +4043,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c if (cvt_double(p, m) == -1) goto out; return 1; -@@ -1481,8 +1471,6 @@ +@@ -1481,8 +1469,6 @@ return -1; } @@ -4016,7 +4052,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c if (mcopy(ms, p, m->type, m->flag & INDIR, s, (uint32_t)(offset + o), (uint32_t)nbytes, m) == -1) return -1; -@@ -1494,9 +1482,6 @@ +@@ -1494,9 +1480,6 @@ m->type, m->flag, offset, o, nbytes, *indir_count, *name_count); mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE)); @@ -4026,7 +4062,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c } if (m->flag & INDIR) { -@@ -1609,9 +1594,6 @@ +@@ -1609,9 +1592,6 @@ if ((ms->flags & MAGIC_DEBUG) != 0) { mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE)); @@ -4036,7 +4072,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c } } -@@ -1696,15 +1678,15 @@ +@@ -1696,15 +1676,15 @@ if (rv == 1) { if ((ms->flags & MAGIC_NODESC) == 0 && file_printf(ms, F(ms, m->desc, "%u"), offset) == -1) { @@ -4055,7 +4091,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c return rv; case FILE_USE: -@@ -1827,6 +1809,41 @@ +@@ -1827,6 +1807,41 @@ return file_strncmp(a, b, len, flags); } @@ -4097,7 +4133,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c private int magiccheck(struct magic_set *ms, struct magic *m) { -@@ -1987,65 +2004,77 @@ +@@ -1987,65 +2002,77 @@ break; } case FILE_REGEX: { @@ -4229,7 +4265,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c case FILE_INDIRECT: diff -u libmagic.orig/strcasestr.c libmagic/strcasestr.c --- libmagic.orig/strcasestr.c 2014-05-13 18:48:12.000000000 +0200 -+++ libmagic/strcasestr.c 2018-08-10 11:46:29.214671395 +0200 ++++ libmagic/strcasestr.c 2019-04-02 11:56:06.853152400 +0200 @@ -39,6 +39,8 @@ #include "file.h" From 9e775db02567d3b90694ebb43f0225875a48e8c9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 13 Jan 2020 17:06:26 +0100 Subject: [PATCH 131/201] Define Stringable with __toString():string method --- Zend/tests/bug26166.phpt | 2 +- Zend/tests/list_keyed_evaluation_order.inc | 2 +- Zend/tests/list_keyed_evaluation_order.phpt | 4 +- .../list_keyed_evaluation_order_nested.phpt | 10 +- .../tests/type_declarations/scalar_basic.phpt | 12 +- .../scalar_return_basic.phpt | 12 +- .../scalar_return_basic_64bit.phpt | 12 +- .../type_declarations/scalar_strict.phpt | 12 +- .../scalar_strict_64bit.phpt | 12 +- Zend/zend_compile.c | 19 +- Zend/zend_exceptions.c | 2 +- Zend/zend_exceptions.stub.php | 8 +- Zend/zend_exceptions_arginfo.h | 5 +- Zend/zend_interfaces.c | 10 + Zend/zend_interfaces.h | 1 + Zend/zend_interfaces.stub.php | 5 + Zend/zend_interfaces_arginfo.h | 3 + ext/reflection/php_reflection.c | 3 +- ext/reflection/php_reflection.stub.php | 33 +- ext/reflection/php_reflection_arginfo.h | 309 +++++++++--------- .../tests/ReflectionClass_toString_001.phpt | 5 +- ext/simplexml/simplexml.c | 2 +- ext/simplexml/simplexml.stub.php | 5 +- ext/simplexml/simplexml_arginfo.h | 3 +- ext/soap/soap.stub.php | 3 +- ext/soap/soap_arginfo.h | 19 +- ext/spl/spl_directory.c | 10 +- ext/spl/spl_iterators.c | 6 +- ext/spl/spl_iterators.h | 1 + ext/standard/tests/strings/strlen.phpt | Bin 6096 -> 6102 bytes ext/standard/tests/strings/strpos.phpt | Bin 8035 -> 8041 bytes ext/standard/tests/strings/strstr.phpt | Bin 9512 -> 9518 bytes ext/standard/tests/strings/ucfirst.phpt | Bin 4684 -> 4690 bytes sapi/cli/tests/005.phpt | 5 +- tests/classes/tostring_001.phpt | 4 +- tests/classes/tostring_004.phpt | 6 +- 36 files changed, 282 insertions(+), 263 deletions(-) diff --git a/Zend/tests/bug26166.phpt b/Zend/tests/bug26166.phpt index 7e5668e47ff4c..4a5a30f5b298f 100644 --- a/Zend/tests/bug26166.phpt +++ b/Zend/tests/bug26166.phpt @@ -64,6 +64,6 @@ try { --EXPECT-- Hello World! ===NONE=== -Method NoneTest::__toString() must return a string value +Return value of NoneTest::__toString() must be of type string, none returned ===THROW=== This is an error! diff --git a/Zend/tests/list_keyed_evaluation_order.inc b/Zend/tests/list_keyed_evaluation_order.inc index d4ee778b634ac..577a19a83803a 100644 --- a/Zend/tests/list_keyed_evaluation_order.inc +++ b/Zend/tests/list_keyed_evaluation_order.inc @@ -2,7 +2,7 @@ // Observer objects for the Zend/tests/list_keyed_evaluation_order.* tests -class Stringable +class StringCapable { private $name; public function __construct(string $name) { diff --git a/Zend/tests/list_keyed_evaluation_order.phpt b/Zend/tests/list_keyed_evaluation_order.phpt index 0f0652b6a9b43..3c5fb7e8770c1 100644 --- a/Zend/tests/list_keyed_evaluation_order.phpt +++ b/Zend/tests/list_keyed_evaluation_order.phpt @@ -5,8 +5,8 @@ list() with keys, evaluation order require_once "list_keyed_evaluation_order.inc"; -$a = new Stringable("A"); -$c = new Stringable("C"); +$a = new StringCapable("A"); +$c = new StringCapable("C"); $e = new IndexableRetrievable("E", new Indexable(["A" => "value for offset A", "C" => "value for offset C"])); diff --git a/Zend/tests/list_keyed_evaluation_order_nested.phpt b/Zend/tests/list_keyed_evaluation_order_nested.phpt index 8a7725d4eaaae..496deefbb9879 100644 --- a/Zend/tests/list_keyed_evaluation_order_nested.phpt +++ b/Zend/tests/list_keyed_evaluation_order_nested.phpt @@ -5,11 +5,11 @@ list() with keys, evaluation order: nested require_once "list_keyed_evaluation_order.inc"; -$a = new Stringable("A"); -$c = new Stringable("C"); -$f = new Stringable("F"); -$g = new Stringable("G"); -$i = new Stringable("I"); +$a = new StringCapable("A"); +$c = new StringCapable("C"); +$f = new StringCapable("F"); +$g = new StringCapable("G"); +$i = new StringCapable("I"); $k = new IndexableRetrievable("K", new Indexable([ "A" => "offset value for A", diff --git a/Zend/tests/type_declarations/scalar_basic.phpt b/Zend/tests/type_declarations/scalar_basic.phpt index e4b8ab5c51e0b..c3f06c5bbde87 100644 --- a/Zend/tests/type_declarations/scalar_basic.phpt +++ b/Zend/tests/type_declarations/scalar_basic.phpt @@ -19,7 +19,7 @@ $functions = [ 'bool' => function (bool $b) { return $b; } ]; -class Stringable { +class StringCapable implements Stringable { public function __toString() { return "foobar"; } @@ -40,7 +40,7 @@ $values = [ NULL, [], new StdClass, - new Stringable, + new StringCapable, fopen("data:text/plain,foobar", "r") ]; @@ -106,7 +106,7 @@ int(0) } *** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d -*** Trying object(Stringable)#%s (0) { +*** Trying object(StringCapable)#%s (0) { } *** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d @@ -160,7 +160,7 @@ float(0) } *** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d -*** Trying object(Stringable)#%s (0) { +*** Trying object(StringCapable)#%s (0) { } *** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d @@ -213,7 +213,7 @@ string(0) "" } *** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d -*** Trying object(Stringable)#%s (0) { +*** Trying object(StringCapable)#%s (0) { } string(6) "foobar" @@ -266,7 +266,7 @@ bool(false) } *** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d -*** Trying object(Stringable)#%s (0) { +*** Trying object(StringCapable)#%s (0) { } *** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_return_basic.phpt b/Zend/tests/type_declarations/scalar_return_basic.phpt index 9ee50f8457700..c0b0df6829678 100644 --- a/Zend/tests/type_declarations/scalar_return_basic.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic.phpt @@ -21,7 +21,7 @@ $functions = [ 'bool' => function ($b): bool { return $b; } ]; -class Stringable { +class StringCapable { public function __toString() { return "foobar"; } @@ -42,7 +42,7 @@ $values = [ NULL, [], new StdClass, - new Stringable, + new StringCapable, fopen("data:text/plain,foobar", "r") ]; @@ -94,7 +94,7 @@ int(0) *** Trying object(stdClass)#6 (0) { } *** Caught Return value of {closure}() must be of type int, object returned in %s on line %d -*** Trying object(Stringable)#7 (0) { +*** Trying object(StringCapable)#7 (0) { } *** Caught Return value of {closure}() must be of type int, object returned in %s on line %d *** Trying resource(5) of type (stream) @@ -132,7 +132,7 @@ float(0) *** Trying object(stdClass)#6 (0) { } *** Caught Return value of {closure}() must be of type float, object returned in %s on line %d -*** Trying object(Stringable)#7 (0) { +*** Trying object(StringCapable)#7 (0) { } *** Caught Return value of {closure}() must be of type float, object returned in %s on line %d *** Trying resource(5) of type (stream) @@ -169,7 +169,7 @@ string(0) "" *** Trying object(stdClass)#6 (0) { } *** Caught Return value of {closure}() must be of type string, object returned in %s on line %d -*** Trying object(Stringable)#7 (0) { +*** Trying object(StringCapable)#7 (0) { } string(6) "foobar" *** Trying resource(5) of type (stream) @@ -206,7 +206,7 @@ bool(false) *** Trying object(stdClass)#6 (0) { } *** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d -*** Trying object(Stringable)#7 (0) { +*** Trying object(StringCapable)#7 (0) { } *** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d *** Trying resource(5) of type (stream) diff --git a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt index ad987e58da596..5e387c45c8f26 100644 --- a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt @@ -21,7 +21,7 @@ $functions = [ 'bool' => function ($b): bool { return $b; } ]; -class Stringable { +class StringCapable { public function __toString() { return "foobar"; } @@ -42,7 +42,7 @@ $values = [ NULL, [], new StdClass, - new Stringable, + new StringCapable, fopen("data:text/plain,foobar", "r") ]; @@ -94,7 +94,7 @@ int(0) *** Trying object(stdClass)#6 (0) { } *** Caught Return value of {closure}() must be of type int, object returned in %s on line %d -*** Trying object(Stringable)#7 (0) { +*** Trying object(StringCapable)#7 (0) { } *** Caught Return value of {closure}() must be of type int, object returned in %s on line %d *** Trying resource(5) of type (stream) @@ -132,7 +132,7 @@ float(0) *** Trying object(stdClass)#6 (0) { } *** Caught Return value of {closure}() must be of type float, object returned in %s on line %d -*** Trying object(Stringable)#7 (0) { +*** Trying object(StringCapable)#7 (0) { } *** Caught Return value of {closure}() must be of type float, object returned in %s on line %d *** Trying resource(5) of type (stream) @@ -169,7 +169,7 @@ string(0) "" *** Trying object(stdClass)#6 (0) { } *** Caught Return value of {closure}() must be of type string, object returned in %s on line %d -*** Trying object(Stringable)#7 (0) { +*** Trying object(StringCapable)#7 (0) { } string(6) "foobar" *** Trying resource(5) of type (stream) @@ -206,7 +206,7 @@ bool(false) *** Trying object(stdClass)#6 (0) { } *** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d -*** Trying object(Stringable)#7 (0) { +*** Trying object(StringCapable)#7 (0) { } *** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d *** Trying resource(5) of type (stream) diff --git a/Zend/tests/type_declarations/scalar_strict.phpt b/Zend/tests/type_declarations/scalar_strict.phpt index 032fd3d3015be..3c420ed4551ba 100644 --- a/Zend/tests/type_declarations/scalar_strict.phpt +++ b/Zend/tests/type_declarations/scalar_strict.phpt @@ -13,7 +13,7 @@ $functions = [ 'bool' => function (bool $b) { return $b; } ]; -class Stringable { +class StringCapable { public function __toString() { return "foobar"; } @@ -34,7 +34,7 @@ $values = [ NULL, [], new StdClass, - new Stringable, + new StringCapable, fopen("data:text/plain,foobar", "r") ]; @@ -100,7 +100,7 @@ int(2147483647) } *** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d -*** Trying object(Stringable)#6 (0) { +*** Trying object(StringCapable)#6 (0) { } *** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d @@ -153,7 +153,7 @@ float(NAN) } *** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d -*** Trying object(Stringable)#6 (0) { +*** Trying object(StringCapable)#6 (0) { } *** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d @@ -206,7 +206,7 @@ string(0) "" } *** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d -*** Trying object(Stringable)#6 (0) { +*** Trying object(StringCapable)#6 (0) { } *** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d @@ -259,7 +259,7 @@ bool(false) } *** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d -*** Trying object(Stringable)#6 (0) { +*** Trying object(StringCapable)#6 (0) { } *** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_strict_64bit.phpt b/Zend/tests/type_declarations/scalar_strict_64bit.phpt index 5818606b4cfda..6f8504c16c639 100644 --- a/Zend/tests/type_declarations/scalar_strict_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_strict_64bit.phpt @@ -13,7 +13,7 @@ $functions = [ 'bool' => function (bool $b) { return $b; } ]; -class Stringable { +class StringCapable { public function __toString() { return "foobar"; } @@ -34,7 +34,7 @@ $values = [ NULL, [], new StdClass, - new Stringable, + new StringCapable, fopen("data:text/plain,foobar", "r") ]; @@ -100,7 +100,7 @@ int(9223372036854775807) } *** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d -*** Trying object(Stringable)#6 (0) { +*** Trying object(StringCapable)#6 (0) { } *** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d @@ -153,7 +153,7 @@ float(NAN) } *** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d -*** Trying object(Stringable)#6 (0) { +*** Trying object(StringCapable)#6 (0) { } *** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d @@ -206,7 +206,7 @@ string(0) "" } *** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d -*** Trying object(Stringable)#6 (0) { +*** Trying object(StringCapable)#6 (0) { } *** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d @@ -259,7 +259,7 @@ bool(false) } *** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d -*** Trying object(Stringable)#6 (0) { +*** Trying object(StringCapable)#6 (0) { } *** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index f7ba3acf9d0e0..cbf5ebfc02445 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5714,7 +5714,7 @@ static zend_bool zend_is_valid_default_value(zend_type type, zval *value) return 0; } -void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */ +void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fallback_return_type) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -5722,14 +5722,18 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */ zend_arg_info *arg_infos; zend_string *optional_param = NULL; - if (return_type_ast) { + if (return_type_ast || fallback_return_type) { /* Use op_array->arg_info[-1] for return type */ arg_infos = safe_emalloc(sizeof(zend_arg_info), list->children + 1, 0); arg_infos->name = NULL; - arg_infos->type = zend_compile_typename( - return_type_ast, /* force_allow_null */ 0, /* use_arena */ 0); - ZEND_TYPE_FULL_MASK(arg_infos->type) |= _ZEND_ARG_INFO_FLAGS( - (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0, /* is_variadic */ 0); + if (return_type_ast) { + arg_infos->type = zend_compile_typename( + return_type_ast, /* force_allow_null */ 0, /* use_arena */ 0); + ZEND_TYPE_FULL_MASK(arg_infos->type) |= _ZEND_ARG_INFO_FLAGS( + (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0, /* is_variadic */ 0); + } else { + arg_infos->type = (zend_type) ZEND_TYPE_INIT_CODE(fallback_return_type, 0, 0); + } arg_infos++; op_array->fn_flags |= ZEND_ACC_HAS_RETURN_TYPE; } else { @@ -6294,7 +6298,8 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* zend_stack_push(&CG(loop_var_stack), (void *) &dummy_var); } - zend_compile_params(params_ast, return_type_ast); + zend_compile_params(params_ast, return_type_ast, + is_method && zend_string_equals_literal_ci(decl->name, "__toString") ? IS_STRING : 0); if (CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) { zend_mark_function_as_generator(); zend_emit_op(NULL, ZEND_GENERATOR_CREATE, NULL, NULL); diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index f3846d326bbae..fb48d34bdf61b 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -763,7 +763,6 @@ static const zend_function_entry zend_funcs_throwable[] = { ZEND_ABSTRACT_ME(throwable, getTrace, arginfo_class_Throwable_getTrace) ZEND_ABSTRACT_ME(throwable, getPrevious, arginfo_class_Throwable_getPrevious) ZEND_ABSTRACT_ME(throwable, getTraceAsString, arginfo_class_Throwable_getTraceAsString) - ZEND_ABSTRACT_ME(throwable, __toString, arginfo_class_Throwable___toString) ZEND_FE_END }; /* }}} */ @@ -805,6 +804,7 @@ void zend_register_default_exception(void) /* {{{ */ zend_class_entry ce; REGISTER_MAGIC_INTERFACE(throwable, Throwable); + zend_class_implements(zend_ce_throwable, 1, zend_ce_stringable); memcpy(&default_exception_handlers, &std_object_handlers, sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; diff --git a/Zend/zend_exceptions.stub.php b/Zend/zend_exceptions.stub.php index 96d581caf97e4..12255df3f6eeb 100644 --- a/Zend/zend_exceptions.stub.php +++ b/Zend/zend_exceptions.stub.php @@ -1,6 +1,6 @@ ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; + zend_class_implements(reflection_type_ptr, 1, zend_ce_stringable); INIT_CLASS_ENTRY(_reflection_entry, "ReflectionNamedType", reflection_named_type_functions); reflection_init_class_handlers(&_reflection_entry); diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index dc6b7014737e1..05e1b0490de5e 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -10,10 +10,8 @@ class Reflection public static function getModifierNames(int $modifiers) {} } -interface Reflector +interface Reflector extends Stringable { - /** @return string */ - public function __toString(); } abstract class ReflectionFunctionAbstract implements Reflector @@ -101,8 +99,7 @@ class ReflectionFunction extends ReflectionFunctionAbstract /** @param string|Closure $name */ public function __construct($name) {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} /** @return bool */ public function isDisabled() {} @@ -143,8 +140,7 @@ class ReflectionMethod extends ReflectionFunctionAbstract /** @param object|string $class_or_method */ public function __construct($class_or_method, string $name = UNKNOWN) {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} /** @return bool */ public function isPublic() {} @@ -197,8 +193,7 @@ final private function __clone() {} /** @param object|string $argument */ public function __construct($argument) {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} /** @return string|false */ public function getName() {} @@ -367,8 +362,7 @@ final private function __clone() {} /** @param string|object $class */ public function __construct($class, string $name) {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} /** @return string|false */ public function getName() {} @@ -427,8 +421,7 @@ final private function __clone() {} /** @return string|object */ public function __construct($class, string $name) {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} /** @return string|false */ public function getName() {} @@ -464,8 +457,7 @@ final private function __clone() {} */ public function __construct($function, $parameter) {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} /** @return string|false */ public function getName() {} @@ -521,15 +513,14 @@ public function getDefaultValueConstantName() {} public function isVariadic() {} } -abstract class ReflectionType +abstract class ReflectionType implements Stringable { final private function __clone() {} /** @return bool */ public function allowsNull() {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} } class ReflectionNamedType extends ReflectionType @@ -552,8 +543,7 @@ final private function __clone() {} public function __construct(string $name) {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} /** @return string|false */ public function getName() {} @@ -595,8 +585,7 @@ final private function __clone() {} public function __construct(string $name) {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} /** @return string */ public function getName() {} diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 5f5079f59edf2..45ead8eaac9b5 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -4,68 +4,67 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflector___toString, 0, 0, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionFunctionAbstract___clone, 0, 0, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionFunctionAbstract___clone arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_inNamespace arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_inNamespace arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_isClosure arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_isClosure arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_isDeprecated arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_isDeprecated arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_isInternal arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_isInternal arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_isUserDefined arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_isUserDefined arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_isGenerator arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_isGenerator arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_isVariadic arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_isVariadic arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getClosureThis arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getClosureThis arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getClosureScopeClass arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getClosureScopeClass arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getDocComment arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getDocComment arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getEndLine arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getEndLine arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getExtension arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getExtension arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getExtensionName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getExtensionName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getFileName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getFileName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getNamespaceName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getNamespaceName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getNumberOfParameters arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getNumberOfParameters arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getNumberOfRequiredParameters arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getNumberOfRequiredParameters arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getParameters arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getParameters arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getShortName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getShortName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getStartLine arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getStartLine arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getStaticVariables arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_getStaticVariables arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_returnsReference arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_returnsReference arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_hasReturnType arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionFunctionAbstract_hasReturnType arginfo_class_Reflector___toString - -#define arginfo_class_ReflectionFunctionAbstract_getReturnType arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunctionAbstract_getReturnType arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionFunction___construct, 0, 0, 1) ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionFunction___toString arginfo_class_Reflector___toString +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionFunction___toString, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionFunction_isDisabled arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunction_isDisabled arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionFunction_invoke, 0, 0, 0) ZEND_ARG_VARIADIC_INFO(0, args) @@ -75,54 +74,54 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionFunction_invokeArgs, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionFunction_getClosure arginfo_class_Reflector___toString +#define arginfo_class_ReflectionFunction_getClosure arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionGenerator___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, generator, Generator, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionGenerator_getExecutingLine arginfo_class_Reflector___toString +#define arginfo_class_ReflectionGenerator_getExecutingLine arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionGenerator_getExecutingFile arginfo_class_Reflector___toString +#define arginfo_class_ReflectionGenerator_getExecutingFile arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionGenerator_getTrace, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionGenerator_getFunction arginfo_class_Reflector___toString +#define arginfo_class_ReflectionGenerator_getFunction arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionGenerator_getThis arginfo_class_Reflector___toString +#define arginfo_class_ReflectionGenerator_getThis arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionGenerator_getExecutingGenerator arginfo_class_Reflector___toString +#define arginfo_class_ReflectionGenerator_getExecutingGenerator arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod___construct, 0, 0, 1) ZEND_ARG_INFO(0, class_or_method) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionMethod___toString arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod___toString arginfo_class_ReflectionFunction___toString -#define arginfo_class_ReflectionMethod_isPublic arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_isPublic arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionMethod_isPrivate arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_isPrivate arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionMethod_isProtected arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_isProtected arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionMethod_isAbstract arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_isAbstract arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionMethod_isFinal arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_isFinal arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionMethod_isStatic arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_isStatic arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionMethod_isConstructor arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_isConstructor arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionMethod_isDestructor arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_isDestructor arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_getClosure, 0, 0, 0) ZEND_ARG_INFO(0, object) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionMethod_getModifiers arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_getModifiers arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_invoke, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 1) @@ -134,43 +133,43 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_invokeArgs, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionMethod_getDeclaringClass arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_getDeclaringClass arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionMethod_getPrototype arginfo_class_Reflector___toString +#define arginfo_class_ReflectionMethod_getPrototype arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_setAccessible, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, visible, _IS_BOOL, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionClass___clone arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass___clone arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass___construct, 0, 0, 1) ZEND_ARG_INFO(0, argument) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionClass___toString arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass___toString arginfo_class_ReflectionFunction___toString -#define arginfo_class_ReflectionClass_getName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isInternal arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isInternal arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isUserDefined arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isUserDefined arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isAnonymous arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isAnonymous arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isInstantiable arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isInstantiable arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isCloneable arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isCloneable arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getFileName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getFileName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getStartLine arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getStartLine arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getEndLine arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getEndLine arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getDocComment arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getDocComment arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getConstructor arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getConstructor arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_hasMethod, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) @@ -190,33 +189,33 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass_hasConstant arginfo_class_ReflectionClass_hasMethod -#define arginfo_class_ReflectionClass_getConstants arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getConstants arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getReflectionConstants arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getReflectionConstants arginfo_class_ReflectionFunctionAbstract___clone #define arginfo_class_ReflectionClass_getConstant arginfo_class_ReflectionClass_hasMethod #define arginfo_class_ReflectionClass_getReflectionConstant arginfo_class_ReflectionClass_hasMethod -#define arginfo_class_ReflectionClass_getInterfaces arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getInterfaces arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getInterfaceNames arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getInterfaceNames arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isInterface arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isInterface arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getTraits arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getTraits arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getTraitNames arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getTraitNames arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getTraitAliases arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getTraitAliases arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isTrait arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isTrait arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isAbstract arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isAbstract arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isFinal arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isFinal arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getModifiers arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getModifiers arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_isIntance, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) @@ -224,19 +223,19 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass_newInstance arginfo_class_ReflectionFunction_invoke -#define arginfo_class_ReflectionClass_newInstanceWithoutConstructor arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_newInstanceWithoutConstructor arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_newInstanceArgs, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionClass_getParentClass arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getParentClass arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_isSubclassOf, 0, 0, 1) ZEND_ARG_INFO(0, class) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionClass_getStaticProperties arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getStaticProperties arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_getStaticPropertyValue, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) @@ -248,40 +247,40 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_setStaticPropertyValue, 0, ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionClass_getDefaultProperties arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getDefaultProperties arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isIterable arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isIterable arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_isIterateable arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_isIterateable arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_implementsInterface, 0, 0, 1) ZEND_ARG_INFO(0, interface) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionClass_getExtension arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getExtension arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getExtensionName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getExtensionName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_inNamespace arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_inNamespace arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getNamespaceName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getNamespaceName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClass_getShortName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClass_getShortName arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionObject___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, argument, IS_OBJECT, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionProperty___clone arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty___clone arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionProperty___construct, 0, 0, 2) ZEND_ARG_INFO(0, class) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionProperty___toString arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty___toString arginfo_class_ReflectionFunction___toString -#define arginfo_class_ReflectionProperty_getName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_getName arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionProperty_getValue, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 1) @@ -294,156 +293,156 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionProperty_isInitialized arginfo_class_ReflectionProperty_getValue -#define arginfo_class_ReflectionProperty_isPublic arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_isPublic arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionProperty_isPrivate arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_isPrivate arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionProperty_isProtected arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_isProtected arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionProperty_isStatic arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_isStatic arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionProperty_isDefault arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_isDefault arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionProperty_getModifiers arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_getModifiers arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionProperty_getDeclaringClass arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_getDeclaringClass arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionProperty_getDocComment arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_getDocComment arginfo_class_ReflectionFunctionAbstract___clone #define arginfo_class_ReflectionProperty_setAccessible arginfo_class_ReflectionMethod_setAccessible -#define arginfo_class_ReflectionProperty_getType arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_getType arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionProperty_hasType arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_hasType arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionProperty_hasDefaultValue, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionProperty_getDefaultValue arginfo_class_Reflector___toString +#define arginfo_class_ReflectionProperty_getDefaultValue arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClassConstant___clone arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant___clone arginfo_class_ReflectionFunctionAbstract___clone #define arginfo_class_ReflectionClassConstant___construct arginfo_class_ReflectionProperty___construct -#define arginfo_class_ReflectionClassConstant___toString arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant___toString arginfo_class_ReflectionFunction___toString -#define arginfo_class_ReflectionClassConstant_getName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant_getName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClassConstant_getValue arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant_getValue arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClassConstant_isPublic arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant_isPublic arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClassConstant_isPrivate arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant_isPrivate arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClassConstant_isProtected arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant_isProtected arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClassConstant_getModifiers arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant_getModifiers arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClassConstant_getDeclaringClass arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant_getDeclaringClass arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionClassConstant_getDocComment arginfo_class_Reflector___toString +#define arginfo_class_ReflectionClassConstant_getDocComment arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter___clone arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter___clone arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionParameter___construct, 0, 0, 2) ZEND_ARG_INFO(0, function) ZEND_ARG_INFO(0, parameter) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionParameter___toString arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter___toString arginfo_class_ReflectionFunction___toString -#define arginfo_class_ReflectionParameter_getName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_getName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_isPassedByReference arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_isPassedByReference arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_canBePassedByValue arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_canBePassedByValue arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_getDeclaringFunction arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_getDeclaringFunction arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_getDeclaringClass arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_getDeclaringClass arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_getClass arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_getClass arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_hasType arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_hasType arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_getType arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_getType arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_isArray arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_isArray arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_isCallable arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_isCallable arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_allowsNull arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_allowsNull arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_getPosition arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_getPosition arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_isOptional arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_isOptional arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_isDefaultValueAvailable arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_isDefaultValueAvailable arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_getDefaultValue arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_getDefaultValue arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_isDefaultValueConstant arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_isDefaultValueConstant arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_getDefaultValueConstantName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_getDefaultValueConstantName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionParameter_isVariadic arginfo_class_Reflector___toString +#define arginfo_class_ReflectionParameter_isVariadic arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionType___clone arginfo_class_Reflector___toString +#define arginfo_class_ReflectionType___clone arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionType_allowsNull arginfo_class_Reflector___toString +#define arginfo_class_ReflectionType_allowsNull arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionType___toString arginfo_class_Reflector___toString +#define arginfo_class_ReflectionType___toString arginfo_class_ReflectionFunction___toString -#define arginfo_class_ReflectionNamedType_getName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionNamedType_getName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionNamedType_isBuiltin arginfo_class_Reflector___toString +#define arginfo_class_ReflectionNamedType_isBuiltin arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionUnionType_getTypes, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionExtension___clone arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension___clone arginfo_class_ReflectionFunctionAbstract___clone #define arginfo_class_ReflectionExtension___construct arginfo_class_ReflectionClass_hasMethod -#define arginfo_class_ReflectionExtension___toString arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension___toString arginfo_class_ReflectionFunction___toString -#define arginfo_class_ReflectionExtension_getName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_getName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_getVersion arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_getVersion arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_getFunctions arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_getFunctions arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_getConstants arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_getConstants arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_getINIEntries arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_getINIEntries arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_getClasses arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_getClasses arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_getClassNames arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_getClassNames arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_getDependencies arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_getDependencies arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_info arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_info arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_isPersistent arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_isPersistent arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionExtension_isTemporary arginfo_class_Reflector___toString +#define arginfo_class_ReflectionExtension_isTemporary arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionZendExtension___clone arginfo_class_Reflector___toString +#define arginfo_class_ReflectionZendExtension___clone arginfo_class_ReflectionFunctionAbstract___clone #define arginfo_class_ReflectionZendExtension___construct arginfo_class_ReflectionClass_hasMethod -#define arginfo_class_ReflectionZendExtension___toString arginfo_class_Reflector___toString +#define arginfo_class_ReflectionZendExtension___toString arginfo_class_ReflectionFunction___toString -#define arginfo_class_ReflectionZendExtension_getName arginfo_class_Reflector___toString +#define arginfo_class_ReflectionZendExtension_getName arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionZendExtension_getVersion arginfo_class_Reflector___toString +#define arginfo_class_ReflectionZendExtension_getVersion arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionZendExtension_getAuthor arginfo_class_Reflector___toString +#define arginfo_class_ReflectionZendExtension_getAuthor arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionZendExtension_getURL arginfo_class_Reflector___toString +#define arginfo_class_ReflectionZendExtension_getURL arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionZendExtension_getCopyright arginfo_class_Reflector___toString +#define arginfo_class_ReflectionZendExtension_getCopyright arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ReflectionReference_fromArrayElement, 0, 2, ReflectionReference, 1) ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0) @@ -453,6 +452,6 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionReference_getId, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ReflectionReference___clone arginfo_class_Reflector___toString +#define arginfo_class_ReflectionReference___clone arginfo_class_ReflectionFunctionAbstract___clone -#define arginfo_class_ReflectionReference___construct arginfo_class_Reflector___toString +#define arginfo_class_ReflectionReference___construct arginfo_class_ReflectionFunctionAbstract___clone diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt index 0aa46652b7b70..4eb82b96f3723 100644 --- a/ext/reflection/tests/ReflectionClass_toString_001.phpt +++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt @@ -9,7 +9,7 @@ $rc = new ReflectionClass("ReflectionClass"); echo $rc; ?> --EXPECT-- -Class [ class ReflectionClass implements Reflector ] { +Class [ class ReflectionClass implements Reflector, Stringable ] { - Constants [3] { Constant [ public int IS_IMPLICIT_ABSTRACT ] { 16 } @@ -41,10 +41,11 @@ Class [ class ReflectionClass implements Reflector ] { } } - Method [ public method __toString ] { + Method [ public method __toString ] { - Parameters [0] { } + - Return [ string ] } Method [ public method getName ] { diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 4e922e3ef0fbb..7a1a410c8ef23 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -2633,7 +2633,7 @@ PHP_MINIT_FUNCTION(simplexml) sxe.create_object = sxe_object_new; sxe_class_entry = zend_register_internal_class(&sxe); sxe_class_entry->get_iterator = php_sxe_get_iterator; - zend_class_implements(sxe_class_entry, 2, zend_ce_traversable, zend_ce_countable); + zend_class_implements(sxe_class_entry, 3, zend_ce_traversable, zend_ce_countable, zend_ce_stringable); memcpy(&sxe_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); sxe_object_handlers.offset = XtOffsetOf(php_sxe_object, zo); diff --git a/ext/simplexml/simplexml.stub.php b/ext/simplexml/simplexml.stub.php index 3a1d0d51f4e3e..f78694c1399e8 100644 --- a/ext/simplexml/simplexml.stub.php +++ b/ext/simplexml/simplexml.stub.php @@ -6,7 +6,7 @@ function simplexml_load_string(string $data, ?string $class_name = SimpleXMLElem function simplexml_import_dom(DOMNode $node, ?string $class_name = SimpleXMLElement::class): ?SimpleXMLElement {} -class SimpleXMLElement +class SimpleXMLElement implements Stringable { /** @return array|false */ public function xpath(string $path) {} @@ -43,8 +43,7 @@ public function addAttribute(string $name, ?string $value = null, ?string $ns = /** @return string */ public function getName() {} - /** @return string */ - public function __toString() {} + public function __toString(): string {} /** @return int */ public function count() {} diff --git a/ext/simplexml/simplexml_arginfo.h b/ext/simplexml/simplexml_arginfo.h index b44426beebf57..06b9941b2e65f 100644 --- a/ext/simplexml/simplexml_arginfo.h +++ b/ext/simplexml/simplexml_arginfo.h @@ -71,6 +71,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_getName, 0, 0, 0) ZEND_END_ARG_INFO() -#define arginfo_class_SimpleXMLElement___toString arginfo_class_SimpleXMLElement_getName +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SimpleXMLElement___toString, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() #define arginfo_class_SimpleXMLElement_count arginfo_class_SimpleXMLElement_getName diff --git a/ext/soap/soap.stub.php b/ext/soap/soap.stub.php index 15ea54f660b22..77070dccf75cb 100644 --- a/ext/soap/soap.stub.php +++ b/ext/soap/soap.stub.php @@ -18,8 +18,7 @@ class SoapFault extends Exception { function __construct($faultcode, string $faultstring, ?string $faultactor = null, $detail = null, ?string $faultname = null, $headerfault = null); - /** @return string */ - function __toString(); + function __toString(): string; } class SoapVar diff --git a/ext/soap/soap_arginfo.h b/ext/soap/soap_arginfo.h index 69079b82eb5ac..82f30e9e67f6d 100644 --- a/ext/soap/soap_arginfo.h +++ b/ext/soap/soap_arginfo.h @@ -30,7 +30,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapFault___construct, 0, 0, 2) ZEND_ARG_INFO(0, headerfault) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapFault___toString, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SoapFault___toString, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapVar___construct, 0, 0, 2) @@ -72,7 +72,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_setObject, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -#define arginfo_class_SoapServer_getFunctions arginfo_class_SoapFault___toString +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_getFunctions, 0, 0, 0) +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_addFunction, 0, 0, 1) ZEND_ARG_INFO(0, functions) @@ -97,17 +98,17 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___soapCall, 0, 0, 2) ZEND_ARG_INFO(0, output_headers) ZEND_END_ARG_INFO() -#define arginfo_class_SoapClient___getFunctions arginfo_class_SoapFault___toString +#define arginfo_class_SoapClient___getFunctions arginfo_class_SoapServer_getFunctions -#define arginfo_class_SoapClient___getTypes arginfo_class_SoapFault___toString +#define arginfo_class_SoapClient___getTypes arginfo_class_SoapServer_getFunctions -#define arginfo_class_SoapClient___getLastRequest arginfo_class_SoapFault___toString +#define arginfo_class_SoapClient___getLastRequest arginfo_class_SoapServer_getFunctions -#define arginfo_class_SoapClient___getLastResponse arginfo_class_SoapFault___toString +#define arginfo_class_SoapClient___getLastResponse arginfo_class_SoapServer_getFunctions -#define arginfo_class_SoapClient___getLastRequestHeaders arginfo_class_SoapFault___toString +#define arginfo_class_SoapClient___getLastRequestHeaders arginfo_class_SoapServer_getFunctions -#define arginfo_class_SoapClient___getLastResponseHeaders arginfo_class_SoapFault___toString +#define arginfo_class_SoapClient___getLastResponseHeaders arginfo_class_SoapServer_getFunctions ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___doRequest, 0, 0, 4) ZEND_ARG_TYPE_INFO(0, request, IS_STRING, 0) @@ -122,7 +123,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setCookie, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 1) ZEND_END_ARG_INFO() -#define arginfo_class_SoapClient___getCookies arginfo_class_SoapFault___toString +#define arginfo_class_SoapClient___getCookies arginfo_class_SoapServer_getFunctions ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setSoapHeaders, 0, 0, 0) ZEND_ARG_INFO(0, soapheaders) diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index eb2b320792558..4ebbdf9cf771d 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1899,6 +1899,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_splfileinfo_void, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_splfileinfo___toString, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() + /* the method table */ /* each method can have its own parameters and visibility */ static const zend_function_entry spl_SplFileInfo_functions[] = { @@ -1933,7 +1936,7 @@ static const zend_function_entry spl_SplFileInfo_functions[] = { SPL_ME(SplFileInfo, setFileClass, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) SPL_ME(SplFileInfo, setInfoClass, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) SPL_ME(SplFileInfo, _bad_state_ex, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - SPL_MA(SplFileInfo, __toString, SplFileInfo, getPathname, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) + SPL_MA(SplFileInfo, __toString, SplFileInfo, getPathname, arginfo_splfileinfo___toString, ZEND_ACC_PUBLIC) PHP_FE_END }; @@ -1959,7 +1962,7 @@ static const zend_function_entry spl_DirectoryIterator_functions[] = { SPL_ME(DirectoryIterator, current, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) SPL_ME(DirectoryIterator, next, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) SPL_ME(DirectoryIterator, seek, arginfo_dir_it_seek, ZEND_ACC_PUBLIC) - SPL_MA(DirectoryIterator, __toString, DirectoryIterator, getFilename, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) + SPL_MA(DirectoryIterator, __toString, DirectoryIterator, getFilename, arginfo_splfileinfo___toString, ZEND_ACC_PUBLIC) PHP_FE_END }; @@ -3072,7 +3075,7 @@ static const zend_function_entry spl_SplFileObject_functions[] = { SPL_ME(SplFileObject, seek, arginfo_file_object_seek, ZEND_ACC_PUBLIC) /* mappings */ SPL_MA(SplFileObject, getCurrentLine, SplFileObject, fgets, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) - SPL_MA(SplFileObject, __toString, SplFileObject, fgets, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) + SPL_MA(SplFileObject, __toString, SplFileObject, fgets, arginfo_splfileinfo___toString, ZEND_ACC_PUBLIC) PHP_FE_END }; @@ -3100,6 +3103,7 @@ PHP_MINIT_FUNCTION(spl_directory) spl_filesystem_object_handlers.free_obj = spl_filesystem_object_free_storage; spl_ce_SplFileInfo->serialize = zend_class_serialize_deny; spl_ce_SplFileInfo->unserialize = zend_class_unserialize_deny; + REGISTER_SPL_IMPLEMENTS(SplFileInfo, Stringable); REGISTER_SPL_SUB_CLASS_EX(DirectoryIterator, SplFileInfo, spl_filesystem_object_new, spl_DirectoryIterator_functions); diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 666f3ebf6485a..8aa35081e1b64 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -61,6 +61,9 @@ PHPAPI zend_class_entry *spl_ce_RecursiveTreeIterator; ZEND_BEGIN_ARG_INFO(arginfo_recursive_it_void, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_caching_it___toString, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() + static const zend_function_entry spl_funcs_RecursiveIterator[] = { SPL_ABSTRACT_ME(RecursiveIterator, hasChildren, arginfo_recursive_it_void) SPL_ABSTRACT_ME(RecursiveIterator, getChildren, arginfo_recursive_it_void) @@ -2942,7 +2945,7 @@ static const zend_function_entry spl_funcs_CachingIterator[] = { SPL_ME(dual_it, current, arginfo_recursive_it_void, ZEND_ACC_PUBLIC) SPL_ME(CachingIterator, next, arginfo_recursive_it_void, ZEND_ACC_PUBLIC) SPL_ME(CachingIterator, hasNext, arginfo_recursive_it_void, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, __toString, arginfo_recursive_it_void, ZEND_ACC_PUBLIC) + SPL_ME(CachingIterator, __toString, arginfo_caching_it___toString, ZEND_ACC_PUBLIC) SPL_ME(dual_it, getInnerIterator, arginfo_recursive_it_void, ZEND_ACC_PUBLIC) SPL_ME(CachingIterator, getFlags, arginfo_recursive_it_void, ZEND_ACC_PUBLIC) SPL_ME(CachingIterator, setFlags, arginfo_caching_it_setFlags, ZEND_ACC_PUBLIC) @@ -3662,6 +3665,7 @@ PHP_MINIT_FUNCTION(spl_iterators) REGISTER_SPL_SUB_CLASS_EX(CachingIterator, IteratorIterator, spl_dual_it_new, spl_funcs_CachingIterator); REGISTER_SPL_IMPLEMENTS(CachingIterator, ArrayAccess); REGISTER_SPL_IMPLEMENTS(CachingIterator, Countable); + REGISTER_SPL_IMPLEMENTS(CachingIterator, Stringable); REGISTER_SPL_CLASS_CONST_LONG(CachingIterator, "CALL_TOSTRING", CIT_CALL_TOSTRING); REGISTER_SPL_CLASS_CONST_LONG(CachingIterator, "CATCH_GET_CHILD", CIT_CATCH_GET_CHILD); diff --git a/ext/spl/spl_iterators.h b/ext/spl/spl_iterators.h index a3b02bf8bce91..5d890bb2b90ab 100644 --- a/ext/spl/spl_iterators.h +++ b/ext/spl/spl_iterators.h @@ -27,6 +27,7 @@ #define spl_ce_ArrayAccess zend_ce_arrayaccess #define spl_ce_Serializable zend_ce_serializable #define spl_ce_Countable zend_ce_countable +#define spl_ce_Stringable zend_ce_stringable extern PHPAPI zend_class_entry *spl_ce_RecursiveIterator; extern PHPAPI zend_class_entry *spl_ce_RecursiveIteratorIterator; diff --git a/ext/standard/tests/strings/strlen.phpt b/ext/standard/tests/strings/strlen.phpt index 6be163d8fe12a7452bd712eeacb622a51be14fa3..282db2da2d0bb29e5a481ee26162ca02f5cd8134 100644 GIT binary patch delta 36 jcmcbhe@%bG9(K;)lA_GKbmzo^$%oiO5WLMY99#GS5&sS9 delta 30 gcmcbne?fo49(K0klA_GK^vOrrL!ivfN*r7G0ms4&1poj5 diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt index 59162e18222a294f56eef199ddb1a13344cf73c2..76175363466a5c319b7c098c6657871430101551 100644 GIT binary patch delta 36 jcmaEC_tI{IB^PIKNl|8Ax^rT|WP7d<1aI?9u2Uia1kw%2 delta 36 ocmaE9_t=$JL8i)?5 delta 29 fcmZ4IwZdz|cQ&@-lA_GK^hxX?P}b&H_KUIrxfBb; diff --git a/ext/standard/tests/strings/ucfirst.phpt b/ext/standard/tests/strings/ucfirst.phpt index e7c0373a3cbda0e1d853ce741133e50b95e747cf..48fd772a04042b98d85a8fc8d409cce5bab795a3 100644 GIT binary patch delta 36 jcmX@3a!F-F0UKvNwi<2#0hSG@ delta 30 gcmcblaz class stdClass ] { } " -string(1969) "Class [ class Exception implements Throwable ] { +string(2008) "Class [ class Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -122,10 +122,11 @@ string(1969) "Class [ class Exception implements Throwable ] { } } - Method [ public method __toString ] { + Method [ public method __toString ] { - Parameters [0] { } + - Return [ string ] } } } diff --git a/tests/classes/tostring_001.phpt b/tests/classes/tostring_001.phpt index 3053da9140909..62791bf84e6b7 100644 --- a/tests/classes/tostring_001.phpt +++ b/tests/classes/tostring_001.phpt @@ -21,7 +21,7 @@ class test3 function __toString() { echo __METHOD__ . "()\n"; - return 42; + return []; } } echo "====test1====\n"; @@ -131,5 +131,5 @@ Converted object(test3)#2 (0) { } test3::__toString() -Method test3::__toString() must return a string value +Return value of test3::__toString() must be of type string, array returned ====DONE==== diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt index 987298baa5fea..e07a7b21217eb 100644 --- a/tests/classes/tostring_004.phpt +++ b/tests/classes/tostring_004.phpt @@ -29,7 +29,7 @@ try { echo "\n\nObject with bad __toString():\n"; class badToString { function __toString() { - return 0; + return []; } } @@ -62,8 +62,8 @@ Object of class stdClass could not be converted to string Object with bad __toString(): Try 1: -Method badToString::__toString() must return a string value +Return value of badToString::__toString() must be of type string, array returned Try 2: -Method badToString::__toString() must return a string value +Return value of badToString::__toString() must be of type string, array returned From 336eb48c36f3c1c115349307c18e6cf16ab003df Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 6 Feb 2020 10:27:30 +0100 Subject: [PATCH 132/201] Automatically implement Stringable interface --- UPGRADING | 2 ++ .../stringable_automatic_implementation.phpt | 35 +++++++++++++++++++ .../variance/stringable.phpt | 17 +++++++++ Zend/zend_compile.c | 27 +++++++++++--- .../tests/class_implements_variation1.phpt | 4 ++- 5 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 Zend/tests/stringable_automatic_implementation.phpt create mode 100644 Zend/tests/type_declarations/variance/stringable.phpt diff --git a/UPGRADING b/UPGRADING index 07d7f86f7c4a9..fcfb715622339 100644 --- a/UPGRADING +++ b/UPGRADING @@ -410,6 +410,8 @@ PHP 8.0 UPGRADE NOTES . Some consistency fixes to variable syntax have been applied, for example writing `Foo::BAR::$baz` is now allowed. RFC: https://wiki.php.net/rfc/variable_syntax_tweaks + . Added Stringable. + RFC: https://wiki.php.net/rfc/stringable - Date: . Added DateTime::createFromInterface() and diff --git a/Zend/tests/stringable_automatic_implementation.phpt b/Zend/tests/stringable_automatic_implementation.phpt new file mode 100644 index 0000000000000..5c45c03acbfa3 --- /dev/null +++ b/Zend/tests/stringable_automatic_implementation.phpt @@ -0,0 +1,35 @@ +--TEST-- +Stringable is automatically implemented +--FILE-- +getInterfaceNames()); + +class Test2 extends Test { + public function __toString() { + return "bar"; + } +} + +var_dump(new Test2 instanceof Stringable); +var_dump((new ReflectionClass(Test2::class))->getInterfaceNames()); + +?> +--EXPECT-- +bool(true) +array(1) { + [0]=> + string(10) "Stringable" +} +bool(true) +array(1) { + [0]=> + string(10) "Stringable" +} diff --git a/Zend/tests/type_declarations/variance/stringable.phpt b/Zend/tests/type_declarations/variance/stringable.phpt new file mode 100644 index 0000000000000..a132080106f9e --- /dev/null +++ b/Zend/tests/type_declarations/variance/stringable.phpt @@ -0,0 +1,17 @@ +--TEST-- +Automatic Stringable implementation participates in variance +--FILE-- + +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index cbf5ebfc02445..0abf274dbd25e 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6066,6 +6066,24 @@ static void zend_check_magic_method_attr(uint32_t attr, const char* method, zend } /* }}} */ +static void add_stringable_interface(zend_class_entry *ce) { + for (uint32_t i = 0; i < ce->num_interfaces; i++) { + if (zend_string_equals_literal(ce->interface_names[i].lc_name, "stringable")) { + /* Interface already explicitly implemented */ + return; + } + } + + ce->num_interfaces++; + ce->interface_names = + erealloc(ce->interface_names, sizeof(zend_class_name) * ce->num_interfaces); + // TODO: Add known interned strings instead? + ce->interface_names[ce->num_interfaces - 1].name = + zend_string_init("Stringable", sizeof("Stringable") - 1, 0); + ce->interface_names[ce->num_interfaces - 1].lc_name = + zend_string_init("stringable", sizeof("stringable") - 1, 0); +} + void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_bool has_body) /* {{{ */ { zend_class_entry *ce = CG(active_class_entry); @@ -6147,6 +6165,7 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo } else if (zend_string_equals_literal(lcname, ZEND_TOSTRING_FUNC_NAME)) { zend_check_magic_method_attr(fn_flags, "__toString", 0); ce->__tostring = (zend_function *) op_array; + add_stringable_interface(ce); } else if (zend_string_equals_literal(lcname, ZEND_INVOKE_FUNC_NAME)) { zend_check_magic_method_attr(fn_flags, "__invoke", 0); } else if (zend_string_equals_literal(lcname, ZEND_DEBUGINFO_FUNC_NAME)) { @@ -6680,6 +6699,10 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ CG(active_class_entry) = ce; + if (implements_ast) { + zend_compile_implements(implements_ast); + } + zend_compile_stmt(stmt_ast); /* Reset lineno for final opcodes and errors */ @@ -6719,10 +6742,6 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ } } - if (implements_ast) { - zend_compile_implements(implements_ast); - } - if ((ce->ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) == ZEND_ACC_IMPLICIT_ABSTRACT_CLASS) { zend_verify_abstract_class(ce); } diff --git a/ext/spl/tests/class_implements_variation1.phpt b/ext/spl/tests/class_implements_variation1.phpt index 65fbe1a58a60b..5c998c74944c8 100644 --- a/ext/spl/tests/class_implements_variation1.phpt +++ b/ext/spl/tests/class_implements_variation1.phpt @@ -184,7 +184,9 @@ Error: 2 - class_implements(): Class does not exist and could not be loaded, %s bool(false) --instance of classWithToString-- -array(0) { +array(1) { + ["Stringable"]=> + string(10) "Stringable" } --instance of classWithoutToString-- From a7400d5fd3337e3cc0067f5e50a65ba20377af4f Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 26 Feb 2020 16:56:57 +0100 Subject: [PATCH 133/201] Abstract over crypto operations --- ext/mysqlnd/mysqlnd_auth.c | 138 +++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 61 deletions(-) diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 14a65eed0dab0..42afe795bc577 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -699,15 +699,55 @@ mysqlnd_xor_string(char * dst, const size_t dst_len, const char * xor_str, const #include #include +typedef RSA * mysqlnd_rsa_t; + +/* {{{ mysqlnd_sha256_get_rsa_from_pem */ +static mysqlnd_rsa_t +mysqlnd_sha256_get_rsa_from_pem(const char *buf, size_t len) +{ + BIO * bio = BIO_new_mem_buf(buf, len); + RSA * ret = PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL); + BIO_free(bio); + return ret; +} +/* }}} */ + +/* {{{ mysqlnd_sha256_public_encrypt */ +static zend_uchar * +mysqlnd_sha256_public_encrypt(MYSQLND_CONN_DATA * conn, mysqlnd_rsa_t server_public_key, size_t passwd_len, size_t * auth_data_len, char *xor_str) +{ + zend_uchar * ret = NULL; + size_t server_public_key_len = (size_t) RSA_size(server_public_key); + + DBG_ENTER("mysqlnd_sha256_public_encrypt"); + /* + Because RSA_PKCS1_OAEP_PADDING is used there is a restriction on the passwd_len. + RSA_PKCS1_OAEP_PADDING is recommended for new applications. See more here: + http://www.openssl.org/docs/crypto/RSA_public_encrypt.html + */ + if (server_public_key_len <= passwd_len + 41) { + /* password message is to long */ + SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long"); + DBG_ERR("password is too long"); + DBG_RETURN(NULL); + } + + *auth_data_len = server_public_key_len; + ret = malloc(*auth_data_len); + RSA_public_encrypt(passwd_len + 1, (zend_uchar *) xor_str, ret, server_public_key, RSA_PKCS1_OAEP_PADDING); + RSA_free(server_public_key); + DBG_RETURN(ret); +} +/* }}} */ /* {{{ mysqlnd_sha256_get_rsa_key */ -static RSA * +static mysqlnd_rsa_t mysqlnd_sha256_get_rsa_key(MYSQLND_CONN_DATA * conn, const MYSQLND_SESSION_OPTIONS * const session_options, const MYSQLND_PFC_DATA * const pfc_data ) { - RSA * ret = NULL; + mysqlnd_rsa_t ret = NULL; const char * fname = (pfc_data->sha256_server_public_key && pfc_data->sha256_server_public_key[0] != '\0')? pfc_data->sha256_server_public_key: MYSQLND_G(sha256_server_public_key); @@ -739,11 +779,7 @@ mysqlnd_sha256_get_rsa_key(MYSQLND_CONN_DATA * conn, } DBG_INF_FMT("Public key(%d):\n%s", pk_resp_packet.public_key_len, pk_resp_packet.public_key); /* now extract the public key */ - { - BIO * bio = BIO_new_mem_buf(pk_resp_packet.public_key, pk_resp_packet.public_key_len); - ret = PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL); - BIO_free(bio); - } + ret = mysqlnd_sha256_get_rsa_from_pem((const char *) pk_resp_packet.public_key, pk_resp_packet.public_key_len); } while (0); PACKET_FREE(&pk_req_packet); PACKET_FREE(&pk_resp_packet); @@ -762,9 +798,7 @@ mysqlnd_sha256_get_rsa_key(MYSQLND_CONN_DATA * conn, if (stream) { if ((key_str = php_stream_copy_to_mem(stream, PHP_STREAM_COPY_ALL, 0)) != NULL) { - BIO * bio = BIO_new_mem_buf(ZSTR_VAL(key_str), ZSTR_LEN(key_str)); - ret = PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL); - BIO_free(bio); + ret = mysqlnd_sha256_get_rsa_from_pem(ZSTR_VAL(key_str), ZSTR_LEN(key_str)); DBG_INF("Successfully loaded"); DBG_INF_FMT("Public key:%*.s", ZSTR_LEN(key_str), ZSTR_VAL(key_str)); zend_string_release_ex(key_str, 0); @@ -788,7 +822,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self const zend_ulong mysql_flags ) { - RSA * server_public_key; + mysqlnd_rsa_t server_public_key; zend_uchar * ret = NULL; DBG_ENTER("mysqlnd_sha256_auth_get_auth_data"); DBG_INF_FMT("salt(%d)=[%.*s]", auth_plugin_data_len, auth_plugin_data_len, auth_plugin_data); @@ -805,31 +839,12 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self server_public_key = mysqlnd_sha256_get_rsa_key(conn, session_options, pfc_data); if (server_public_key) { - int server_public_key_len; ALLOCA_FLAG(use_heap); char *xor_str = do_alloca(passwd_len + 1, use_heap); memcpy(xor_str, passwd, passwd_len); xor_str[passwd_len] = '\0'; mysqlnd_xor_string(xor_str, passwd_len, (char *) auth_plugin_data, auth_plugin_data_len); - - server_public_key_len = RSA_size(server_public_key); - /* - Because RSA_PKCS1_OAEP_PADDING is used there is a restriction on the passwd_len. - RSA_PKCS1_OAEP_PADDING is recommended for new applications. See more here: - http://www.openssl.org/docs/crypto/RSA_public_encrypt.html - */ - if ((size_t) server_public_key_len - 41 <= passwd_len) { - /* password message is to long */ - free_alloca(xor_str, use_heap); - SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long"); - DBG_ERR("password is too long"); - DBG_RETURN(NULL); - } - - *auth_data_len = server_public_key_len; - ret = malloc(*auth_data_len); - RSA_public_encrypt(passwd_len + 1, (zend_uchar *) xor_str, ret, server_public_key, RSA_PKCS1_OAEP_PADDING); - RSA_free(server_public_key); + ret = mysqlnd_sha256_public_encrypt(conn, server_public_key, passwd_len, auth_data_len, xor_str); free_alloca(xor_str, use_heap); } } @@ -901,6 +916,30 @@ void php_mysqlnd_scramble_sha2(zend_uchar * const buffer, const zend_uchar * con } /* }}} */ +/* {{{ mysqlnd_caching_sha2_public_encrypt */ +static size_t +mysqlnd_caching_sha2_public_encrypt(MYSQLND_CONN_DATA * conn, mysqlnd_rsa_t server_public_key, size_t passwd_len, unsigned char **crypted, char *xor_str) +{ + size_t server_public_key_len = (size_t) RSA_size(server_public_key); + + DBG_ENTER("mysqlnd_caching_sha2_public_encrypt"); + /* + Because RSA_PKCS1_OAEP_PADDING is used there is a restriction on the passwd_len. + RSA_PKCS1_OAEP_PADDING is recommended for new applications. See more here: + http://www.openssl.org/docs/crypto/RSA_public_encrypt.html + */ + if (server_public_key_len <= passwd_len + 41) { + /* password message is to long */ + SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long"); + DBG_ERR("password is too long"); + DBG_RETURN(0); + } + + *crypted = emalloc(server_public_key_len); + RSA_public_encrypt(passwd_len + 1, (zend_uchar *) xor_str, *crypted, server_public_key, RSA_PKCS1_OAEP_PADDING); + DBG_RETURN(server_public_key_len); +} +/* }}} */ /* {{{ mysqlnd_native_auth_get_auth_data */ static zend_uchar * @@ -938,10 +977,10 @@ mysqlnd_caching_sha2_get_auth_data(struct st_mysqlnd_authentication_plugin * sel } /* }}} */ -static RSA * +static mysqlnd_rsa_t mysqlnd_caching_sha2_get_key(MYSQLND_CONN_DATA *conn) { - RSA * ret = NULL; + mysqlnd_rsa_t ret = NULL; const MYSQLND_PFC_DATA * const pfc_data = conn->protocol_frame_codec->data; const char * fname = (pfc_data->sha256_server_public_key && pfc_data->sha256_server_public_key[0] != '\0')? pfc_data->sha256_server_public_key: @@ -975,11 +1014,7 @@ mysqlnd_caching_sha2_get_key(MYSQLND_CONN_DATA *conn) } DBG_INF_FMT("Public key(%d):\n%s", pk_resp_packet.public_key_len, pk_resp_packet.public_key); /* now extract the public key */ - { - BIO * bio = BIO_new_mem_buf(pk_resp_packet.public_key, pk_resp_packet.public_key_len); - ret = PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL); - BIO_free(bio); - } + ret = mysqlnd_sha256_get_rsa_from_pem((const char *) pk_resp_packet.public_key, pk_resp_packet.public_key_len); } while (0); PACKET_FREE(&req_packet); PACKET_FREE(&pk_resp_packet); @@ -998,9 +1033,7 @@ mysqlnd_caching_sha2_get_key(MYSQLND_CONN_DATA *conn) if (stream) { if ((key_str = php_stream_copy_to_mem(stream, PHP_STREAM_COPY_ALL, 0)) != NULL) { - BIO * bio = BIO_new_mem_buf(ZSTR_VAL(key_str), ZSTR_LEN(key_str)); - ret = PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL); - BIO_free(bio); + ret = mysqlnd_sha256_get_rsa_from_pem(ZSTR_VAL(key_str), ZSTR_LEN(key_str)); DBG_INF("Successfully loaded"); DBG_INF_FMT("Public key:%*.s", ZSTR_LEN(key_str), ZSTR_VAL(key_str)); zend_string_release(key_str); @@ -1013,7 +1046,7 @@ mysqlnd_caching_sha2_get_key(MYSQLND_CONN_DATA *conn) } -/* {{{ mysqlnd_caching_sha2_get_key */ +/* {{{ mysqlnd_caching_sha2_get_and_use_key */ static size_t mysqlnd_caching_sha2_get_and_use_key(MYSQLND_CONN_DATA *conn, const zend_uchar * auth_plugin_data, const size_t auth_plugin_data_len, @@ -1021,8 +1054,7 @@ mysqlnd_caching_sha2_get_and_use_key(MYSQLND_CONN_DATA *conn, const char * const passwd, const size_t passwd_len) { - static RSA *server_public_key; - server_public_key = mysqlnd_caching_sha2_get_key(conn); + mysqlnd_rsa_t server_public_key = mysqlnd_caching_sha2_get_key(conn); DBG_ENTER("mysqlnd_caching_sha2_get_and_use_key("); @@ -1033,23 +1065,7 @@ mysqlnd_caching_sha2_get_and_use_key(MYSQLND_CONN_DATA *conn, memcpy(xor_str, passwd, passwd_len); xor_str[passwd_len] = '\0'; mysqlnd_xor_string(xor_str, passwd_len, (char *) auth_plugin_data, SCRAMBLE_LENGTH); - - server_public_key_len = RSA_size(server_public_key); - /* - Because RSA_PKCS1_OAEP_PADDING is used there is a restriction on the passwd_len. - RSA_PKCS1_OAEP_PADDING is recommended for new applications. See more here: - http://www.openssl.org/docs/crypto/RSA_public_encrypt.html - */ - if ((size_t) server_public_key_len - 41 <= passwd_len) { - /* password message is to long */ - free_alloca(xor_str, use_heap); - SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long"); - DBG_ERR("password is too long"); - DBG_RETURN(0); - } - - *crypted = emalloc(server_public_key_len); - RSA_public_encrypt(passwd_len + 1, (zend_uchar *) xor_str, *crypted, server_public_key, RSA_PKCS1_OAEP_PADDING); + server_public_key_len = mysqlnd_caching_sha2_public_encrypt(conn, server_public_key, passwd_len, crypted, xor_str); free_alloca(xor_str, use_heap); DBG_RETURN(server_public_key_len); } From a0377021c5640cd6e6ad719a76dd38f91f7c367b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 26 Feb 2020 17:01:37 +0100 Subject: [PATCH 134/201] Native Windows support for mysqlnd sha256 authentification We implement that on top of Cryptography API: Next Generation (CNG). --- NEWS | 4 ++ ext/mysqlnd/config.w32 | 3 + ext/mysqlnd/mysqlnd_auth.c | 129 +++++++++++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+) diff --git a/NEWS b/NEWS index 20764cc5be949..16802c2ea80e8 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,10 @@ PHP NEWS - MySQLi: . Fixed bug #64032 (mysqli reports different client_version). (cmb) +- MySQLnd: + . Implemented FR #79275 (Support auth_plugin_caching_sha2_password on + Windows). (cmb) + - Opcache: . Fixed bug #79252 (preloading causes php-fpm to segfault during exit). (Nikita) diff --git a/ext/mysqlnd/config.w32 b/ext/mysqlnd/config.w32 index 1dac93578a497..5f191297d1196 100644 --- a/ext/mysqlnd/config.w32 +++ b/ext/mysqlnd/config.w32 @@ -36,6 +36,9 @@ if (PHP_MYSQLND != "no") { { AC_DEFINE("MYSQLND_COMPRESSION_ENABLED", 1, "Compression support"); AC_DEFINE("MYSQLND_SSL_SUPPORTED", 1, "SSL support"); + if (CHECK_LIB("crypt32.lib", "mysqlnd")) { + AC_DEFINE("MYSQLND_HAVE_SSL", 1, "Extended SSL support"); + } } PHP_INSTALL_HEADERS("", "ext/mysqlnd"); } diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 42afe795bc577..fa156fa0e1fb6 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -694,6 +694,7 @@ mysqlnd_xor_string(char * dst, const size_t dst_len, const char * xor_str, const } } +#ifndef PHP_WIN32 #include #include @@ -740,6 +741,91 @@ mysqlnd_sha256_public_encrypt(MYSQLND_CONN_DATA * conn, mysqlnd_rsa_t server_pub } /* }}} */ +#else + +#include +#include + +typedef HANDLE mysqlnd_rsa_t; + +/* {{{ mysqlnd_sha256_get_rsa_from_pem */ +static mysqlnd_rsa_t +mysqlnd_sha256_get_rsa_from_pem(const char *buf, size_t len) +{ + BCRYPT_KEY_HANDLE ret = 0; + LPCSTR der_buf = NULL; + DWORD der_len; + CERT_PUBLIC_KEY_INFO *key_info = NULL; + DWORD key_info_len; + ALLOCA_FLAG(use_heap); + + if (!CryptStringToBinaryA(buf, len, CRYPT_STRING_BASE64HEADER, NULL, &der_len, NULL, NULL)) { + goto finish; + } + der_buf = do_alloca(der_len, use_heap); + if (!CryptStringToBinaryA(buf, len, CRYPT_STRING_BASE64HEADER, der_buf, &der_len, NULL, NULL)) { + goto finish; + } + if (!CryptDecodeObjectEx(X509_ASN_ENCODING, X509_PUBLIC_KEY_INFO, der_buf, der_len, CRYPT_ENCODE_ALLOC_FLAG, NULL, &key_info, &key_info_len)) { + goto finish; + } + if (!CryptImportPublicKeyInfoEx2(X509_ASN_ENCODING, key_info, CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG, NULL, &ret)) { + goto finish; + } + +finish: + if (key_info) { + LocalFree(key_info); + } + if (der_buf) { + free_alloca(der_buf, use_heap); + } + return (mysqlnd_rsa_t) ret; +} +/* }}} */ + +/* {{{ mysqlnd_sha256_public_encrypt */ +static zend_uchar * +mysqlnd_sha256_public_encrypt(MYSQLND_CONN_DATA * conn, mysqlnd_rsa_t server_public_key, size_t passwd_len, size_t * auth_data_len, char *xor_str) +{ + zend_uchar * ret = NULL; + DWORD server_public_key_len = passwd_len; + BCRYPT_OAEP_PADDING_INFO padding_info; + + DBG_ENTER("mysqlnd_sha256_public_encrypt"); + + ZeroMemory(&padding_info, sizeof padding_info); + padding_info.pszAlgId = BCRYPT_SHA1_ALGORITHM; + if (BCryptEncrypt((BCRYPT_KEY_HANDLE) server_public_key, xor_str, passwd_len + 1, &padding_info, + NULL, 0, NULL, 0, &server_public_key_len, BCRYPT_PAD_OAEP)) { + DBG_RETURN(0); + } + + /* + Because RSA_PKCS1_OAEP_PADDING is used there is a restriction on the passwd_len. + RSA_PKCS1_OAEP_PADDING is recommended for new applications. See more here: + http://www.openssl.org/docs/crypto/RSA_public_encrypt.html + */ + if ((size_t) server_public_key_len <= passwd_len + 41) { + /* password message is to long */ + SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long"); + DBG_ERR("password is too long"); + DBG_RETURN(0); + } + + *auth_data_len = server_public_key_len; + ret = malloc(*auth_data_len); + if (BCryptEncrypt((BCRYPT_KEY_HANDLE) server_public_key, xor_str, passwd_len + 1, &padding_info, + NULL, 0, ret, server_public_key_len, &server_public_key_len, BCRYPT_PAD_OAEP)) { + DBG_RETURN(0); + } + BCryptDestroyKey((BCRYPT_KEY_HANDLE) server_public_key); + DBG_RETURN(ret); +} +/* }}} */ + +#endif + /* {{{ mysqlnd_sha256_get_rsa_key */ static mysqlnd_rsa_t mysqlnd_sha256_get_rsa_key(MYSQLND_CONN_DATA * conn, @@ -916,6 +1002,8 @@ void php_mysqlnd_scramble_sha2(zend_uchar * const buffer, const zend_uchar * con } /* }}} */ +#ifndef PHP_WIN32 + /* {{{ mysqlnd_caching_sha2_public_encrypt */ static size_t mysqlnd_caching_sha2_public_encrypt(MYSQLND_CONN_DATA * conn, mysqlnd_rsa_t server_public_key, size_t passwd_len, unsigned char **crypted, char *xor_str) @@ -941,6 +1029,47 @@ mysqlnd_caching_sha2_public_encrypt(MYSQLND_CONN_DATA * conn, mysqlnd_rsa_t serv } /* }}} */ +#else + +/* {{{ mysqlnd_caching_sha2_public_encrypt */ +static size_t +mysqlnd_caching_sha2_public_encrypt(MYSQLND_CONN_DATA * conn, mysqlnd_rsa_t server_public_key, size_t passwd_len, unsigned char **crypted, char *xor_str) +{ + DWORD server_public_key_len = passwd_len; + BCRYPT_OAEP_PADDING_INFO padding_info; + + DBG_ENTER("mysqlnd_caching_sha2_public_encrypt"); + + ZeroMemory(&padding_info, sizeof padding_info); + padding_info.pszAlgId = BCRYPT_SHA1_ALGORITHM; + if (BCryptEncrypt((BCRYPT_KEY_HANDLE) server_public_key, xor_str, passwd_len + 1, &padding_info, + NULL, 0, NULL, 0, &server_public_key_len, BCRYPT_PAD_OAEP)) { + DBG_RETURN(0); + } + + /* + Because RSA_PKCS1_OAEP_PADDING is used there is a restriction on the passwd_len. + RSA_PKCS1_OAEP_PADDING is recommended for new applications. See more here: + http://www.openssl.org/docs/crypto/RSA_public_encrypt.html + */ + if ((size_t) server_public_key_len <= passwd_len + 41) { + /* password message is to long */ + SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long"); + DBG_ERR("password is too long"); + DBG_RETURN(0); + } + + *crypted = emalloc(server_public_key_len); + if (BCryptEncrypt((BCRYPT_KEY_HANDLE) server_public_key, xor_str, passwd_len + 1, &padding_info, + NULL, 0, *crypted, server_public_key_len, &server_public_key_len, BCRYPT_PAD_OAEP)) { + DBG_RETURN(0); + } + DBG_RETURN(server_public_key_len); +} +/* }}} */ + +#endif + /* {{{ mysqlnd_native_auth_get_auth_data */ static zend_uchar * mysqlnd_caching_sha2_get_auth_data(struct st_mysqlnd_authentication_plugin * self, From c932db865450112b7ce0b80d2cf8acb5e4da9cb1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 2 Mar 2020 16:47:47 +0100 Subject: [PATCH 135/201] add myself as zip maintainer --- EXTENSIONS | 1 + 1 file changed, 1 insertion(+) diff --git a/EXTENSIONS b/EXTENSIONS index e32c6da0df985..212eaf8c9920e 100644 --- a/EXTENSIONS +++ b/EXTENSIONS @@ -510,6 +510,7 @@ STATUS: Working ------------------------------------------------------------------------------- EXTENSION: zip PRIMARY MAINTAINER: Pierre-Alain Joye (2006 - 2011) + Remi Collet (2013-2020) MAINTENANCE: Maintained STATUS: Working ------------------------------------------------------------------------------- From fb8e2219074e425116977943bf3b495ad06be29c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 28 Feb 2020 15:51:33 +0100 Subject: [PATCH 136/201] - add ZipArchive::FL_RECOMPRESS, FL_ENCRYPTED, FL_OVERWRITE, FL_LOCAL, FL_CENTRAL constants - add optional "flags" parameter to ZipArchive::addEmptyDir, addFile and addFromString methods - add "flags" options to ZipArchive::addGlob and addPattern methods keeping previous behavior having FL_OVERWRITE by default - add ZipArchive::replaceFile() method --- ext/zip/php_zip.c | 139 ++++++++++++++++++-------- ext/zip/php_zip.stub.php | 9 +- ext/zip/php_zip_arginfo.h | 11 ++ ext/zip/tests/oo_add_encoding.phpt | 48 +++++++++ ext/zip/tests/oo_add_from_string.phpt | 58 +++++++++++ ext/zip/tests/oo_addglob.phpt | 16 ++- ext/zip/tests/oo_addpattern.phpt | 12 ++- ext/zip/tests/oo_replacefile.phpt | 54 ++++++++++ ext/zip/tests/utils.inc | 7 ++ 9 files changed, 305 insertions(+), 49 deletions(-) create mode 100644 ext/zip/tests/oo_add_encoding.phpt create mode 100644 ext/zip/tests/oo_add_from_string.phpt create mode 100644 ext/zip/tests/oo_replacefile.phpt diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index e2be7fc668579..dce9cb8a27503 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -276,7 +276,11 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, size_t /* }}} */ static int php_zip_add_file(struct zip *za, const char *filename, size_t filename_len, - char *entry_name, size_t entry_name_len, long offset_start, long offset_len) /* {{{ */ + char *entry_name, size_t entry_name_len, /* unused if replace >= 0 */ + zip_uint64_t offset_start, zip_uint64_t offset_len, + zend_long replace, /* index to replace, add new file if < 0 */ + zip_flags_t flags +) /* {{{ */ { struct zip_source *zs; char resolved_path[MAXPATHLEN]; @@ -300,17 +304,30 @@ static int php_zip_add_file(struct zip *za, const char *filename, size_t filenam if (!zs) { return -1; } - if (zip_file_add(za, entry_name, zs, ZIP_FL_OVERWRITE) < 0) { - zip_source_free(zs); - return -1; - } else { + // Replace + if (replace >= 0) { + if (zip_file_replace(za, replace, zs, flags) < 0) { + zip_source_free(zs); + return -1; + } zip_error_clear(za); return 1; } + // Add + if (zip_file_add(za, entry_name, zs, flags) < 0) { + zip_source_free(zs); + return -1; + } + zip_error_clear(za); + return 1; } /* }}} */ -static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char **remove_path, size_t *remove_path_len, char **add_path, size_t *add_path_len) /* {{{ */ +static int php_zip_parse_options(zval *options, zend_long *remove_all_path, + char **remove_path, size_t *remove_path_len, + char **add_path, size_t *add_path_len, + zend_long *flags +) /* {{{ */ { zval *option; if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) { @@ -357,6 +374,15 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char *add_path_len = Z_STRLEN_P(option); *add_path = Z_STRVAL_P(option); } + + if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "flags", sizeof("flags") - 1)) != NULL) { + if (Z_TYPE_P(option) != IS_LONG) { + php_error_docref(NULL, E_WARNING, "flags option expected to be a integer"); + return -1; + } + *flags = Z_LVAL_P(option); + } + return 1; } /* }}} */ @@ -1545,7 +1571,7 @@ static ZIPARCHIVE_METHOD(getStatusString) } /* }}} */ -/* {{{ proto bool ZipArchive::createEmptyDir(string dirname) +/* {{{ proto bool ZipArchive::addEmptyDir(string dirname [, bool flags = 0]) Returns the index of the entry named filename in the archive */ static ZIPARCHIVE_METHOD(addEmptyDir) { @@ -1556,11 +1582,12 @@ static ZIPARCHIVE_METHOD(addEmptyDir) int idx; struct zip_stat sb; char *s; + zend_long flags = 0; ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", - &dirname, &dirname_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", + &dirname, &dirname_len, &flags) == FAILURE) { RETURN_THROWS(); } @@ -1581,7 +1608,7 @@ static ZIPARCHIVE_METHOD(addEmptyDir) if (idx >= 0) { RETVAL_FALSE; } else { - if (zip_dir_add(intern, (const char *)s, 0) == -1) { + if (zip_dir_add(intern, (const char *)s, flags) == -1) { RETVAL_FALSE; } else { zip_error_clear(intern); @@ -1604,7 +1631,8 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* char *add_path = NULL; size_t add_path_len, remove_path_len = 0, path_len = 1; zend_long remove_all_path = 0; - zend_long flags = 0; + zend_long glob_flags = 0; + zend_long zip_flags = ZIP_FL_OVERWRITE; zval *options = NULL; int found; zend_string *pattern; @@ -1613,7 +1641,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* /* 1 == glob, 2 == pcre */ if (type == 1) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|la", - &pattern, &flags, &options) == FAILURE) { + &pattern, &glob_flags, &options) == FAILURE) { RETURN_THROWS(); } } else { @@ -1628,7 +1656,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* RETURN_FALSE; } if (options && (php_zip_parse_options(options, &remove_all_path, &remove_path, &remove_path_len, - &add_path, &add_path_len) < 0)) { + &add_path, &add_path_len, &zip_flags) < 0)) { RETURN_FALSE; } @@ -1642,7 +1670,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* } if (type == 1) { - found = php_zip_glob(ZSTR_VAL(pattern), ZSTR_LEN(pattern), flags, return_value); + found = php_zip_glob(ZSTR_VAL(pattern), ZSTR_LEN(pattern), glob_flags, return_value); } else { found = php_zip_pcre(pattern, path, path_len, return_value); } @@ -1690,7 +1718,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* } if (php_zip_add_file(intern, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file), - entry_name, entry_name_len, 0, 0) < 0) { + entry_name, entry_name_len, 0, 0, -1, zip_flags) < 0) { zend_array_destroy(Z_ARR_P(return_value)); RETURN_FALSE; } @@ -1719,7 +1747,7 @@ static ZIPARCHIVE_METHOD(addPattern) } /* }}} */ -/* {{{ proto bool ZipArchive::addFile(string filepath[, string entryname[, int start [, int length]]]) +/* {{{ proto bool ZipArchive::addFile(string filepath[, string entryname[, int start [, int length [, int flags = FL_OVERWRITE]]]]) Add a file in a Zip archive using its path and the name to use. */ static ZIPARCHIVE_METHOD(addFile) { @@ -1729,11 +1757,12 @@ static ZIPARCHIVE_METHOD(addFile) size_t entry_name_len = 0; zend_long offset_start = 0, offset_len = 0; zend_string *filename; + zend_long flags = ZIP_FL_OVERWRITE; ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|sll", - &filename, &entry_name, &entry_name_len, &offset_start, &offset_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|slll", + &filename, &entry_name, &entry_name_len, &offset_start, &offset_len, &flags) == FAILURE) { RETURN_THROWS(); } @@ -1748,7 +1777,44 @@ static ZIPARCHIVE_METHOD(addFile) } if (php_zip_add_file(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), - entry_name, entry_name_len, offset_start, offset_len) < 0) { + entry_name, entry_name_len, offset_start, offset_len, -1, flags) < 0) { + RETURN_FALSE; + } else { + RETURN_TRUE; + } +} +/* }}} */ + +/* {{{ proto bool ZipArchive::replaceFile(string filepath, int index[, int start [, int length [, int flags = 0]]]) +Add a file in a Zip archive using its path and the name to use. */ +static ZIPARCHIVE_METHOD(replaceFile) +{ + struct zip *intern; + zval *self = ZEND_THIS; + zend_long index; + zend_long offset_start = 0, offset_len = 0; + zend_string *filename; + zend_long flags = ZIP_FL_OVERWRITE; + + ZIP_FROM_OBJECT(intern, self); + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Pl|lll", + &filename, &index, &offset_start, &offset_len, &flags) == FAILURE) { + RETURN_THROWS(); + } + + if (ZSTR_LEN(filename) == 0) { + php_error_docref(NULL, E_NOTICE, "Empty string as filename"); + RETURN_FALSE; + } + + if (index < 0) { + php_error_docref(NULL, E_NOTICE, "Invalid negative index"); + RETURN_FALSE; + } + + if (php_zip_add_file(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), + NULL, 0, offset_start, offset_len, index, flags) < 0) { RETURN_FALSE; } else { RETURN_TRUE; @@ -1756,7 +1822,7 @@ static ZIPARCHIVE_METHOD(addFile) } /* }}} */ -/* {{{ proto bool ZipArchive::addFromString(string name, string content) +/* {{{ proto bool ZipArchive::addFromString(string name, string content [, int flags = FL_OVERWRITE]) Add a file using content and the entry name */ static ZIPARCHIVE_METHOD(addFromString) { @@ -1768,12 +1834,12 @@ static ZIPARCHIVE_METHOD(addFromString) ze_zip_object *ze_obj; struct zip_source *zs; int pos = 0; - int cur_idx; + zend_long flags = ZIP_FL_OVERWRITE; ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", - &name, &name_len, &buffer) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS|l", + &name, &name_len, &buffer, &flags) == FAILURE) { RETURN_THROWS(); } @@ -1795,16 +1861,7 @@ static ZIPARCHIVE_METHOD(addFromString) RETURN_FALSE; } - cur_idx = zip_name_locate(intern, (const char *)name, 0); - /* TODO: fix _zip_replace */ - if (cur_idx >= 0) { - if (zip_delete(intern, cur_idx) == -1) { - zip_source_free(zs); - RETURN_FALSE; - } - } - - if (zip_file_add(intern, name, zs, 0) == -1) { + if (zip_file_add(intern, name, zs, flags) == -1) { zip_source_free(zs); RETURN_FALSE; } else { @@ -2939,6 +2996,7 @@ static const zend_function_entry zip_class_functions[] = { ZIPARCHIVE_ME(addPattern, arginfo_class_ZipArchive_addPattern, ZEND_ACC_PUBLIC) ZIPARCHIVE_ME(renameIndex, arginfo_class_ZipArchive_renameIndex, ZEND_ACC_PUBLIC) ZIPARCHIVE_ME(renameName, arginfo_class_ZipArchive_renameName, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(replaceFile, arginfo_class_ZipArchive_replaceFile, ZEND_ACC_PUBLIC) ZIPARCHIVE_ME(setArchiveComment, arginfo_class_ZipArchive_setArchiveComment, ZEND_ACC_PUBLIC) ZIPARCHIVE_ME(getArchiveComment, arginfo_class_ZipArchive_getArchiveComment, ZEND_ACC_PUBLIC) ZIPARCHIVE_ME(setCommentIndex, arginfo_class_ZipArchive_setCommentIndex, ZEND_ACC_PUBLIC) @@ -3030,23 +3088,18 @@ static PHP_MINIT_FUNCTION(zip) REGISTER_ZIP_CLASS_CONST_LONG("FL_NODIR", ZIP_FL_NODIR); REGISTER_ZIP_CLASS_CONST_LONG("FL_COMPRESSED", ZIP_FL_COMPRESSED); REGISTER_ZIP_CLASS_CONST_LONG("FL_UNCHANGED", ZIP_FL_UNCHANGED); + REGISTER_ZIP_CLASS_CONST_LONG("FL_RECOMPRESS", ZIP_FL_RECOMPRESS); + REGISTER_ZIP_CLASS_CONST_LONG("FL_ENCRYPTED", ZIP_FL_ENCRYPTED); + REGISTER_ZIP_CLASS_CONST_LONG("FL_OVERWRITE", ZIP_FL_OVERWRITE); + REGISTER_ZIP_CLASS_CONST_LONG("FL_LOCAL", ZIP_FL_LOCAL); + REGISTER_ZIP_CLASS_CONST_LONG("FL_CENTRAL", ZIP_FL_CENTRAL); -#ifdef ZIP_FL_ENC_GUESS /* Default filename encoding policy. */ REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_GUESS", ZIP_FL_ENC_GUESS); -#endif -#ifdef ZIP_FL_ENC_RAW REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_RAW", ZIP_FL_ENC_RAW); -#endif -#ifdef ZIP_FL_ENC_STRICT REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_STRICT", ZIP_FL_ENC_STRICT); -#endif -#ifdef ZIP_FL_ENC_UTF_8 REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_UTF_8", ZIP_FL_ENC_UTF_8); -#endif -#ifdef ZIP_FL_ENC_CP437 REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_CP437", ZIP_FL_ENC_CP437); -#endif REGISTER_ZIP_CLASS_CONST_LONG("CM_DEFAULT", ZIP_CM_DEFAULT); REGISTER_ZIP_CLASS_CONST_LONG("CM_STORE", ZIP_CM_STORE); diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index 3e49c46413785..1e3ceb6d073b0 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -58,13 +58,16 @@ public function count() {} public function getStatusString() {} /** @return bool */ - public function addEmptyDir(string $dirname) {} + public function addEmptyDir(string $dirname, int $flags = 0) {} /** @return bool */ - public function addFromString(string $name, string $content) {} + public function addFromString(string $name, string $content, int $flags = ZipArchive::FL_OVERWRITE) {} /** @return bool */ - public function addFile(string $filepath, string $entryname = UNKNOWN, int $start = 0, int $length = 0) {} + public function addFile(string $filepath, string $entryname = UNKNOWN, int $start = 0, int $length = 0, int $flags = ZipArchive::FL_OVERWRITE) {} + + /** @return bool */ + public function replaceFile(string $filepath, string $index, int $start = 0, int $length = 0, int $flags = 0) {} /** @return array|false */ public function addGlob(string $pattern, int $flags = 0, $options = UNKNOWN) {} diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index 2f788d8c308de..a90b7681719ea 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -57,11 +57,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_addEmptyDir, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, dirname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_addFromString, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_addFile, 0, 0, 1) @@ -69,6 +71,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_addFile, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, entryname, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_replaceFile, 0, 0, 2) + ZEND_ARG_TYPE_INFO(0, filepath, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, index, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_addGlob, 0, 0, 1) diff --git a/ext/zip/tests/oo_add_encoding.phpt b/ext/zip/tests/oo_add_encoding.phpt new file mode 100644 index 0000000000000..43e91105ed848 --- /dev/null +++ b/ext/zip/tests/oo_add_encoding.phpt @@ -0,0 +1,48 @@ +--TEST-- +ziparchive::addEmptyDir with encoding option +--SKIPIF-- + +--FILE-- +open($file, ZipArchive::CREATE)) { + exit('failed'); +} + +$zip->addEmptyDir('foo'); +$zip->addEmptyDir(chr(0x82), ZipArchive::FL_ENC_CP437); +$zip->addEmptyDir('è', ZipArchive::FL_ENC_UTF_8); + +$zip->addFromString('bar', __FILE__); +$zip->addFromString(chr(0x91), __FILE__, ZipArchive::FL_ENC_CP437); +$zip->addFromString('€', __FILE__, ZipArchive::FL_ENC_UTF_8); + +if ($zip->status == ZIPARCHIVE::ER_OK) { + dump_entries_name($zip); + $zip->close(); +} else { + echo "failed\n"; +} +?> +--CLEAN-- + +--EXPECTF-- +0 foo/ +1 é/ +2 è/ +3 bar +4 æ +5 € diff --git a/ext/zip/tests/oo_add_from_string.phpt b/ext/zip/tests/oo_add_from_string.phpt new file mode 100644 index 0000000000000..6ddc6ff8be85f --- /dev/null +++ b/ext/zip/tests/oo_add_from_string.phpt @@ -0,0 +1,58 @@ +--TEST-- +ziparchive::addFromString and FL_OVERWRITE +--SKIPIF-- + +--FILE-- +open($file)) { + exit('failed'); +} + +// New file +var_dump($zip->addFromString('bar', __FILE__)); +var_dump($zip->status == ZipArchive::ER_OK); +// Fails to add existing file +var_dump($zip->addFromString('entry1.txt', __FILE__, 0)); +var_dump($zip->status == ZipArchive::ER_EXISTS); +// Overwrite +var_dump($zip->addFromString('entry1.txt', __FILE__, ZipArchive::FL_OVERWRITE)); +var_dump($zip->status == ZipArchive::ER_OK); + +if ($zip->status == ZipArchive::ER_OK) { + dump_entries_name($zip); + $zip->close(); +} else { + echo "failed\n"; +} +?> +Done +--CLEAN-- + +--EXPECTF-- +bool(true) +bool(true) +bool(false) +bool(true) +bool(true) +bool(true) +0 bar +1 foobar/ +2 foobar/baz +3 entry1.txt +Done diff --git a/ext/zip/tests/oo_addglob.phpt b/ext/zip/tests/oo_addglob.phpt index b20d4ab07a656..a648cd7c05432 100644 --- a/ext/zip/tests/oo_addglob.phpt +++ b/ext/zip/tests/oo_addglob.phpt @@ -26,7 +26,18 @@ if (!$zip->open($file)) { } $options = array('add_path' => 'baz/', 'remove_all_path' => TRUE); if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { - echo "failed1\n"; + echo "failed 1\n"; +} +if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { + echo "failed 2\n"; +} +$options['flags'] = 0; // clean FL_OVERWRITE +if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { + var_dump($zip->getStatusString()); +} +$options['flags'] = ZipArchive::FL_OVERWRITE; +if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { + echo "failed 3\n"; } if ($zip->status == ZIPARCHIVE::ER_OK) { if (!verify_entries($zip, [ @@ -43,7 +54,7 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { } $zip->close(); } else { - echo "failed3\n"; + echo "failed 4\n"; } ?> --CLEAN-- @@ -55,4 +66,5 @@ unlink($dirname . 'bar.baz'); rmdir($dirname); ?> --EXPECT-- +string(19) "File already exists" OK diff --git a/ext/zip/tests/oo_addpattern.phpt b/ext/zip/tests/oo_addpattern.phpt index 19453bee49154..227a89bb178f9 100644 --- a/ext/zip/tests/oo_addpattern.phpt +++ b/ext/zip/tests/oo_addpattern.phpt @@ -27,8 +27,17 @@ if (!$zip->open($file)) { $dir = realpath($dirname); $options = array('add_path' => 'baz', 'remove_path' => $dir); if (!$zip->addPattern('/\.txt$/', $dir, $options)) { - echo "failed\n"; + echo "failed 1\n"; } +$options['flags'] = 0; // clean FL_OVERWRITE +if (!$zip->addPattern('/\.txt$/', $dir, $options)) { + var_dump($zip->getStatusString()); +} +$options['flags'] = ZipArchive::FL_OVERWRITE; +if (!$zip->addPattern('/\.txt$/', $dir, $options)) { + echo "failed 2\n"; +} + if ($zip->status == ZIPARCHIVE::ER_OK) { if (!verify_entries($zip, [ "bar", @@ -56,4 +65,5 @@ unlink($dirname . 'bar.txt'); rmdir($dirname); ?> --EXPECT-- +string(19) "File already exists" OK diff --git a/ext/zip/tests/oo_replacefile.phpt b/ext/zip/tests/oo_replacefile.phpt new file mode 100644 index 0000000000000..486928c069f2d --- /dev/null +++ b/ext/zip/tests/oo_replacefile.phpt @@ -0,0 +1,54 @@ +--TEST-- +ziparchive::replaceFile() function +--SKIPIF-- + +--FILE-- +open($file)) { + exit('open failed'); +} +if ($zip->replaceFile($dirname . 'utils.inc', 5)) { + echo "replace 5 succeed\n"; +} +if (!$zip->replaceFile($dirname . 'utils.inc', 0)) { + echo "replace 0 failed\n"; +} +if (!$zip->replaceFile($dirname . 'utils.inc', 2, 12, 42)) { + echo "replace 2 failed\n"; +} +if ($zip->status == ZIPARCHIVE::ER_OK) { + if (!verify_entries($zip, [ + "bar", + "foobar/", + "foobar/baz", + "entry1.txt", + ])) { + echo "verify failed\n"; + } else { + echo "OK\n"; + } + $zip->close(); +} else { + echo "failed\n"; +} +if (!$zip->open($file)) { + exit('re-open failed'); +} +var_dump(strlen($zip->getFromName('bar')) == filesize($dirname . 'utils.inc')); +var_dump(strlen($zip->getFromName('foobar/baz')) == 42); +@unlink($file); +?> +--EXPECT-- +OK +bool(true) +bool(true) diff --git a/ext/zip/tests/utils.inc b/ext/zip/tests/utils.inc index 6d5049e558fe1..93158b05b2602 100644 --- a/ext/zip/tests/utils.inc +++ b/ext/zip/tests/utils.inc @@ -1,4 +1,11 @@ numFiles; $i++) { + $sb = $z->statIndex($i); + echo $i . ' ' . $sb['name'] . "\n"; + } +} + function verify_entries($zip, $entries = []) { $verified = true; $found = []; From a6d86c9bba6c700c6541252a17a70f84ab1bc826 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 2 Mar 2020 16:51:55 +0100 Subject: [PATCH 137/201] bump zip version + NEWS --- NEWS | 5 +++++ ext/zip/php_zip.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b560f5813f32a..99430555bee24 100644 --- a/NEWS +++ b/NEWS @@ -130,5 +130,10 @@ PHP NEWS . Add ZipArchive::setMtimeName and ZipArchive::setMtimeIndex methods. (Remi) . Add ZipArchive::setProgressCallback method (since libzip 1.3.0). (Remi) . Add ZipArchive::setCancelCallback method (since libzip 1.6.0). (Remi) + . Add optional "flags" parameter to ZipArchive::addEmptyDir, addFile and + addFromString methods. (Remi) + . Add "flags" options to ZipArchive::addGlob and addPattern methods + keeping previous behavior having FL_OVERWRITE by default. (Remi) + . Add ZipArchive::replaceFile() method <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 654d6d2a32864..96390e025a185 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -31,7 +31,7 @@ extern zend_module_entry zip_module_entry; #define ZIP_OVERWRITE ZIP_TRUNCATE #endif -#define PHP_ZIP_VERSION "1.17.1" +#define PHP_ZIP_VERSION "1.18.0" #define ZIP_OPENBASEDIR_CHECKPATH(filename) php_check_open_basedir(filename) From fc8b3ab7cbb4f5e77584babeaf25b9bf16f524cd Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 2 Mar 2020 18:45:12 +0100 Subject: [PATCH 138/201] Fix #79013: Content-Length missing when posting a curlFile with curl Unfortunately, some Webservers (e.g. IIS) do not implement the (F)CGI specifications correctly wrt. chunked uploads (i.e. Transfer-encoding: chunked), but instead pass -1 as CONTENT_LENGTH to the CGI application. However, our (F)CFI SAPIs (i.e. cgi and cgi-fcgi) do not support this. Therefore we try to retrieve the stream size in advance and pass it to `curl_mime_data_cb()` to prevent libcurl from doing chunked uploads. This is basically the same approach that `curl_mime_filedata()` implements, except that we are keeping already opened streams open for the `read_cb()`. --- NEWS | 2 ++ ext/curl/interface.c | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 16802c2ea80e8..7902b675226bf 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ PHP NEWS - CURL: . Fixed bug #79019 (Copied cURL handles upload empty file). (cmb) + . Fixed bug #79013 (Content-Length missing when posting a curlFile with + curl). (cmb) - DOM: . Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita, diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 668f7a71d9353..45e41ba49ecbe 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2200,6 +2200,10 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields char *type = NULL, *filename = NULL; #if LIBCURL_VERSION_NUM >= 0x073800 /* 7.56.0 */ struct mime_data_cb_arg *cb_arg; + php_stream *stream; + php_stream_statbuf ssb; + size_t filesize = -1; + curl_seek_callback seekfunc = seek_cb; #endif prop = zend_read_property(curl_CURLFile_class, current, "name", sizeof("name")-1, 0, &rv); @@ -2225,9 +2229,17 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields zval_ptr_dtor(&ch->postfields); ZVAL_COPY(&ch->postfields, zpostfields); + if ((stream = php_stream_open_wrapper(ZSTR_VAL(postval), "rb", STREAM_MUST_SEEK, NULL))) { + if (!stream->readfilters.head && !php_stream_stat(stream, &ssb)) { + filesize = ssb.sb.st_size; + } + } else { + seekfunc = NULL; + } + cb_arg = emalloc(sizeof *cb_arg); cb_arg->filename = zend_string_copy(postval); - cb_arg->stream = NULL; + cb_arg->stream = stream; part = curl_mime_addpart(mime); if (part == NULL) { @@ -2235,7 +2247,7 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields return FAILURE; } if ((form_error = curl_mime_name(part, ZSTR_VAL(string_key))) != CURLE_OK - || (form_error = curl_mime_data_cb(part, -1, read_cb, seek_cb, free_cb, cb_arg)) != CURLE_OK + || (form_error = curl_mime_data_cb(part, filesize, read_cb, seekfunc, free_cb, cb_arg)) != CURLE_OK || (form_error = curl_mime_filename(part, filename ? filename : ZSTR_VAL(postval))) != CURLE_OK || (form_error = curl_mime_type(part, type ? type : "application/octet-stream")) != CURLE_OK) { error = form_error; From 534c3438e36d49803758bceced9e15f9b5e762e5 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 3 Mar 2020 14:26:42 +0800 Subject: [PATCH 139/201] Updated maintainer ranges --- EXTENSIONS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EXTENSIONS b/EXTENSIONS index 212eaf8c9920e..15678bb05f41a 100644 --- a/EXTENSIONS +++ b/EXTENSIONS @@ -37,7 +37,7 @@ STATUS: Working ------------------------------------------------------------------------------- EXTENSION: cli PRIMARY MAINTAINER: Marcus Börger , Edin Kadribasic -MAINTENANCE: Unknown +MAINTENANCE: Xinchen Hui (2013 - 2020) STATUS: Working SINCE: 4.3.0 ------------------------------------------------------------------------------- @@ -385,7 +385,7 @@ STATUS: Working ------------------------------------------------------------------------------- EXTENSION: opcache PRIMARY MAINTAINER: Dmitry Stogov (2013 - 2018) - Xinchen Hui (2013 - 2018) + Xinchen Hui (2013 - 2020) Nikita Popov (2016 - 2020) MAINTENANCE: Maintained STATUS: Working From 9dda3b9eb2d47bda7805f02c417ead54487d655e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 3 Mar 2020 10:19:31 +0100 Subject: [PATCH 140/201] Next is 7.3.17 --- NEWS | 4 +++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 1cdfac06bb9d8..8f89531714f05 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 7.3.16 +?? ??? ????, PHP 7.3.17 + +19 Mar 2020, PHP 7.3.16 - Core: . Fixed bug #63206 (restore_error_handler does not restore previous errors diff --git a/Zend/zend.h b/Zend/zend.h index 2bb1560afa53f..7be5d84d57a98 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "3.3.16-dev" +#define ZEND_VERSION "3.3.17-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 3c729444d8b42..5b9a69044672a 100644 --- a/configure.ac +++ b/configure.ac @@ -107,7 +107,7 @@ int zend_sprintf(char *buffer, const char *format, ...); PHP_MAJOR_VERSION=7 PHP_MINOR_VERSION=3 -PHP_RELEASE_VERSION=16 +PHP_RELEASE_VERSION=17 PHP_EXTRA_VERSION="-dev" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/main/php_version.h b/main/php_version.h index 83cfdacd7c383..7abd288fa4986 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 7 #define PHP_MINOR_VERSION 3 -#define PHP_RELEASE_VERSION 16 +#define PHP_RELEASE_VERSION 17 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "7.3.16-dev" -#define PHP_VERSION_ID 70316 +#define PHP_VERSION "7.3.17-dev" +#define PHP_VERSION_ID 70317 From a7a2e9857e96abc2147e895f8d844a6e73e86170 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 3 Mar 2020 10:35:42 +0100 Subject: [PATCH 141/201] Fix memory leak in dom_zvals_to_fragment --- ext/dom/parentnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index 109b74d162f3f..be30c79261142 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -167,6 +167,7 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod newNode = dom_object_get_node(newNodeObj); if (newNode->doc != documentNode) { + xmlFree(fragment); php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror); return NULL; } From 53efa1b0c69b463ea9d3606d828c036129f2dec9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 2 Mar 2020 11:07:57 +0100 Subject: [PATCH 142/201] Store aliased name of trait method Currently, trait methods are aliased will continue to use the original function name. In a few places in the codebase, we will try to look up the actual method name instead. However, this does not work if an aliased method is used indirectly (https://bugs.php.net/bug.php?id=69180). I think it would be better to instead actually change the method name to the alias. This is in principle easy: We have to allow function_name to be changed even if op array is otherwise shared (similar to static_variables). This means we need to addref/release the function_name separately, but I don't think there is a performance concern here (especially as everything is usually interned). There is a bit of complication in opcache, where we need to make sure that the function name is released the correct number of times (interning may overwrite the name in the original op_array, but we need to release it as many times as the op_array is shared). Fixes bug #69180. Fixes bug #74939. Closes GH-5226. --- NEWS | 3 ++ Zend/tests/bug65579.phpt | 2 +- Zend/zend_API.c | 49 ------------------------------ Zend/zend_API.h | 3 -- Zend/zend_builtin_functions.c | 32 ++++--------------- Zend/zend_closures.c | 1 + Zend/zend_compile.c | 8 ++--- Zend/zend_inheritance.c | 16 +++++++--- Zend/zend_opcode.c | 7 +++-- ext/opcache/zend_persist.c | 26 +++++++++++----- ext/opcache/zend_persist_calc.c | 34 +++++++++++---------- ext/reflection/php_reflection.c | 4 +-- ext/reflection/tests/bug69180.phpt | 37 ++++++++++++++++++++++ 13 files changed, 104 insertions(+), 118 deletions(-) create mode 100644 ext/reflection/tests/bug69180.phpt diff --git a/NEWS b/NEWS index 99430555bee24..5b47d27c89f94 100644 --- a/NEWS +++ b/NEWS @@ -89,6 +89,9 @@ PHP NEWS scope). (Nikita) . Fixed bug #77325 (ReflectionClassConstant::$class returns wrong class when extending). (Nikita) + . Fixed bug #69180 (Reflection does not honor trait conflict resolution / + method aliasing). (Nikita) + . Fixed bug #74939 (Nested traits' aliased methods are lowercased). (Nikita) - Session: . Fixed bug #78624 (session_gc return value for user defined session diff --git a/Zend/tests/bug65579.phpt b/Zend/tests/bug65579.phpt index 25d74ed4f5ee4..e5ed632416da9 100644 --- a/Zend/tests/bug65579.phpt +++ b/Zend/tests/bug65579.phpt @@ -25,5 +25,5 @@ array(2) { [0]=> string(10) "testMethod" [1]=> - string(25) "testmethodfromparenttrait" + string(25) "testMethodFromParentTrait" } diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 74afc47474540..50a1d434dbddb 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -4228,55 +4228,6 @@ ZEND_API void zend_restore_error_handling(zend_error_handling *saved) /* {{{ */ } /* }}} */ -ZEND_API zend_string* zend_find_alias_name(zend_class_entry *ce, zend_string *name) /* {{{ */ -{ - zend_trait_alias *alias, **alias_ptr; - - if ((alias_ptr = ce->trait_aliases)) { - alias = *alias_ptr; - while (alias) { - if (alias->alias && zend_string_equals_ci(alias->alias, name)) { - return alias->alias; - } - alias_ptr++; - alias = *alias_ptr; - } - } - - return name; -} -/* }}} */ - -ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_function *f) /* {{{ */ -{ - zend_function *func; - HashTable *function_table; - zend_string *name; - - if (f->common.type != ZEND_USER_FUNCTION || - (f->op_array.refcount && *(f->op_array.refcount) < 2) || - !f->common.scope || - !f->common.scope->trait_aliases) { - return f->common.function_name; - } - - function_table = &ce->function_table; - ZEND_HASH_FOREACH_STR_KEY_PTR(function_table, name, func) { - if (func == f) { - if (!name) { - return f->common.function_name; - } - if (ZSTR_LEN(name) == ZSTR_LEN(f->common.function_name) && - !strncasecmp(ZSTR_VAL(name), ZSTR_VAL(f->common.function_name), ZSTR_LEN(f->common.function_name))) { - return f->common.function_name; - } - return zend_find_alias_name(f->common.scope, name); - } - } ZEND_HASH_FOREACH_END(); - return f->common.function_name; -} -/* }}} */ - ZEND_API ZEND_COLD const char *zend_get_object_type(const zend_class_entry *ce) /* {{{ */ { if(ce->ce_flags & ZEND_ACC_TRAIT) { diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 4c29a0f1b928c..0e9315916780f 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -575,9 +575,6 @@ static zend_always_inline int zend_forbid_dynamic_call(const char *func_name) return SUCCESS; } -ZEND_API zend_string *zend_find_alias_name(zend_class_entry *ce, zend_string *name); -ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_function *f); - ZEND_API ZEND_COLD const char *zend_get_object_type(const zend_class_entry *ce); ZEND_API zend_bool zend_is_iterable(zval *iterable); diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 66cf80d64b6a2..0ba6c67f9d601 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1058,7 +1058,6 @@ ZEND_FUNCTION(get_class_methods) zend_class_entry *ce = NULL; zend_class_entry *scope; zend_function *mptr; - zend_string *key; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &klass) == FAILURE) { RETURN_THROWS(); @@ -1077,8 +1076,7 @@ ZEND_FUNCTION(get_class_methods) array_init(return_value); scope = zend_get_executed_scope(); - ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, key, mptr) { - + ZEND_HASH_FOREACH_PTR(&ce->function_table, mptr) { if ((mptr->common.fn_flags & ZEND_ACC_PUBLIC) || (scope && (((mptr->common.fn_flags & ZEND_ACC_PROTECTED) && @@ -1086,15 +1084,8 @@ ZEND_FUNCTION(get_class_methods) || ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) && scope == mptr->common.scope))) ) { - if (mptr->type == ZEND_USER_FUNCTION && - (!mptr->op_array.refcount || *mptr->op_array.refcount > 1) && - key && !same_name(key, mptr->common.function_name)) { - ZVAL_STR_COPY(&method_name, zend_find_alias_name(mptr->common.scope, key)); - zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &method_name); - } else { - ZVAL_STR_COPY(&method_name, mptr->common.function_name); - zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &method_name); - } + ZVAL_STR_COPY(&method_name, mptr->common.function_name); + zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &method_name); } } ZEND_HASH_FOREACH_END(); } @@ -1955,16 +1946,9 @@ ZEND_FUNCTION(debug_print_backtrace) object = (Z_TYPE(call->This) == IS_OBJECT) ? Z_OBJ(call->This) : NULL; if (call->func) { - zend_string *zend_function_name; - func = call->func; - if (func->common.scope && func->common.scope->trait_aliases) { - zend_function_name = zend_resolve_method_name(object ? object->ce : func->common.scope, func); - } else { - zend_function_name = func->common.function_name; - } - if (zend_function_name != NULL) { - function_name = ZSTR_VAL(zend_function_name); + if (func->common.function_name) { + function_name = ZSTR_VAL(func->common.function_name); } else { function_name = NULL; } @@ -2184,11 +2168,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int if (call && call->func) { func = call->func; - function_name = (func->common.scope && - func->common.scope->trait_aliases) ? - zend_resolve_method_name( - (object ? object->ce : func->common.scope), func) : - func->common.function_name; + function_name = func->common.function_name; } else { func = NULL; function_name = NULL; diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 06a54f943c97c..02df3504ccf16 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -702,6 +702,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent } memset(ptr, 0, func->op_array.cache_size); } + zend_string_addref(closure->func.op_array.function_name); if (closure->func.op_array.refcount) { (*closure->func.op_array.refcount)++; } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 0abf274dbd25e..fc5b92f09cf19 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1063,10 +1063,10 @@ ZEND_API void function_add_ref(zend_function *function) /* {{{ */ ZEND_MAP_PTR_INIT(op_array->run_time_cache, zend_arena_alloc(&CG(arena), sizeof(void*))); ZEND_MAP_PTR_SET(op_array->run_time_cache, NULL); } - } else if (function->type == ZEND_INTERNAL_FUNCTION) { - if (function->common.function_name) { - zend_string_addref(function->common.function_name); - } + } + + if (function->common.function_name) { + zend_string_addref(function->common.function_name); } } /* }}} */ diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index c875427a70a55..eb79aab0985d8 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -115,6 +115,9 @@ static zend_always_inline zend_function *zend_duplicate_function(zend_function * if (func->op_array.refcount) { (*func->op_array.refcount)++; } + if (EXPECTED(func->op_array.function_name)) { + zend_string_addref(func->op_array.function_name); + } if (is_interface || EXPECTED(!func->op_array.static_variables)) { /* reuse the same op_array structure */ @@ -1577,7 +1580,7 @@ static void zend_add_magic_methods(zend_class_entry* ce, zend_string* mname, zen } /* }}} */ -static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_string *key, zend_function *fn, HashTable **overridden) /* {{{ */ +static void zend_add_trait_method(zend_class_entry *ce, zend_string *name, zend_string *key, zend_function *fn, HashTable **overridden) /* {{{ */ { zend_function *existing_fn = NULL; zend_function *new_fn; @@ -1622,11 +1625,11 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s /* two traits can't define the same non-abstract method */ #if 1 zend_error_noreturn(E_COMPILE_ERROR, "Trait method %s has not been applied, because there are collisions with other trait methods on %s", - name, ZSTR_VAL(ce->name)); + ZSTR_VAL(name), ZSTR_VAL(ce->name)); #else /* TODO: better error message */ zend_error_noreturn(E_COMPILE_ERROR, "Trait method %s::%s has not been applied as %s::%s, because of collision with %s::%s", ZSTR_VAL(fn->common.scope->name), ZSTR_VAL(fn->common.function_name), - ZSTR_VAL(ce->name), name, + ZSTR_VAL(ce->name), ZSTR_VAL(name), ZSTR_VAL(existing_fn->common.scope->name), ZSTR_VAL(existing_fn->common.function_name)); #endif } else { @@ -1647,6 +1650,9 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s new_fn->op_array.fn_flags |= ZEND_ACC_TRAIT_CLONE; new_fn->op_array.fn_flags &= ~ZEND_ACC_IMMUTABLE; } + + /* Reassign method name, in case it is an alias. */ + new_fn->common.function_name = name; function_add_ref(new_fn); fn = zend_hash_update_ptr(&ce->function_table, key, new_fn); zend_add_magic_methods(ce, key, fn); @@ -1695,7 +1701,7 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z } lcname = zend_string_tolower(alias->alias); - zend_add_trait_method(ce, ZSTR_VAL(alias->alias), lcname, &fn_copy, overridden); + zend_add_trait_method(ce, alias->alias, lcname, &fn_copy, overridden); zend_string_release_ex(lcname, 0); /* Record the trait from which this alias was resolved. */ @@ -1747,7 +1753,7 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z } } - zend_add_trait_method(ce, ZSTR_VAL(fn->common.function_name), fnname, &fn_copy, overridden); + zend_add_trait_method(ce, fn->common.function_name, fnname, &fn_copy, overridden); } } /* }}} */ diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 345e8cce42ea9..49dedf5f963e4 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -447,6 +447,10 @@ ZEND_API void destroy_op_array(zend_op_array *op_array) efree(ZEND_MAP_PTR(op_array->run_time_cache)); } + if (op_array->function_name) { + zend_string_release_ex(op_array->function_name, 0); + } + if (!op_array->refcount || --(*op_array->refcount) > 0) { return; } @@ -476,9 +480,6 @@ ZEND_API void destroy_op_array(zend_op_array *op_array) } efree(op_array->opcodes); - if (op_array->function_name) { - zend_string_release_ex(op_array->function_name, 0); - } if (op_array->doc_comment) { zend_string_release_ex(op_array->doc_comment, 0); } diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 1bcec7caf09de..6a158e73f9e33 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -311,6 +311,16 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc EG(current_execute_data) = orig_execute_data; } + if (op_array->function_name) { + zend_string *old_name = op_array->function_name; + zend_accel_store_interned_string(op_array->function_name); + /* Remember old function name, so it can be released multiple times if shared. */ + if (op_array->function_name != old_name + && !zend_shared_alloc_get_xlat_entry(&op_array->function_name)) { + zend_shared_alloc_register_xlat_entry(&op_array->function_name, old_name); + } + } + if (op_array->scope) { zend_class_entry *scope = zend_shared_alloc_get_xlat_entry(op_array->scope); @@ -337,10 +347,6 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc op_array->literals = zend_shared_alloc_get_xlat_entry(op_array->literals); ZEND_ASSERT(op_array->literals != NULL); } - if (op_array->function_name && !IS_ACCEL_INTERNED(op_array->function_name)) { - op_array->function_name = zend_shared_alloc_get_xlat_entry(op_array->function_name); - ZEND_ASSERT(op_array->function_name != NULL); - } if (op_array->filename) { op_array->filename = zend_shared_alloc_get_xlat_entry(op_array->filename); ZEND_ASSERT(op_array->filename != NULL); @@ -502,10 +508,6 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc ZEND_MAP_PTR_INIT(op_array->run_time_cache, NULL); } - if (op_array->function_name && !IS_ACCEL_INTERNED(op_array->function_name)) { - zend_accel_store_interned_string(op_array->function_name); - } - if (op_array->filename) { /* do not free! PHP has centralized filename storage, compiler will free it */ zend_accel_memdup_string(op_array->filename); @@ -632,6 +634,14 @@ static void zend_persist_class_method(zval *zv) if (op_array->refcount && --(*op_array->refcount) == 0) { efree(op_array->refcount); } + + /* If op_array is shared, the function name refcount is still incremented for each use, + * so we need to release it here. We remembered the original function name in xlat. */ + zend_string *old_function_name = + zend_shared_alloc_get_xlat_entry(&old_op_array->function_name); + if (old_function_name) { + zend_string_release_ex(old_function_name, 0); + } return; } if (ZCG(is_immutable_class)) { diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index 293af3b3e63f1..5de27b9efb006 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -171,14 +171,18 @@ static void zend_persist_type_calc(zend_type *type) static void zend_persist_op_array_calc_ex(zend_op_array *op_array) { + if (op_array->function_name) { + zend_string *old_name = op_array->function_name; + ADD_INTERNED_STRING(op_array->function_name); + /* Remember old function name, so it can be released multiple times if shared. */ + if (op_array->function_name != old_name + && !zend_shared_alloc_get_xlat_entry(&op_array->function_name)) { + zend_shared_alloc_register_xlat_entry(&op_array->function_name, old_name); + } + } + if (op_array->scope && zend_shared_alloc_get_xlat_entry(op_array->opcodes)) { /* already stored */ - if (op_array->function_name) { - zend_string *new_name = zend_shared_alloc_get_xlat_entry(op_array->function_name); - if (new_name) { - op_array->function_name = new_name; - } - } ADD_SIZE(ZEND_ALIGNED_SIZE(zend_extensions_op_array_persist_calc(op_array))); return; } @@ -211,16 +215,6 @@ static void zend_persist_op_array_calc_ex(zend_op_array *op_array) zend_shared_alloc_register_xlat_entry(op_array->opcodes, op_array->opcodes); ADD_SIZE(sizeof(zend_op) * op_array->last); - if (op_array->function_name) { - zend_string *old_name = op_array->function_name; - if (!zend_shared_alloc_get_xlat_entry(old_name)) { - ADD_INTERNED_STRING(op_array->function_name); - if (!zend_shared_alloc_get_xlat_entry(op_array->function_name)) { - zend_shared_alloc_register_xlat_entry(old_name, op_array->function_name); - } - } - } - if (op_array->filename) { ADD_STRING(op_array->filename); } @@ -308,6 +302,14 @@ static void zend_persist_class_method_calc(zval *zv) if (!ZCG(is_immutable_class)) { ADD_ARENA_SIZE(sizeof(void*)); } + } else { + /* If op_array is shared, the function name refcount is still incremented for each use, + * so we need to release it here. We remembered the original function name in xlat. */ + zend_string *old_function_name = + zend_shared_alloc_get_xlat_entry(&old_op_array->function_name); + if (old_function_name) { + zend_string_release_ex(old_function_name, 0); + } } } diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 05a016b97cff7..94f1b1659dfe0 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1210,9 +1210,7 @@ static void reflection_method_factory(zend_class_entry *ce, zend_function *metho ZVAL_OBJ(&intern->obj, Z_OBJ_P(closure_object)); } - ZVAL_STR_COPY(reflection_prop_name(object), - (method->common.scope && method->common.scope->trait_aliases) - ? zend_resolve_method_name(ce, method) : method->common.function_name); + ZVAL_STR_COPY(reflection_prop_name(object), method->common.function_name); ZVAL_STR_COPY(reflection_prop_class(object), method->common.scope->name); } /* }}} */ diff --git a/ext/reflection/tests/bug69180.phpt b/ext/reflection/tests/bug69180.phpt new file mode 100644 index 0000000000000..80d69dcd5c49b --- /dev/null +++ b/ext/reflection/tests/bug69180.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #69180: Reflection does not honor trait conflict resolution / method aliasing +--FILE-- +getMethods() as $method) { + var_dump($method->getName()); +} + +?> +--EXPECT-- +string(3) "foo" +string(3) "bar" From aa9a3ff891a84e19739ac394d32561ff4179d1e5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 3 Mar 2020 12:10:18 +0100 Subject: [PATCH 143/201] Add test for bug #69084 This is another bug fixed by the precending commit. --- NEWS | 2 ++ Zend/tests/bug69084.phpt | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Zend/tests/bug69084.phpt diff --git a/NEWS b/NEWS index 5b47d27c89f94..055afa4896a14 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ PHP NEWS renamed). (Nikita) . Fixed bug #70839 (Converting optional argument to variadic forbidden by LSP checks). (Nikita) + . Fixed bug #69084 (Unclear error message when not implementing a renamed + abstract trait function). (Nikita) - CURL: . Bumped required libcurl version to 7.29.0. (cmb) diff --git a/Zend/tests/bug69084.phpt b/Zend/tests/bug69084.phpt new file mode 100644 index 0000000000000..2cefcc54320f1 --- /dev/null +++ b/Zend/tests/bug69084.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #69084: Unclear error message when not implementing a renamed abstract trait function +--FILE-- +doStuff(); + } +} + +class Bar { + use Foo { + Foo::doStuff as doOtherStuff; + } + + public function doStuff() { + var_dump(__FUNCTION__); + } +} + +$b = new Bar(); +$b->main(); + +?> +--EXPECTF-- +Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Bar::doOtherStuff) in %s on line %d From a55b0abef369bb874bd8b46e85e4694ab2f38303 Mon Sep 17 00:00:00 2001 From: Cameron Porter Date: Mon, 2 Mar 2020 22:11:55 -0600 Subject: [PATCH 144/201] oci8: Fix two tests that fail with stricter internal checks Closes GH-5230 --- ext/oci8/tests/array_bind_009.phpt | 10 +++++----- ext/oci8/tests/array_bind_013.phpt | 10 +++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ext/oci8/tests/array_bind_009.phpt b/ext/oci8/tests/array_bind_009.phpt index b00efc0c24311..b1edfa8474872 100644 --- a/ext/oci8/tests/array_bind_009.phpt +++ b/ext/oci8/tests/array_bind_009.phpt @@ -8,10 +8,10 @@ oci_bind_array_by_name() and invalid values 9 require __DIR__.'/connect.inc'; var_dump(oci_bind_array_by_name($c, ":c1", $array, 5, 5, SQLT_CHR)); - -echo "Done\n"; ?> --EXPECTF-- -Warning: oci_bind_array_by_name(): supplied resource is not a valid oci8 statement resource in %s on line %d -bool(false) -Done +Fatal error: Uncaught TypeError: oci_bind_array_by_name(): supplied resource is not a valid oci8 statement resource in %s:%d +Stack trace: +#0 %s: oci_bind_array_by_name(%s) +#1 {main} + thrown in %s on line %d \ No newline at end of file diff --git a/ext/oci8/tests/array_bind_013.phpt b/ext/oci8/tests/array_bind_013.phpt index 0d9ddabc1501c..a04bccf30423b 100644 --- a/ext/oci8/tests/array_bind_013.phpt +++ b/ext/oci8/tests/array_bind_013.phpt @@ -11,7 +11,12 @@ $statement = oci_parse($c, 'SELECT user FROM v$session'); $array = array(); -var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10, SQLT_CHR, -10)); +try { + var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10, SQLT_CHR, -10)); +} catch (ArgumentCountError $exception) { + echo $exception->getMessage() . "\n"; +} + var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10)); var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -1)); var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, 0)); @@ -23,8 +28,7 @@ var_dump($array); echo "Done\n"; ?> --EXPECTF-- -Warning: oci_bind_array_by_name() expects at most 6 parameters, 7 given in %s on line %d -NULL +oci_bind_array_by_name() expects at most 6 parameters, 7 given Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d bool(false) From dc3e3e64f2cdd623aa39c6b67e3d976037148a06 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 3 Mar 2020 11:29:10 +0000 Subject: [PATCH 145/201] PHP-7.4 is now 7.4.5-dev --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f7fb19eff4569..12e130902ba73 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[7.4.3-dev],[https://bugs.php.net],[php],[https://www.php.net]) +AC_INIT([PHP],[7.4.5-dev],[https://bugs.php.net],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER From b093bd6ae82e796cdc395238d30afc2721805287 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 3 Mar 2020 13:06:31 +0100 Subject: [PATCH 146/201] this test needs json --- ext/pcre/tests/bug79241.phpt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/pcre/tests/bug79241.phpt b/ext/pcre/tests/bug79241.phpt index f6dbb8bea4e90..de89e1976019e 100644 --- a/ext/pcre/tests/bug79241.phpt +++ b/ext/pcre/tests/bug79241.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #79241: Segmentation fault on preg_match() +--SKIPIF-- + --FILE-- Date: Tue, 3 Mar 2020 14:21:33 +0100 Subject: [PATCH 147/201] Resolve trait alias refers to earlier Make sure all trait method references are converted to absolute method references in advance. This regresses one error message that I don't think is particularly valuable. --- Zend/tests/traits/bug54441.phpt | 2 +- Zend/zend_inheritance.c | 132 ++++++++++++-------------------- 2 files changed, 49 insertions(+), 85 deletions(-) diff --git a/Zend/tests/traits/bug54441.phpt b/Zend/tests/traits/bug54441.phpt index bb83d12299e44..195ff09ff2a83 100644 --- a/Zend/tests/traits/bug54441.phpt +++ b/Zend/tests/traits/bug54441.phpt @@ -16,4 +16,4 @@ class Boo { ?> --EXPECTF-- -Fatal error: The modifiers for the trait alias dontKnow() need to be changed in the same statement in which the alias is defined. Error in %s on line %d +Fatal error: The modifiers of the trait method dontKnow() are changed, but this method does not exist. Error in %s on line %d diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index eb79aab0985d8..df84efc389cc8 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1690,9 +1690,9 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z while (alias) { /* Scope unset or equal to the function we compare to, and the alias applies to fn */ if (alias->alias != NULL - && (!aliases[i] || fn->common.scope == aliases[i]) - && ZSTR_LEN(alias->trait_method.method_name) == ZSTR_LEN(fnname) - && (zend_binary_strcasecmp(ZSTR_VAL(alias->trait_method.method_name), ZSTR_LEN(alias->trait_method.method_name), ZSTR_VAL(fnname), ZSTR_LEN(fnname)) == 0)) { + && fn->common.scope == aliases[i] + && zend_string_equals_ci(alias->trait_method.method_name, fnname) + ) { fn_copy = *fn; /* if it is 0, no modifieres has been changed */ @@ -1703,15 +1703,6 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z lcname = zend_string_tolower(alias->alias); zend_add_trait_method(ce, alias->alias, lcname, &fn_copy, overridden); zend_string_release_ex(lcname, 0); - - /* Record the trait from which this alias was resolved. */ - if (!aliases[i]) { - aliases[i] = fn->common.scope; - } - if (!alias->trait_method.class_name) { - /* TODO: try to avoid this assignment (it's necessary only for reflection) */ - alias->trait_method.class_name = zend_string_copy(fn->common.scope->name); - } } alias_ptr++; alias = *alias_ptr; @@ -1732,20 +1723,10 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z while (alias) { /* Scope unset or equal to the function we compare to, and the alias applies to fn */ if (alias->alias == NULL && alias->modifiers != 0 - && (!aliases[i] || fn->common.scope == aliases[i]) - && (ZSTR_LEN(alias->trait_method.method_name) == ZSTR_LEN(fnname)) - && (zend_binary_strcasecmp(ZSTR_VAL(alias->trait_method.method_name), ZSTR_LEN(alias->trait_method.method_name), ZSTR_VAL(fnname), ZSTR_LEN(fnname)) == 0)) { - + && fn->common.scope == aliases[i] + && zend_string_equals_ci(alias->trait_method.method_name, fnname) + ) { fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_ACC_PPP_MASK)); - - /** Record the trait from which this alias was resolved. */ - if (!aliases[i]) { - aliases[i] = fn->common.scope; - } - if (!alias->trait_method.class_name) { - /* TODO: try to avoid this assignment (it's necessary only for reflection) */ - alias->trait_method.class_name = zend_string_copy(fn->common.scope->name); - } } alias_ptr++; alias = *alias_ptr; @@ -1862,9 +1843,11 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e aliases = ecalloc(i, sizeof(zend_class_entry*)); i = 0; while (ce->trait_aliases[i]) { - /** For all aliases with an explicit class name, resolve the class now. */ - if (ce->trait_aliases[i]->trait_method.class_name) { - cur_method_ref = &ce->trait_aliases[i]->trait_method; + zend_trait_alias *cur_alias = ce->trait_aliases[i]; + cur_method_ref = &ce->trait_aliases[i]->trait_method; + lcname = zend_string_tolower(cur_method_ref->method_name); + if (cur_method_ref->class_name) { + /* For all aliases with an explicit class name, resolve the class now. */ trait = zend_fetch_class(cur_method_ref->class_name, ZEND_FETCH_CLASS_TRAIT|ZEND_FETCH_CLASS_NO_AUTOLOAD); if (!trait) { zend_error_noreturn(E_COMPILE_ERROR, "Could not find trait %s", ZSTR_VAL(cur_method_ref->class_name)); @@ -1872,13 +1855,47 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e zend_check_trait_usage(ce, trait, traits); aliases[i] = trait; - /** And, ensure that the referenced method is resolvable, too. */ - lcname = zend_string_tolower(cur_method_ref->method_name); + /* And, ensure that the referenced method is resolvable, too. */ if (!zend_hash_exists(&trait->function_table, lcname)) { zend_error_noreturn(E_COMPILE_ERROR, "An alias was defined for %s::%s but this method does not exist", ZSTR_VAL(trait->name), ZSTR_VAL(cur_method_ref->method_name)); } - zend_string_release_ex(lcname, 0); + } else { + /* Find out which trait this method refers to. */ + trait = NULL; + for (j = 0; j < ce->num_traits; j++) { + if (traits[j]) { + if (zend_hash_exists(&traits[j]->function_table, lcname)) { + if (!trait) { + trait = traits[j]; + continue; + } + + // TODO: This is ambiguous! The first trait is assumed. + break; + } + } + } + + /* Non-absolute method reference refers to method that does not exist. */ + if (!trait) { + if (cur_alias->alias) { + zend_error_noreturn(E_COMPILE_ERROR, + "An alias (%s) was defined for method %s(), but this method does not exist", + ZSTR_VAL(cur_alias->alias), + ZSTR_VAL(cur_alias->trait_method.method_name)); + } else { + zend_error_noreturn(E_COMPILE_ERROR, + "The modifiers of the trait method %s() are changed, but this method does not exist. Error", + ZSTR_VAL(cur_alias->trait_method.method_name)); + } + } + + aliases[i] = trait; + + /* TODO: try to avoid this assignment (it's necessary only for reflection) */ + cur_method_ref->class_name = zend_string_copy(trait->name); } + zend_string_release_ex(lcname, 0); i++; } } @@ -2066,56 +2083,6 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent } /* }}} */ -static void zend_do_check_for_inconsistent_traits_aliasing(zend_class_entry *ce, zend_class_entry **aliases) /* {{{ */ -{ - int i = 0; - zend_trait_alias* cur_alias; - zend_string* lc_method_name; - - if (ce->trait_aliases) { - while (ce->trait_aliases[i]) { - cur_alias = ce->trait_aliases[i]; - /** The trait for this alias has not been resolved, this means, this - alias was not applied. Abort with an error. */ - if (!aliases[i]) { - if (cur_alias->alias) { - /** Plain old inconsistency/typo/bug */ - zend_error_noreturn(E_COMPILE_ERROR, - "An alias (%s) was defined for method %s(), but this method does not exist", - ZSTR_VAL(cur_alias->alias), - ZSTR_VAL(cur_alias->trait_method.method_name)); - } else { - /** Here are two possible cases: - 1) this is an attempt to modify the visibility - of a method introduce as part of another alias. - Since that seems to violate the DRY principle, - we check against it and abort. - 2) it is just a plain old inconsitency/typo/bug - as in the case where alias is set. */ - - lc_method_name = zend_string_tolower( - cur_alias->trait_method.method_name); - if (zend_hash_exists(&ce->function_table, - lc_method_name)) { - zend_string_release_ex(lc_method_name, 0); - zend_error_noreturn(E_COMPILE_ERROR, - "The modifiers for the trait alias %s() need to be changed in the same statement in which the alias is defined. Error", - ZSTR_VAL(cur_alias->trait_method.method_name)); - } else { - zend_string_release_ex(lc_method_name, 0); - zend_error_noreturn(E_COMPILE_ERROR, - "The modifiers of the trait method %s() are changed, but this method does not exist. Error", - ZSTR_VAL(cur_alias->trait_method.method_name)); - - } - } - } - i++; - } - } -} -/* }}} */ - static void zend_do_bind_traits(zend_class_entry *ce) /* {{{ */ { HashTable **exclude_tables; @@ -2153,9 +2120,6 @@ static void zend_do_bind_traits(zend_class_entry *ce) /* {{{ */ /* first care about all methods to be flattened into the class */ zend_do_traits_method_binding(ce, traits, exclude_tables, aliases); - /* Aliases which have not been applied indicate typos/bugs. */ - zend_do_check_for_inconsistent_traits_aliasing(ce, aliases); - if (aliases) { efree(aliases); } From 262f52d5e2dedbc735363ddd3504190447edf3bf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 3 Mar 2020 15:00:15 +0100 Subject: [PATCH 148/201] Small code cleanup I found what the modifier code does with XOR pretty confusing. It's just removing the PPP bits... Also remove an outdated reference to OVERLOADED_FUNCTION. --- Zend/zend_inheritance.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index df84efc389cc8..f15c325d67679 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1697,7 +1697,7 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z /* if it is 0, no modifieres has been changed */ if (alias->modifiers) { - fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_ACC_PPP_MASK)); + fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags & ~ZEND_ACC_PPP_MASK); } lcname = zend_string_tolower(alias->alias); @@ -1712,8 +1712,7 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z if (exclude_table == NULL || zend_hash_find(exclude_table, fnname) == NULL) { /* is not in hashtable, thus, function is not to be excluded */ - /* And how about ZEND_OVERLOADED_FUNCTION? */ - memcpy(&fn_copy, fn, fn->type == ZEND_USER_FUNCTION? sizeof(zend_op_array) : sizeof(zend_internal_function)); + memcpy(&fn_copy, fn, fn->type == ZEND_USER_FUNCTION ? sizeof(zend_op_array) : sizeof(zend_internal_function)); /* apply aliases which have not alias name, just setting visibility */ if (ce->trait_aliases) { @@ -1726,7 +1725,7 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z && fn->common.scope == aliases[i] && zend_string_equals_ci(alias->trait_method.method_name, fnname) ) { - fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_ACC_PPP_MASK)); + fn_copy.common.fn_flags = alias->modifiers | (fn->common.fn_flags & ~ZEND_ACC_PPP_MASK); } alias_ptr++; alias = *alias_ptr; From f15f3272cf7ddd3984d217ecffafdae05b975dfc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 3 Mar 2020 17:06:15 +0100 Subject: [PATCH 149/201] Remove empty "interface gets implemented" handlers --- Zend/zend_interfaces.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index db422025718f0..fe403b3d7ae46 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -426,13 +426,6 @@ static int zend_implement_iterator(zend_class_entry *interface, zend_class_entry } /* }}} */ -/* {{{ zend_implement_arrayaccess */ -static int zend_implement_arrayaccess(zend_class_entry *interface, zend_class_entry *class_type) -{ - return SUCCESS; -} -/* }}}*/ - /* {{{ zend_user_serialize */ ZEND_API int zend_user_serialize(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data) { @@ -526,13 +519,6 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e } /* }}}*/ -/* {{{ zend_implement_countable */ -static int zend_implement_countable(zend_class_entry *interface, zend_class_entry *class_type) -{ - return SUCCESS; -} -/* }}}*/ - /* {{{ function tables */ static const zend_function_entry zend_funcs_aggregate[] = { ZEND_ABSTRACT_ME(iterator, getIterator, arginfo_class_IteratorAggregate_getIterator) @@ -586,13 +572,15 @@ ZEND_API void zend_register_interfaces(void) REGISTER_MAGIC_INTERFACE(iterator, Iterator); REGISTER_MAGIC_IMPLEMENT(iterator, traversable); - REGISTER_MAGIC_INTERFACE(arrayaccess, ArrayAccess); - REGISTER_MAGIC_INTERFACE(serializable, Serializable); - REGISTER_MAGIC_INTERFACE(countable, Countable); - zend_class_entry ce; + INIT_CLASS_ENTRY(ce, "ArrayAccess", zend_funcs_arrayaccess); + zend_ce_arrayaccess = zend_register_internal_interface(&ce); + + INIT_CLASS_ENTRY(ce, "Countable", zend_funcs_countable); + zend_ce_countable = zend_register_internal_interface(&ce); + INIT_CLASS_ENTRY(ce, "Stringable", zend_funcs_stringable); zend_ce_stringable = zend_register_internal_interface(&ce); } From 8ea3493cb63803340deaab326c9ffc1b9a19cfe9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 4 Mar 2020 09:22:24 +0100 Subject: [PATCH 150/201] zip_file_replace don't need ZIP_FL_OVERWRITE --- ext/zip/php_zip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index dce9cb8a27503..634219000fad4 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1794,7 +1794,7 @@ static ZIPARCHIVE_METHOD(replaceFile) zend_long index; zend_long offset_start = 0, offset_len = 0; zend_string *filename; - zend_long flags = ZIP_FL_OVERWRITE; + zend_long flags = 0; ZIP_FROM_OBJECT(intern, self); From a527c60ede98d51785091ceb380242b0ffeab5ad Mon Sep 17 00:00:00 2001 From: Cameron Porter Date: Mon, 2 Mar 2020 20:35:28 -0600 Subject: [PATCH 151/201] PDO_OCI: Add test of the phpinfo output --- ext/pdo_oci/tests/pdo_oci_phpinfo.phpt | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ext/pdo_oci/tests/pdo_oci_phpinfo.phpt diff --git a/ext/pdo_oci/tests/pdo_oci_phpinfo.phpt b/ext/pdo_oci/tests/pdo_oci_phpinfo.phpt new file mode 100644 index 0000000000000..a20cebe2a404d --- /dev/null +++ b/ext/pdo_oci/tests/pdo_oci_phpinfo.phpt @@ -0,0 +1,27 @@ +--TEST-- +PDO_OCI: phpinfo() output +--SKIPIF-- + +--FILE-- + enabled'; +if (!preg_match("/$reg/", $tmp)) { + printf("[001] Cannot find OCI PDO driver line in phpinfo() output\n"); +} + +print "done!"; +?> +--EXPECT-- +done! From c05a9c3dcd587418906d9d25f83872e027f7dd43 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 4 Mar 2020 10:10:36 +0100 Subject: [PATCH 152/201] Implement interfaces after all methods available The place where interface implementation handlers is called is currently ill-defined: If the class implements interfaces itself, the handlers for both the parent interfaces and the new interfaces will be called after all methods are registered (post trait use). If the class does not implement interfaces, then the parent interface handlers are called early during inheritance (before methods are inherited). This commit moves the calls to always occur after all methods are available. For userland classes this will be post trait import, at the time where interfaces get implemented (whether the class itself defines additional interfaces or not). For internal classes it will be at the end of inheritance, as internal class declarations do not have proper finalization. This allows us to simplify the logic for implementing the magic Iterator / IteratorAggregate interfaces. In particularly we can now also automatically detect whether an extension of IteratorAggregate can safely reuse a custom get_iterator handler, or whether it needs to switch to the userland mechanism. The Iterator case continues to rely on ZEND_ACC_REUSE_GET_ITERATOR for this purpose, as a wholesale replacement is not possible there. --- Zend/tests/bug48667_1.phpt | 2 +- Zend/zend_inheritance.c | 30 ++++---- Zend/zend_interfaces.c | 136 +++++++++++++------------------------ 3 files changed, 61 insertions(+), 107 deletions(-) diff --git a/Zend/tests/bug48667_1.phpt b/Zend/tests/bug48667_1.phpt index 2d94aed2bf207..b2e4d28769bb2 100644 --- a/Zend/tests/bug48667_1.phpt +++ b/Zend/tests/bug48667_1.phpt @@ -7,4 +7,4 @@ abstract class A implements Iterator, IteratorAggregate { } ?> --EXPECTF-- -Fatal error: Class A cannot implement both IteratorAggregate and Iterator at the same time in %s on line %d +Fatal error: Class A cannot implement both Iterator and IteratorAggregate at the same time in %s on line %d diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index f15c325d67679..a031207b85e8b 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -141,10 +141,6 @@ static void do_inherit_parent_constructor(zend_class_entry *ce) /* {{{ */ if (EXPECTED(!ce->get_iterator)) { ce->get_iterator = parent->get_iterator; } - if (parent->iterator_funcs_ptr) { - /* Must be initialized through iface->interface_gets_implemented() */ - ZEND_ASSERT(ce->iterator_funcs_ptr); - } if (EXPECTED(!ce->__get)) { ce->__get = parent->__get; } @@ -1185,19 +1181,6 @@ ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *par ce->parent = parent_ce; ce->ce_flags |= ZEND_ACC_RESOLVED_PARENT; - /* Inherit interfaces */ - if (parent_ce->num_interfaces) { - if (!ce->num_interfaces) { - zend_do_inherit_interfaces(ce, parent_ce); - } else { - uint32_t i; - - for (i = 0; i < parent_ce->num_interfaces; i++) { - do_implement_interface(ce, parent_ce->interfaces[i]); - } - } - } - /* Inherit properties */ if (parent_ce->default_properties_count) { zval *src, *dst, *end; @@ -1378,6 +1361,10 @@ ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *par do_inherit_parent_constructor(ce); if (ce->type == ZEND_INTERNAL_CLASS) { + if (parent_ce->num_interfaces) { + zend_do_inherit_interfaces(ce, parent_ce); + } + if (ce->ce_flags & ZEND_ACC_IMPLICIT_ABSTRACT_CLASS) { ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; } @@ -1533,7 +1520,9 @@ static void zend_do_implement_interfaces(zend_class_entry *ce, zend_class_entry ce->interfaces = interfaces; ce->ce_flags |= ZEND_ACC_RESOLVED_INTERFACES; - i = num_parent_interfaces; + for (i = 0; i < num_parent_interfaces; i++) { + do_implement_interface(ce, ce->interfaces[i]); + } /* Note that new interfaces can be added during this loop due to interface inheritance. * Use num_interfaces rather than ce->num_interfaces to not re-process the new ones. */ for (; i < num_interfaces; i++) { @@ -2459,6 +2448,8 @@ ZEND_API int zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_nam } if (interfaces) { zend_do_implement_interfaces(ce, interfaces); + } else if (parent && parent->num_interfaces) { + zend_do_inherit_interfaces(ce, parent); } if ((ce->ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) == ZEND_ACC_IMPLICIT_ABSTRACT_CLASS) { zend_verify_abstract_class(ce); @@ -2542,6 +2533,9 @@ zend_bool zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, } } zend_do_inheritance_ex(ce, parent_ce, status == INHERITANCE_SUCCESS); + if (parent_ce && parent_ce->num_interfaces) { + zend_do_inherit_interfaces(ce, parent_ce); + } zend_build_properties_info_table(ce); if ((ce->ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) == ZEND_ACC_IMPLICIT_ABSTRACT_CLASS) { zend_verify_abstract_class(ce); diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index fe403b3d7ae46..cf8b24d76ab8d 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -313,59 +313,39 @@ static int zend_implement_traversable(zend_class_entry *interface, zend_class_en /* {{{ zend_implement_aggregate */ static int zend_implement_aggregate(zend_class_entry *interface, zend_class_entry *class_type) { - uint32_t i; - int t = -1; - zend_class_iterator_funcs *funcs_ptr; + if (zend_class_implements_interface(class_type, zend_ce_iterator)) { + zend_error_noreturn(E_ERROR, + "Class %s cannot implement both Iterator and IteratorAggregate at the same time", + ZSTR_VAL(class_type->name)); + } - if (class_type->get_iterator) { - if (class_type->type == ZEND_INTERNAL_CLASS) { - /* inheritance ensures the class has necessary userland methods */ + zend_function *zf = zend_hash_str_find_ptr( + &class_type->function_table, "getiterator", sizeof("getiterator") - 1); + if (class_type->get_iterator && class_type->get_iterator != zend_user_it_get_new_iterator) { + /* get_iterator was explicitly assigned for an internal class. */ + if (!class_type->parent || class_type->parent->get_iterator != class_type->get_iterator) { + ZEND_ASSERT(class_type->type == ZEND_INTERNAL_CLASS); return SUCCESS; - } else if (class_type->get_iterator != zend_user_it_get_new_iterator) { - /* c-level get_iterator cannot be changed (exception being only Traversable is implemented) */ - if (class_type->num_interfaces) { - ZEND_ASSERT(class_type->ce_flags & ZEND_ACC_RESOLVED_INTERFACES); - for (i = 0; i < class_type->num_interfaces; i++) { - if (class_type->interfaces[i] == zend_ce_iterator) { - zend_error_noreturn(E_ERROR, "Class %s cannot implement both %s and %s at the same time", - ZSTR_VAL(class_type->name), - ZSTR_VAL(interface->name), - ZSTR_VAL(zend_ce_iterator->name)); - return FAILURE; - } - if (class_type->interfaces[i] == zend_ce_traversable) { - t = i; - } - } - } - if (t == -1) { - return FAILURE; - } } - } - if (class_type->parent - && (class_type->parent->ce_flags & ZEND_ACC_REUSE_GET_ITERATOR)) { - class_type->get_iterator = class_type->parent->get_iterator; - class_type->ce_flags |= ZEND_ACC_REUSE_GET_ITERATOR; - } else { - class_type->get_iterator = zend_user_it_get_new_iterator; - } - funcs_ptr = class_type->iterator_funcs_ptr; - if (class_type->type == ZEND_INTERNAL_CLASS) { - if (!funcs_ptr) { - funcs_ptr = calloc(1, sizeof(zend_class_iterator_funcs)); - class_type->iterator_funcs_ptr = funcs_ptr; - } - funcs_ptr->zf_new_iterator = zend_hash_str_find_ptr(&class_type->function_table, "getiterator", sizeof("getiterator") - 1); - } else { - if (!funcs_ptr) { - funcs_ptr = zend_arena_alloc(&CG(arena), sizeof(zend_class_iterator_funcs)); - class_type->iterator_funcs_ptr = funcs_ptr; - memset(funcs_ptr, 0, sizeof(zend_class_iterator_funcs)); - } else { - funcs_ptr->zf_new_iterator = NULL; + + /* The getIterator() method has not been overwritten, use inherited get_iterator(). */ + if (zf->common.scope != class_type) { + return SUCCESS; } + + /* getIterator() has been overwritten, switch to zend_user_it_get_new_iterator. */ } + + ZEND_ASSERT(!class_type->iterator_funcs_ptr && "Iterator funcs already set?"); + zend_class_iterator_funcs *funcs_ptr = class_type->type == ZEND_INTERNAL_CLASS + ? pemalloc(sizeof(zend_class_iterator_funcs), 1) + : zend_arena_alloc(&CG(arena), sizeof(zend_class_iterator_funcs)); + class_type->get_iterator = zend_user_it_get_new_iterator; + class_type->iterator_funcs_ptr = funcs_ptr; + + memset(funcs_ptr, 0, sizeof(zend_class_iterator_funcs)); + funcs_ptr->zf_new_iterator = zf; + return SUCCESS; } /* }}} */ @@ -373,55 +353,35 @@ static int zend_implement_aggregate(zend_class_entry *interface, zend_class_entr /* {{{ zend_implement_iterator */ static int zend_implement_iterator(zend_class_entry *interface, zend_class_entry *class_type) { - zend_class_iterator_funcs *funcs_ptr; + if (zend_class_implements_interface(class_type, zend_ce_aggregate)) { + zend_error_noreturn(E_ERROR, + "Class %s cannot implement both Iterator and IteratorAggregate at the same time", + ZSTR_VAL(class_type->name)); + } if (class_type->get_iterator && class_type->get_iterator != zend_user_it_get_iterator) { - if (class_type->type == ZEND_INTERNAL_CLASS) { - /* inheritance ensures the class has the necessary userland methods */ + if (!class_type->parent || class_type->parent->get_iterator != class_type->get_iterator) { + /* get_iterator was explicitly assigned for an internal class. */ + ZEND_ASSERT(class_type->type == ZEND_INTERNAL_CLASS); return SUCCESS; - } else { - /* c-level get_iterator cannot be changed */ - if (class_type->get_iterator == zend_user_it_get_new_iterator) { - zend_error_noreturn(E_ERROR, "Class %s cannot implement both %s and %s at the same time", - ZSTR_VAL(class_type->name), - ZSTR_VAL(interface->name), - ZSTR_VAL(zend_ce_aggregate->name)); - } - return FAILURE; } + /* Otherwise get_iterator was inherited from the parent by default. */ } - if (class_type->parent - && (class_type->parent->ce_flags & ZEND_ACC_REUSE_GET_ITERATOR)) { - class_type->get_iterator = class_type->parent->get_iterator; + + if (class_type->parent && (class_type->parent->ce_flags & ZEND_ACC_REUSE_GET_ITERATOR)) { + /* Keep the inherited get_iterator handler. */ class_type->ce_flags |= ZEND_ACC_REUSE_GET_ITERATOR; } else { class_type->get_iterator = zend_user_it_get_iterator; } - funcs_ptr = class_type->iterator_funcs_ptr; - if (class_type->type == ZEND_INTERNAL_CLASS) { - if (!funcs_ptr) { - funcs_ptr = calloc(1, sizeof(zend_class_iterator_funcs)); - class_type->iterator_funcs_ptr = funcs_ptr; - } else { - funcs_ptr->zf_rewind = zend_hash_str_find_ptr(&class_type->function_table, "rewind", sizeof("rewind") - 1); - funcs_ptr->zf_valid = zend_hash_str_find_ptr(&class_type->function_table, "valid", sizeof("valid") - 1); - funcs_ptr->zf_key = zend_hash_str_find_ptr(&class_type->function_table, "key", sizeof("key") - 1); - funcs_ptr->zf_current = zend_hash_str_find_ptr(&class_type->function_table, "current", sizeof("current") - 1); - funcs_ptr->zf_next = zend_hash_str_find_ptr(&class_type->function_table, "next", sizeof("next") - 1); - } - } else { - if (!funcs_ptr) { - funcs_ptr = zend_arena_alloc(&CG(arena), sizeof(zend_class_iterator_funcs)); - class_type->iterator_funcs_ptr = funcs_ptr; - memset(funcs_ptr, 0, sizeof(zend_class_iterator_funcs)); - } else { - funcs_ptr->zf_valid = NULL; - funcs_ptr->zf_current = NULL; - funcs_ptr->zf_key = NULL; - funcs_ptr->zf_next = NULL; - funcs_ptr->zf_rewind = NULL; - } - } + + ZEND_ASSERT(!class_type->iterator_funcs_ptr && "Iterator funcs already set?"); + zend_class_iterator_funcs *funcs_ptr = class_type->type == ZEND_INTERNAL_CLASS + ? pemalloc(sizeof(zend_class_iterator_funcs), 1) + : zend_arena_alloc(&CG(arena), sizeof(zend_class_iterator_funcs)); + memset(funcs_ptr, 0, sizeof(zend_class_iterator_funcs)); + class_type->iterator_funcs_ptr = funcs_ptr; + return SUCCESS; } /* }}} */ From 04c9c4ae7d8a11c132e8275735dcf457709a0cbd Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 4 Mar 2020 12:11:44 +0100 Subject: [PATCH 153/201] Fix intermittent test failures of windows_mb_path tests Some of these tests create, use and later remove the same folder, so if these are run in parallel, they may fail due to race conditions[1]. As quick fix we add appropriate CONFLICTS clauses to prevent parallel execution of the respective test groups. [1] --- ext/standard/tests/file/windows_mb_path/bug71509.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_big5_0.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_big5_1.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_big5_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_big5_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_big5_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_big5_to_utf8_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt | 2 ++ .../file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt | 2 ++ .../file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt | 2 ++ .../file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt | 2 ++ ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt | 2 ++ .../tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_kartuli_utf8_0.phpt | 2 ++ .../tests/file/windows_mb_path/test_kartuli_utf8_1.phpt | 2 ++ .../tests/file/windows_mb_path/test_kartuli_utf8_2.phpt | 2 ++ .../tests/file/windows_mb_path/test_kartuli_utf8_3.phpt | 2 ++ .../tests/file/windows_mb_path/test_readdir_mb_names.phpt | 2 ++ .../tests/file/windows_mb_path/test_rename_mb_names.phpt | 2 ++ 80 files changed, 160 insertions(+) diff --git a/ext/standard/tests/file/windows_mb_path/bug71509.phpt b/ext/standard/tests/file/windows_mb_path/bug71509.phpt index ed094c6b7a599..4193aeded38c9 100644 --- a/ext/standard/tests/file/windows_mb_path/bug71509.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug71509.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts("zip"); ?> +--CONFLICTS-- +bug71509 --FILE-- +--CONFLICTS-- +file_big5 --INI-- defalut_charset=big5 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt index ad1677038134b..bfebe425782d4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(950, "ansi"); ?> +--CONFLICTS-- +dir_big5 --INI-- internal_encoding=big5 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt index 088c46d7b6e9e..a768c2397bfeb 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(950, "ansi"); ?> +--CONFLICTS-- +file_big5 --INI-- defalut_charset=cp950 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt index f738b9f5be03e..1d3e506135c20 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_big5 --FILE-- +--CONFLICTS-- +dir_big5 --FILE-- +--CONFLICTS-- +file_big5 --FILE-- +--CONFLICTS-- +file_cp1250 --FILE-- +--CONFLICTS-- +dir_cp1250 --FILE-- +--CONFLICTS-- +dir_cp1250 --FILE-- +--CONFLICTS-- +file_cp1250 --FILE-- +--CONFLICTS-- +dir_cp1250 --FILE-- +--CONFLICTS-- +dir_cp1250 --FILE-- +--CONFLICTS-- +file_cp1251 --INI-- default_charset=cp1251 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt index 049800a0aa0b2..6bda2bc3564e8 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(1251, "ansi"); ?> +--CONFLICTS-- +dir_cp1251 --INI-- default_charset=cp1251 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt index 7d3290d99e469..28a8c4af21703 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(1251, "ansi"); ?> +--CONFLICTS-- +file_cp1251 --INI-- internal_encoding=cp1251 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt index 27ba191d0d52f..c27d087bf45e3 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_cp1251 --FILE-- +--CONFLICTS-- +dir_cp1251 --FILE-- +--CONFLICTS-- +file_cp1251 --FILE-- +--CONFLICTS-- +file_cp1251 --FILE-- +--CONFLICTS-- +dir_cp1251 --FILE-- +--CONFLICTS-- +file_cp1251 --FILE-- +--CONFLICTS-- +file --INI-- internal_encoding=cp1252 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt index dc673c260be43..ec0692a05a8b1 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_cp1252 --FILE-- +--CONFLICTS-- +dir_cp1252 --FILE-- +--CONFLICTS-- +dir_cp1252 --FILE-- +--CONFLICTS-- +file2_cp1252 --FILE-- +--CONFLICTS-- +dir2_cp1252 --FILE-- +--CONFLICTS-- +dir2_cp1252 --FILE-- +--CONFLICTS-- +file_cp1253 --INI-- internal_encoding=cp1253 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt index 9f03a9115c597..aa83356c64cd8 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(1253, "ansi"); ?> +--CONFLICTS-- +dir_cp1253 --INI-- default_charset=cp1253 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt index 1ab6f658c0498..d104e34ceb322 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(1253, "ansi"); ?> +--CONFLICTS-- +dir_cp1253 --INI-- internal_encoding=cp1253 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt index 64ad358b5ca83..bf7bc84d74357 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_cp1253 --FILE-- +--CONFLICTS-- +dir_cp1253 --FILE-- +--CONFLICTS-- +dir_cp1253 --FILE-- +--CONFLICTS-- +file_cp1254 --INI-- default_charset=cp1254 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt index 8f79a2982ba65..9cda42f686573 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(857, "oem"); ?> +--CONFLICTS-- +dir_cp1254 --INI-- internal_encoding=cp1254 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt index d924f87edddc4..22030a24f31d2 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(857, "oem"); ?> +--CONFLICTS-- +dir_cp1254 --INI-- internal_encoding=cp1254 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt index da264f9e3ec49..3711bd74f91be 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(1254, "ansi"); ?> +--CONFLICTS-- +file_cp1254 --INI-- default_charset=cp1254 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt index b79e0f466f553..c3ad1eccc67c7 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_cp1254 --FILE-- +--CONFLICTS-- +dir_cp1254 --FILE-- +--CONFLICTS-- +dir_cp1254 --FILE-- +--CONFLICTS-- +file_cp1254 --FILE-- +--CONFLICTS-- +file_cp1255 --INI-- internal_encoding=cp1255 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt index 4da386eaa49cd..18ac39a05d0f8 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(1255, "ansi"); ?> +--CONFLICTS-- +dir_cp1255 --INI-- default_charset=cp1255 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt index e5b6f4cf778d0..781d84589659b 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(1255, "ansi"); ?> +--CONFLICTS-- +dir_cp1255 --INI-- internal_encoding=cp1255 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt index b8937a2f9e9e0..5ea5915c327a5 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_cp1255 --FILE-- +--CONFLICTS-- +dir_cp1255 --FILE-- +--CONFLICTS-- +dir_cp1255 --FILE-- +--CONFLICTS-- +file_cp1256 --INI-- internal_encoding=cp1256 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt index ec95e582d99ca..afda00330ddb0 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(1256, "ansi"); ?> +--CONFLICTS-- +dir_cp1256 --INI-- internal_encoding=cp1256 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt index fd7303f1e75c7..95fe6c56c73e9 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(1256, "ansi"); ?> +--CONFLICTS-- +dir_cp1256 --INI-- default_charset=cp1256 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt index 25e1118fcb5a4..b13c54278f960 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_cp1256 --FILE-- +--CONFLICTS-- +dir_cp1256 --FILE-- +--CONFLICTS-- +dir_cp1256 --FILE-- +--CONFLICTS-- +file_cp874 --INI-- internal_encoding=cp874 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt index 1bc8fca100f24..951f9c0650481 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_cp874 --FILE-- +--CONFLICTS-- +file_cp932 --INI-- default_charset=cp932 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt index 9163f87b33464..0cd6474276308 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(932, "oem"); ?> +--CONFLICTS-- +dir_cp932 --INI-- default_charset=cp932 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt index 149c0fe595103..0da56cefcc2be 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(932, "oem"); ?> +--CONFLICTS-- +dir_cp932 --INI-- internal_encoding=cp932 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt index a6fd814203f90..0c9ad8ee71178 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(932, "ansi"); ?> +--CONFLICTS-- +file_cp932 --INI-- internal_encoding=cp932 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt index b845e313b3b29..1a7e98cbea312 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_cp932 --FILE-- +--CONFLICTS-- +dir_cp932 --FILE-- +--CONFLICTS-- +dir_cp932 --FILE-- +--CONFLICTS-- +file_cp936 --INI-- internal_encoding=cp936 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt index d7ee04bf9efcf..67d45b9c62ab4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(936, "oem"); ?> +--CONFLICTS-- +dir_cp936 --INI-- internal_encoding=cp936 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt index eef4e4915ea24..bba68d6871adf 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt @@ -10,6 +10,8 @@ skip_if_no_required_exts(); skip_if_wrong_cp(936, "oem"); ?> +--CONFLICTS-- +file_cp936 --INI-- default_charset=cp936 --FILE-- diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt index 52b164fdb2ea6..2d6aa24f33c46 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt @@ -9,6 +9,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); skip_if_no_required_exts(); ?> +--CONFLICTS-- +file_cp936 --FILE-- +--CONFLICTS-- +dir_cp936 --FILE-- +--CONFLICTS-- +file_cp936 --FILE-- +--CONFLICTS-- +dir_mb --FILE-- +--CONFLICTS-- +file_eucjp --FILE-- +--CONFLICTS-- +dir_eucjp --FILE-- +--CONFLICTS-- +dir_eucjp --FILE-- +--CONFLICTS-- +file_kartuli --FILE-- +--CONFLICTS-- +dir_kartuli --FILE-- +--CONFLICTS-- +dir_kartuli --FILE-- +--CONFLICTS-- +file_kartuli --FILE-- +--CONFLICTS-- +mb_names --FILE-- +--CONFLICTS-- +file2_mb --FILE-- Date: Wed, 4 Mar 2020 12:35:49 +0100 Subject: [PATCH 154/201] Use separate typedef for bucket comparison function Avoid performing the same casting dance inside each sort compare function. --- UPGRADING.INTERNALS | 8 + Zend/zend_hash.c | 6 +- Zend/zend_hash.h | 6 +- Zend/zend_ini.c | 8 +- Zend/zend_ts_hash.c | 4 +- Zend/zend_ts_hash.h | 4 +- ext/intl/collator/collator_sort.c | 14 +- ext/opcache/jit/zend_jit_disasm_x86.c | 2 +- ext/phar/dirstream.c | 20 +-- ext/standard/array.c | 203 +++++++++----------------- ext/standard/info.c | 5 +- ext/standard/php_array.h | 2 +- sapi/cgi/cgi_main.c | 5 +- sapi/cli/php_cli.c | 5 +- sapi/fpm/fpm/fpm_main.c | 5 +- sapi/phpdbg/phpdbg_wait.c | 10 +- 16 files changed, 104 insertions(+), 203 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index af8c5218c25f3..e7c3f5495bbef 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -14,6 +14,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES k. The 'I' length modifier l. Some VM instructions switched to IS_TMP_VAR result instead of IS_VAR m. All internal functions must have arginfo + n. zend_hash_sort compare function signature change 2. Build system changes a. Abstract @@ -102,6 +103,13 @@ PHP 8.0 INTERNALS UPGRADE NOTES m. All internal functions and methods are now required to specify arginfo information, otherwise warnings will be thrown on startup. + n. The zend_hash_sort and zend_hash_minmax APIs now accept a comparison + function with the following signature: + + typedef int (*bucket_compare_func_t)(Bucket *a, Bucket *b); + + Previously compare_func_t was used, which accepted void pointers. + ======================== 2. Build system changes ======================== diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 7a251ecaca1f8..ebbcf6634f550 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -2468,7 +2468,7 @@ ZEND_API void zend_hash_bucket_packed_swap(Bucket *p, Bucket *q) q->h = h; } -ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort, compare_func_t compar, zend_bool renumber) +ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort, bucket_compare_func_t compar, zend_bool renumber) { Bucket *p; uint32_t i, j; @@ -2493,7 +2493,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort, c } } - sort((void *)ht->arData, i, sizeof(Bucket), compar, + sort((void *)ht->arData, i, sizeof(Bucket), (compare_func_t) compar, (swap_func_t)(renumber? zend_hash_bucket_renum_swap : ((HT_FLAGS(ht) & HASH_FLAG_PACKED) ? zend_hash_bucket_packed_swap : zend_hash_bucket_swap))); @@ -2642,7 +2642,7 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co } -ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, compare_func_t compar, uint32_t flag) +ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, bucket_compare_func_t compar, uint32_t flag) { uint32_t idx; Bucket *p, *res; diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 7263c47a822fc..4d3fffd59622d 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -264,9 +264,11 @@ ZEND_API void ZEND_FASTCALL zend_hash_merge_ex(HashTable *target, HashTable *so ZEND_API void zend_hash_bucket_swap(Bucket *p, Bucket *q); ZEND_API void zend_hash_bucket_renum_swap(Bucket *p, Bucket *q); ZEND_API void zend_hash_bucket_packed_swap(Bucket *p, Bucket *q); + +typedef int (*bucket_compare_func_t)(Bucket *a, Bucket *b); ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered); -ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, zend_bool renumber); -ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, compare_func_t compar, uint32_t flag); +ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, zend_bool renumber); +ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, bucket_compare_func_t compar, uint32_t flag); #define zend_hash_sort(ht, compare_func, renumber) \ zend_hash_sort_ex(ht, zend_sort, compare_func, renumber) diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index b33161cc74b7c..a2344653bc4b0 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -171,14 +171,8 @@ ZEND_API int zend_copy_ini_directives(void) /* {{{ */ /* }}} */ #endif -static int ini_key_compare(const void *a, const void *b) /* {{{ */ +static int ini_key_compare(Bucket *f, Bucket *s) /* {{{ */ { - const Bucket *f; - const Bucket *s; - - f = (const Bucket *) a; - s = (const Bucket *) b; - if (!f->key && !s->key) { /* both numeric */ if (f->h > s->h) { return -1; diff --git a/Zend/zend_ts_hash.c b/Zend/zend_ts_hash.c index 6b69b49e1594d..34cc7419a841b 100644 --- a/Zend/zend_ts_hash.c +++ b/Zend/zend_ts_hash.c @@ -264,7 +264,7 @@ ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, co end_read(source); } -ZEND_API void zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber) +ZEND_API void zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, int renumber) { begin_write(ht); zend_hash_sort_ex(TS_HASH(ht), sort_func, compare_func, renumber); @@ -284,7 +284,7 @@ ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_fu return retval; } -ZEND_API zval *zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag) +ZEND_API zval *zend_ts_hash_minmax(TsHashTable *ht, bucket_compare_func_t compar, int flag) { zval *retval; diff --git a/Zend/zend_ts_hash.h b/Zend/zend_ts_hash.h index 88aa4d45f4b16..e224d0217c7e9 100644 --- a/Zend/zend_ts_hash.h +++ b/Zend/zend_ts_hash.h @@ -73,9 +73,9 @@ ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_c ZEND_API void zend_ts_hash_copy_to_hash(HashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor); ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, int overwrite); ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, merge_checker_func_t pMergeSource, void *pParam); -ZEND_API void zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber); +ZEND_API void zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, int renumber); ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered); -ZEND_API zval *zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag); +ZEND_API zval *zend_ts_hash_minmax(TsHashTable *ht, bucket_compare_func_t compar, int flag); ZEND_API int zend_ts_hash_num_elements(TsHashTable *ht); diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index cc3e6b6236a7f..e7349247d5026 100644 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -208,19 +208,11 @@ static int collator_icu_compare_function(zval *result, zval *op1, zval *op2) /* {{{ collator_compare_func * Taken from PHP7 source (array_data_compare). */ -static int collator_compare_func( const void* a, const void* b ) +static int collator_compare_func(Bucket *f, Bucket *s) { - Bucket *f; - Bucket *s; zval result; - zval *first; - zval *second; - - f = (Bucket *) a; - s = (Bucket *) b; - - first = &f->val; - second = &s->val; + zval *first = &f->val; + zval *second = &s->val; if( INTL_G(compare_func)( &result, first, second) == FAILURE ) return 0; diff --git a/ext/opcache/jit/zend_jit_disasm_x86.c b/ext/opcache/jit/zend_jit_disasm_x86.c index 4ee7f2277cf42..05ece4d2766f5 100644 --- a/ext/opcache/jit/zend_jit_disasm_x86.c +++ b/ext/opcache/jit/zend_jit_disasm_x86.c @@ -292,7 +292,7 @@ static int zend_jit_disasm(const char *name, } } - zend_hash_sort(&labels, (compare_func_t)zend_jit_cmp_labels, 0); + zend_hash_sort(&labels, zend_jit_cmp_labels, 0); /* label numbering */ n = 0; m = 0; diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c index cb14f9e986cdd..7ddd7b564bfaa 100644 --- a/ext/phar/dirstream.c +++ b/ext/phar/dirstream.c @@ -152,23 +152,11 @@ static int phar_add_empty(HashTable *ht, char *arKey, uint32_t nKeyLength) /* { /** * Used for sorting directories alphabetically */ -static int phar_compare_dir_name(const void *a, const void *b) /* {{{ */ +static int phar_compare_dir_name(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f; - Bucket *s; - int result; - - f = (Bucket *) a; - s = (Bucket *) b; - result = zend_binary_strcmp(ZSTR_VAL(f->key), ZSTR_LEN(f->key), ZSTR_VAL(s->key), ZSTR_LEN(s->key)); - - if (result < 0) { - return -1; - } else if (result > 0) { - return 1; - } else { - return 0; - } + int result = zend_binary_strcmp( + ZSTR_VAL(f->key), ZSTR_LEN(f->key), ZSTR_VAL(s->key), ZSTR_LEN(s->key)); + return ZEND_NORMALIZE_BOOL(result); } /* }}} */ diff --git a/ext/standard/array.c b/ext/standard/array.c index 9e0af6f07c006..fcef9b07c6ac0 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -132,10 +132,8 @@ PHP_MSHUTDOWN_FUNCTION(array) /* {{{ */ } /* }}} */ -static int php_array_key_compare(const void *a, const void *b) /* {{{ */ +static int php_array_key_compare(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; zend_uchar t; zend_long l1, l2; double d; @@ -173,17 +171,14 @@ static int php_array_key_compare(const void *a, const void *b) /* {{{ */ } /* }}} */ -static int php_array_reverse_key_compare(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_key_compare(Bucket *a, Bucket *b) /* {{{ */ { return php_array_key_compare(b, a); } /* }}} */ -static int php_array_key_compare_numeric(const void *a, const void *b) /* {{{ */ +static int php_array_key_compare_numeric(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; - if (f->key == NULL && s->key == NULL) { return (zend_long)f->h > (zend_long)s->h ? 1 : -1; } else { @@ -203,16 +198,14 @@ static int php_array_key_compare_numeric(const void *a, const void *b) /* {{{ */ } /* }}} */ -static int php_array_reverse_key_compare_numeric(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_key_compare_numeric(Bucket *a, Bucket *b) /* {{{ */ { return php_array_key_compare_numeric(b, a); } /* }}} */ -static int php_array_key_compare_string_case(const void *a, const void *b) /* {{{ */ +static int php_array_key_compare_string_case(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; const char *s1, *s2; size_t l1, l2; char buf1[MAX_LENGTH_OF_LONG + 1]; @@ -236,16 +229,14 @@ static int php_array_key_compare_string_case(const void *a, const void *b) /* {{ } /* }}} */ -static int php_array_reverse_key_compare_string_case(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_key_compare_string_case(Bucket *a, Bucket *b) /* {{{ */ { return php_array_key_compare_string_case(b, a); } /* }}} */ -static int php_array_key_compare_string(const void *a, const void *b) /* {{{ */ +static int php_array_key_compare_string(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; const char *s1, *s2; size_t l1, l2; char buf1[MAX_LENGTH_OF_LONG + 1]; @@ -269,16 +260,14 @@ static int php_array_key_compare_string(const void *a, const void *b) /* {{{ */ } /* }}} */ -static int php_array_reverse_key_compare_string(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_key_compare_string(Bucket *a, Bucket *b) /* {{{ */ { return php_array_key_compare_string(b, a); } /* }}} */ -static int php_array_key_compare_string_natural_general(const void *a, const void *b, int fold_case) /* {{{ */ +static int php_array_key_compare_string_natural_general(Bucket *f, Bucket *s, int fold_case) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; const char *s1, *s2; size_t l1, l2; char buf1[MAX_LENGTH_OF_LONG + 1]; @@ -302,34 +291,32 @@ static int php_array_key_compare_string_natural_general(const void *a, const voi } /* }}} */ -static int php_array_key_compare_string_natural_case(const void *a, const void *b) /* {{{ */ +static int php_array_key_compare_string_natural_case(Bucket *a, Bucket *b) /* {{{ */ { return php_array_key_compare_string_natural_general(a, b, 1); } /* }}} */ -static int php_array_reverse_key_compare_string_natural_case(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_key_compare_string_natural_case(Bucket *a, Bucket *b) /* {{{ */ { return php_array_key_compare_string_natural_general(b, a, 1); } /* }}} */ -static int php_array_key_compare_string_natural(const void *a, const void *b) /* {{{ */ +static int php_array_key_compare_string_natural(Bucket *a, Bucket *b) /* {{{ */ { return php_array_key_compare_string_natural_general(a, b, 0); } /* }}} */ -static int php_array_reverse_key_compare_string_natural(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_key_compare_string_natural(Bucket *a, Bucket *b) /* {{{ */ { return php_array_key_compare_string_natural_general(b, a, 0); } /* }}} */ -static int php_array_key_compare_string_locale(const void *a, const void *b) /* {{{ */ +static int php_array_key_compare_string_locale(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; const char *s1, *s2; char buf1[MAX_LENGTH_OF_LONG + 1]; char buf2[MAX_LENGTH_OF_LONG + 1]; @@ -348,30 +335,16 @@ static int php_array_key_compare_string_locale(const void *a, const void *b) /* } /* }}} */ -static int php_array_reverse_key_compare_string_locale(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_key_compare_string_locale(Bucket *a, Bucket *b) /* {{{ */ { return php_array_key_compare_string_locale(b, a); } /* }}} */ -/* Numbers are always smaller than strings int this function as it - * anyway doesn't make much sense to compare two different data types. - * This keeps it consistent and simple. - * - * This is not correct any more, depends on what compare_func is set to. - */ -static int php_array_data_compare(const void *a, const void *b) /* {{{ */ +static int php_array_data_compare(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f; - Bucket *s; - zval *first; - zval *second; - - f = (Bucket *) a; - s = (Bucket *) b; - - first = &f->val; - second = &s->val; + zval *first = &f->val; + zval *second = &s->val; if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) { first = Z_INDIRECT_P(first); @@ -383,24 +356,16 @@ static int php_array_data_compare(const void *a, const void *b) /* {{{ */ } /* }}} */ -static int php_array_reverse_data_compare(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_data_compare(Bucket *a, Bucket *b) /* {{{ */ { return php_array_data_compare(a, b) * -1; } /* }}} */ -static int php_array_data_compare_numeric(const void *a, const void *b) /* {{{ */ +static int php_array_data_compare_numeric(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f; - Bucket *s; - zval *first; - zval *second; - - f = (Bucket *) a; - s = (Bucket *) b; - - first = &f->val; - second = &s->val; + zval *first = &f->val; + zval *second = &s->val; if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) { first = Z_INDIRECT_P(first); @@ -413,24 +378,16 @@ static int php_array_data_compare_numeric(const void *a, const void *b) /* {{{ * } /* }}} */ -static int php_array_reverse_data_compare_numeric(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_data_compare_numeric(Bucket *a, Bucket *b) /* {{{ */ { return php_array_data_compare_numeric(b, a); } /* }}} */ -static int php_array_data_compare_string_case(const void *a, const void *b) /* {{{ */ +static int php_array_data_compare_string_case(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f; - Bucket *s; - zval *first; - zval *second; - - f = (Bucket *) a; - s = (Bucket *) b; - - first = &f->val; - second = &s->val; + zval *first = &f->val; + zval *second = &s->val; if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) { first = Z_INDIRECT_P(first); @@ -443,24 +400,16 @@ static int php_array_data_compare_string_case(const void *a, const void *b) /* { } /* }}} */ -static int php_array_reverse_data_compare_string_case(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_data_compare_string_case(Bucket *a, Bucket *b) /* {{{ */ { return php_array_data_compare_string_case(b, a); } /* }}} */ -static int php_array_data_compare_string(const void *a, const void *b) /* {{{ */ +static int php_array_data_compare_string(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f; - Bucket *s; - zval *first; - zval *second; - - f = (Bucket *) a; - s = (Bucket *) b; - - first = &f->val; - second = &s->val; + zval *first = &f->val; + zval *second = &s->val; if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) { first = Z_INDIRECT_P(first); @@ -473,16 +422,14 @@ static int php_array_data_compare_string(const void *a, const void *b) /* {{{ */ } /* }}} */ -static int php_array_reverse_data_compare_string(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_data_compare_string(Bucket *a, Bucket *b) /* {{{ */ { return php_array_data_compare_string(b, a); } /* }}} */ -static int php_array_natural_general_compare(const void *a, const void *b, int fold_case) /* {{{ */ +static int php_array_natural_general_compare(Bucket *f, Bucket *s, int fold_case) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; zend_string *tmp_str1, *tmp_str2; zend_string *str1 = zval_get_tmp_string(&f->val, &tmp_str1); zend_string *str2 = zval_get_tmp_string(&s->val, &tmp_str2); @@ -495,42 +442,34 @@ static int php_array_natural_general_compare(const void *a, const void *b, int f } /* }}} */ -static int php_array_natural_compare(const void *a, const void *b) /* {{{ */ +static int php_array_natural_compare(Bucket *a, Bucket *b) /* {{{ */ { return php_array_natural_general_compare(a, b, 0); } /* }}} */ -static int php_array_reverse_natural_compare(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_natural_compare(Bucket *a, Bucket *b) /* {{{ */ { return php_array_natural_general_compare(b, a, 0); } /* }}} */ -static int php_array_natural_case_compare(const void *a, const void *b) /* {{{ */ +static int php_array_natural_case_compare(Bucket *a, Bucket *b) /* {{{ */ { return php_array_natural_general_compare(a, b, 1); } /* }}} */ -static int php_array_reverse_natural_case_compare(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_natural_case_compare(Bucket *a, Bucket *b) /* {{{ */ { return php_array_natural_general_compare(b, a, 1); } /* }}} */ -static int php_array_data_compare_string_locale(const void *a, const void *b) /* {{{ */ +static int php_array_data_compare_string_locale(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f; - Bucket *s; - zval *first; - zval *second; - - f = (Bucket *) a; - s = (Bucket *) b; - - first = &f->val; - second = &s->val; + zval *first = &f->val; + zval *second = &s->val; if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) { first = Z_INDIRECT_P(first); @@ -543,13 +482,13 @@ static int php_array_data_compare_string_locale(const void *a, const void *b) /* } /* }}} */ -static int php_array_reverse_data_compare_string_locale(const void *a, const void *b) /* {{{ */ +static int php_array_reverse_data_compare_string_locale(Bucket *a, Bucket *b) /* {{{ */ { return php_array_data_compare_string_locale(b, a); } /* }}} */ -static compare_func_t php_get_key_compare_func(zend_long sort_type, int reverse) /* {{{ */ +static bucket_compare_func_t php_get_key_compare_func(zend_long sort_type, int reverse) /* {{{ */ { switch (sort_type & ~PHP_SORT_FLAG_CASE) { case PHP_SORT_NUMERIC: @@ -613,7 +552,7 @@ static compare_func_t php_get_key_compare_func(zend_long sort_type, int reverse) } /* }}} */ -static compare_func_t php_get_data_compare_func(zend_long sort_type, int reverse) /* {{{ */ +static bucket_compare_func_t php_get_data_compare_func(zend_long sort_type, int reverse) /* {{{ */ { switch (sort_type & ~PHP_SORT_FLAG_CASE) { case PHP_SORT_NUMERIC: @@ -683,7 +622,7 @@ PHP_FUNCTION(krsort) { zval *array; zend_long sort_type = PHP_SORT_REGULAR; - compare_func_t cmp; + bucket_compare_func_t cmp; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY_EX(array, 0, 1) @@ -705,7 +644,7 @@ PHP_FUNCTION(ksort) { zval *array; zend_long sort_type = PHP_SORT_REGULAR; - compare_func_t cmp; + bucket_compare_func_t cmp; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY_EX(array, 0, 1) @@ -860,7 +799,7 @@ PHP_FUNCTION(asort) { zval *array; zend_long sort_type = PHP_SORT_REGULAR; - compare_func_t cmp; + bucket_compare_func_t cmp; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY_EX(array, 0, 1) @@ -882,7 +821,7 @@ PHP_FUNCTION(arsort) { zval *array; zend_long sort_type = PHP_SORT_REGULAR; - compare_func_t cmp; + bucket_compare_func_t cmp; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY_EX(array, 0, 1) @@ -904,7 +843,7 @@ PHP_FUNCTION(sort) { zval *array; zend_long sort_type = PHP_SORT_REGULAR; - compare_func_t cmp; + bucket_compare_func_t cmp; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY_EX(array, 0, 1) @@ -926,7 +865,7 @@ PHP_FUNCTION(rsort) { zval *array; zend_long sort_type = PHP_SORT_REGULAR; - compare_func_t cmp; + bucket_compare_func_t cmp; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY_EX(array, 0, 1) @@ -942,16 +881,11 @@ PHP_FUNCTION(rsort) } /* }}} */ -static int php_array_user_compare(const void *a, const void *b) /* {{{ */ +static int php_array_user_compare(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f; - Bucket *s; zval args[2]; zval retval; - f = (Bucket *) a; - s = (Bucket *) b; - ZVAL_COPY(&args[0], &f->val); ZVAL_COPY(&args[1], &s->val); @@ -1003,7 +937,7 @@ static int php_array_user_compare(const void *a, const void *b) /* {{{ */ BG(user_compare_fci) = old_user_compare_fci; \ BG(user_compare_fci_cache) = old_user_compare_fci_cache; \ -static void php_usort(INTERNAL_FUNCTION_PARAMETERS, compare_func_t compare_func, zend_bool renumber) /* {{{ */ +static void php_usort(INTERNAL_FUNCTION_PARAMETERS, bucket_compare_func_t compare_func, zend_bool renumber) /* {{{ */ { zval *array; zend_array *arr; @@ -1051,17 +985,12 @@ PHP_FUNCTION(uasort) } /* }}} */ -static int php_array_user_key_compare(const void *a, const void *b) /* {{{ */ +static int php_array_user_key_compare(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f; - Bucket *s; zval args[2]; zval retval; zend_long result; - f = (Bucket *) a; - s = (Bucket *) b; - if (f->key == NULL) { ZVAL_LONG(&args[0], f->h); } else { @@ -4559,7 +4488,7 @@ PHP_FUNCTION(array_unique) struct bucketindex *arTmp, *cmpdata, *lastkept; unsigned int i; zend_long sort_type = PHP_SORT_STRING; - compare_func_t cmp; + bucket_compare_func_t cmp; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(array) @@ -4627,11 +4556,11 @@ PHP_FUNCTION(array_unique) } ZVAL_UNDEF(&arTmp[i].b.val); zend_sort((void *) arTmp, i, sizeof(struct bucketindex), - cmp, (swap_func_t)array_bucketindex_swap); + (compare_func_t) cmp, (swap_func_t)array_bucketindex_swap); /* go through the sorted array and delete duplicates from the copy */ lastkept = arTmp; for (cmpdata = arTmp + 1; Z_TYPE(cmpdata->b.val) != IS_UNDEF; cmpdata++) { - if (cmp(lastkept, cmpdata)) { + if (cmp(&lastkept->b, &cmpdata->b)) { lastkept = cmpdata; } else { if (lastkept->i > cmpdata->i) { @@ -4787,8 +4716,8 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int zend_fcall_info_cache *fci_key_cache = NULL, *fci_data_cache; PHP_ARRAY_CMP_FUNC_VARS; - int (*intersect_key_compare_func)(const void *, const void *); - int (*intersect_data_compare_func)(const void *, const void *); + bucket_compare_func_t intersect_key_compare_func; + bucket_compare_func_t intersect_data_compare_func; if (behavior == INTERSECT_NORMAL) { intersect_key_compare_func = php_array_key_compare_string; @@ -4907,10 +4836,12 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int if (hash->nNumOfElements > 1) { if (behavior == INTERSECT_NORMAL) { zend_sort((void *) lists[i], hash->nNumOfElements, - sizeof(Bucket), intersect_data_compare_func, (swap_func_t)zend_hash_bucket_swap); + sizeof(Bucket), (compare_func_t) intersect_data_compare_func, + (swap_func_t)zend_hash_bucket_swap); } else if (behavior & INTERSECT_ASSOC) { /* triggered also when INTERSECT_KEY */ zend_sort((void *) lists[i], hash->nNumOfElements, - sizeof(Bucket), intersect_key_compare_func, (swap_func_t)zend_hash_bucket_swap); + sizeof(Bucket), (compare_func_t) intersect_key_compare_func, + (swap_func_t)zend_hash_bucket_swap); } } } @@ -5192,8 +5123,8 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_ zend_fcall_info_cache *fci_key_cache = NULL, *fci_data_cache; PHP_ARRAY_CMP_FUNC_VARS; - int (*diff_key_compare_func)(const void *, const void *); - int (*diff_data_compare_func)(const void *, const void *); + bucket_compare_func_t diff_key_compare_func; + bucket_compare_func_t diff_data_compare_func; if (behavior == DIFF_NORMAL) { diff_key_compare_func = php_array_key_compare_string; @@ -5312,10 +5243,12 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_ if (hash->nNumOfElements > 1) { if (behavior == DIFF_NORMAL) { zend_sort((void *) lists[i], hash->nNumOfElements, - sizeof(Bucket), diff_data_compare_func, (swap_func_t)zend_hash_bucket_swap); + sizeof(Bucket), (compare_func_t) diff_data_compare_func, + (swap_func_t)zend_hash_bucket_swap); } else if (behavior & DIFF_ASSOC) { /* triggered also when DIFF_KEY */ zend_sort((void *) lists[i], hash->nNumOfElements, - sizeof(Bucket), diff_key_compare_func, (swap_func_t)zend_hash_bucket_swap); + sizeof(Bucket), (compare_func_t) diff_key_compare_func, + (swap_func_t)zend_hash_bucket_swap); } } } @@ -5676,7 +5609,7 @@ PHP_FUNCTION(array_multisort) int sort_order = PHP_SORT_ASC; int sort_type = PHP_SORT_REGULAR; int i, k, n; - compare_func_t *func; + bucket_compare_func_t *func; ZEND_PARSE_PARAMETERS_START(1, -1) Z_PARAM_VARIADIC('+', args, argc) @@ -5687,7 +5620,7 @@ PHP_FUNCTION(array_multisort) for (i = 0; i < MULTISORT_LAST; i++) { parse_state[i] = 0; } - func = ARRAYG(multisort_func) = (compare_func_t*)ecalloc(argc, sizeof(compare_func_t)); + func = ARRAYG(multisort_func) = ecalloc(argc, sizeof(bucket_compare_func_t)); /* Here we go through the input arguments and parse them. Each one can * be either an array or a sort flag which follows an array. If not diff --git a/ext/standard/info.c b/ext/standard/info.c index 71d7139010192..8a090d20e538f 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -744,11 +744,8 @@ PHPAPI ZEND_COLD void php_print_info_htmlhead(void) /* }}} */ /* {{{ module_name_cmp */ -static int module_name_cmp(const void *a, const void *b) +static int module_name_cmp(Bucket *f, Bucket *s) { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; - return strcasecmp(((zend_module_entry *)Z_PTR(f->val))->name, ((zend_module_entry *)Z_PTR(s->val))->name); } diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index c8bca740af0e3..ce440c454ecbf 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -123,7 +123,7 @@ PHPAPI zend_long php_count_recursive(HashTable *ht); #define ARRAY_FILTER_USE_KEY 2 ZEND_BEGIN_MODULE_GLOBALS(array) - compare_func_t *multisort_func; + bucket_compare_func_t *multisort_func; ZEND_END_MODULE_GLOBALS(array) #define ARRAYG(v) ZEND_MODULE_GLOBALS_ACCESSOR(array, v) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 2cff48fc61dcd..723bffc8658aa 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -238,11 +238,8 @@ static void fcgi_log(int type, const char *format, ...) { } #endif -static int module_name_cmp(const void *a, const void *b) +static int module_name_cmp(Bucket *f, Bucket *s) { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; - return strcasecmp( ((zend_module_entry *)Z_PTR(f->val))->name, ((zend_module_entry *)Z_PTR(s->val))->name); } diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 8cc570f132e51..a5aafcd23171a 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -173,11 +173,8 @@ const opt_struct OPTIONS[] = { {'-', 0, NULL} /* end of args */ }; -static int module_name_cmp(const void *a, const void *b) /* {{{ */ +static int module_name_cmp(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; - return strcasecmp(((zend_module_entry *)Z_PTR(f->val))->name, ((zend_module_entry *)Z_PTR(s->val))->name); } diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index c1129b098a02f..00102e6112e64 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -184,11 +184,8 @@ static php_cgi_globals_struct php_cgi_globals; #define CGIG(v) (php_cgi_globals.v) #endif -static int module_name_cmp(const void *a, const void *b) /* {{{ */ +static int module_name_cmp(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; - return strcasecmp( ((zend_module_entry *) Z_PTR(f->val))->name, ((zend_module_entry *) Z_PTR(s->val))->name); } diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c index 593b795b66988..db493ccf30d15 100644 --- a/sapi/phpdbg/phpdbg_wait.c +++ b/sapi/phpdbg/phpdbg_wait.c @@ -46,14 +46,10 @@ typedef struct { HashPosition pos[2]; } phpdbg_intersect_ptr; -static int phpdbg_array_data_compare(const void *a, const void *b) { - Bucket *f, *s; +static int phpdbg_array_data_compare(Bucket *f, Bucket *s) { int result; zval *first, *second; - f = *((Bucket **) a); - s = *((Bucket **) b); - first = &f->val; second = &s->val; @@ -72,8 +68,8 @@ static void phpdbg_array_intersect_init(phpdbg_intersect_ptr *info, HashTable *h info->ht[0] = ht1; info->ht[1] = ht2; - zend_hash_sort(info->ht[0], (compare_func_t) phpdbg_array_data_compare, 0); - zend_hash_sort(info->ht[1], (compare_func_t) phpdbg_array_data_compare, 0); + zend_hash_sort(info->ht[0], phpdbg_array_data_compare, 0); + zend_hash_sort(info->ht[1], phpdbg_array_data_compare, 0); zend_hash_internal_pointer_reset_ex(info->ht[0], &info->pos[0]); zend_hash_internal_pointer_reset_ex(info->ht[1], &info->pos[1]); From 0b21a89472e3ddbcb658843d3424b0037974521d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 4 Mar 2020 15:29:59 +0100 Subject: [PATCH 155/201] add lastId property to ZipArchive --- ext/zip/php_zip.c | 119 ++++++++++++------------------ ext/zip/php_zip.h | 3 +- ext/zip/tests/bug11216.phpt | 1 + ext/zip/tests/bug38943.phpt | 2 + ext/zip/tests/bug38943_2.phpt | 2 + ext/zip/tests/bug38944.phpt | 4 +- ext/zip/tests/oo_addemptydir.phpt | 10 +++ ext/zip/tests/oo_addfile.phpt | 6 ++ ext/zip/tests/oo_setcomment.phpt | 4 +- 9 files changed, 76 insertions(+), 75 deletions(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 634219000fad4..ed562eae6d796 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -275,7 +275,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, size_t } /* }}} */ -static int php_zip_add_file(struct zip *za, const char *filename, size_t filename_len, +static int php_zip_add_file(ze_zip_object *obj, const char *filename, size_t filename_len, char *entry_name, size_t entry_name_len, /* unused if replace >= 0 */ zip_uint64_t offset_start, zip_uint64_t offset_len, zend_long replace, /* index to replace, add new file if < 0 */ @@ -300,25 +300,26 @@ static int php_zip_add_file(struct zip *za, const char *filename, size_t filenam return -1; } - zs = zip_source_file(za, resolved_path, offset_start, offset_len); + zs = zip_source_file(obj->za, resolved_path, offset_start, offset_len); if (!zs) { return -1; } // Replace if (replace >= 0) { - if (zip_file_replace(za, replace, zs, flags) < 0) { + if (zip_file_replace(obj->za, replace, zs, flags) < 0) { zip_source_free(zs); return -1; } - zip_error_clear(za); + zip_error_clear(obj->za); return 1; } // Add - if (zip_file_add(za, entry_name, zs, flags) < 0) { + obj->last_id = zip_file_add(obj->za, entry_name, zs, flags); + if (obj->last_id < 0) { zip_source_free(zs); return -1; } - zip_error_clear(za); + zip_error_clear(obj->za); return 1; } /* }}} */ @@ -433,17 +434,17 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, #endif /* }}} */ -static zend_long php_zip_status(struct zip *za) /* {{{ */ +static zend_long php_zip_status(ze_zip_object *obj) /* {{{ */ { #if LIBZIP_VERSION_MAJOR < 1 int zep, syp; - zip_error_get(za, &zep, &syp); + zip_error_get(obj->za, &zep, &syp); #else int zep; zip_error_t *err; - err = zip_get_error(za); + err = zip_get_error(obj->za); zep = zip_error_code_zip(err); zip_error_fini(err); #endif @@ -451,17 +452,23 @@ static zend_long php_zip_status(struct zip *za) /* {{{ */ } /* }}} */ -static zend_long php_zip_status_sys(struct zip *za) /* {{{ */ +static zend_long php_zip_last_id(ze_zip_object *obj) /* {{{ */ +{ + return obj->last_id; +} +/* }}} */ + +static zend_long php_zip_status_sys(ze_zip_object *obj) /* {{{ */ { #if LIBZIP_VERSION_MAJOR < 1 int zep, syp; - zip_error_get(za, &zep, &syp); + zip_error_get(obj->za, &zep, &syp); #else int syp; zip_error_t *err; - err = zip_get_error(za); + err = zip_get_error(obj->za); syp = zip_error_code_system(err); zip_error_fini(err); #endif @@ -469,31 +476,27 @@ static zend_long php_zip_status_sys(struct zip *za) /* {{{ */ } /* }}} */ -static zend_long php_zip_get_num_files(struct zip *za) /* {{{ */ +static zend_long php_zip_get_num_files(ze_zip_object *obj) /* {{{ */ { - zip_int64_t num = zip_get_num_entries(za, 0); + zip_int64_t num = zip_get_num_entries(obj->za, 0); return MIN(num, ZEND_LONG_MAX); } /* }}} */ -static char * php_zipobj_get_filename(ze_zip_object *obj) /* {{{ */ +static char * php_zipobj_get_filename(ze_zip_object *obj, int *len) /* {{{ */ { - - if (!obj) { - return NULL; - } - - if (obj->filename) { + if (obj && obj->filename) { + *len = strlen(obj->filename); return obj->filename; } return NULL; } /* }}} */ -static char * php_zipobj_get_zip_comment(struct zip *za, int *len) /* {{{ */ +static char * php_zipobj_get_zip_comment(ze_zip_object *obj, int *len) /* {{{ */ { - if (za) { - return (char *)zip_get_archive_comment(za, len, 0); + if (obj->za) { + return (char *)zip_get_archive_comment(obj->za, len, 0); } return NULL; } @@ -764,20 +767,18 @@ static zend_object_handlers zip_object_handlers; static HashTable zip_prop_handlers; -typedef zend_long (*zip_read_int_t)(struct zip *za); -typedef char *(*zip_read_const_char_t)(struct zip *za, int *len); -typedef char *(*zip_read_const_char_from_ze_t)(ze_zip_object *obj); +typedef zend_long (*zip_read_int_t)(ze_zip_object *obj); +typedef char *(*zip_read_const_char_t)(ze_zip_object *obj, int *len); typedef struct _zip_prop_handler { zip_read_int_t read_int_func; zip_read_const_char_t read_const_char_func; - zip_read_const_char_from_ze_t read_const_char_from_obj_func; int type; } zip_prop_handler; /* }}} */ -static void php_zip_register_prop_handler(HashTable *prop_handler, char *name, zip_read_int_t read_int_func, zip_read_const_char_t read_char_func, zip_read_const_char_from_ze_t read_char_from_obj_func, int rettype) /* {{{ */ +static void php_zip_register_prop_handler(HashTable *prop_handler, char *name, zip_read_int_t read_int_func, zip_read_const_char_t read_char_func, int rettype) /* {{{ */ { zip_prop_handler hnd; zend_string *str; @@ -785,7 +786,6 @@ static void php_zip_register_prop_handler(HashTable *prop_handler, char *name, z hnd.read_const_char_func = read_char_func; hnd.read_int_func = read_int_func; - hnd.read_const_char_from_obj_func = read_char_from_obj_func; hnd.type = rettype; str = zend_string_init_interned(name, strlen(name), 1); zend_hash_add_mem(prop_handler, str, &hnd, sizeof(zip_prop_handler)); @@ -805,20 +805,9 @@ static zval *php_zip_property_reader(ze_zip_object *obj, zip_prop_handler *hnd, if (obj && obj->za != NULL) { if (hnd->read_const_char_func) { - retchar = hnd->read_const_char_func(obj->za, &len); - } else { - if (hnd->read_int_func) { - retint = hnd->read_int_func(obj->za); - if (retint == -1) { - php_error_docref(NULL, E_WARNING, "Internal zip error returned"); - return NULL; - } - } else { - if (hnd->read_const_char_from_obj_func) { - retchar = hnd->read_const_char_from_obj_func(obj); - len = strlen(retchar); - } - } + retchar = hnd->read_const_char_func(obj, &len); + } else if (hnd->read_int_func) { + retint = hnd->read_int_func(obj); } } @@ -1037,6 +1026,7 @@ static zend_object *php_zip_object_new(zend_class_entry *class_type) /* {{{ */ zend_object_std_init(&intern->zo, class_type); object_properties_init(&intern->zo, class_type); intern->zo.handlers = &zip_object_handlers; + intern->last_id = -1; return &intern->zo; } @@ -1579,8 +1569,6 @@ static ZIPARCHIVE_METHOD(addEmptyDir) zval *self = ZEND_THIS; char *dirname; size_t dirname_len; - int idx; - struct zip_stat sb; char *s; zend_long flags = 0; @@ -1604,16 +1592,11 @@ static ZIPARCHIVE_METHOD(addEmptyDir) s = dirname; } - idx = zip_stat(intern, s, 0, &sb); - if (idx >= 0) { + if ((Z_ZIP_P(self)->last_id = zip_dir_add(intern, (const char *)s, flags)) == -1) { RETVAL_FALSE; } else { - if (zip_dir_add(intern, (const char *)s, flags) == -1) { - RETVAL_FALSE; - } else { - zip_error_clear(intern); - RETVAL_TRUE; - } + zip_error_clear(intern); + RETVAL_TRUE; } if (s != dirname) { @@ -1624,7 +1607,6 @@ static ZIPARCHIVE_METHOD(addEmptyDir) static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ { - struct zip *intern; zval *self = ZEND_THIS; char *path = "."; char *remove_path = NULL, *save_remove_path; @@ -1637,7 +1619,6 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* int found; zend_string *pattern; - ZIP_FROM_OBJECT(intern, self); /* 1 == glob, 2 == pcre */ if (type == 1) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|la", @@ -1717,7 +1698,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* basename = NULL; } - if (php_zip_add_file(intern, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file), + if (php_zip_add_file(Z_ZIP_P(self), Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file), entry_name, entry_name_len, 0, 0, -1, zip_flags) < 0) { zend_array_destroy(Z_ARR_P(return_value)); RETURN_FALSE; @@ -1751,7 +1732,6 @@ static ZIPARCHIVE_METHOD(addPattern) Add a file in a Zip archive using its path and the name to use. */ static ZIPARCHIVE_METHOD(addFile) { - struct zip *intern; zval *self = ZEND_THIS; char *entry_name = NULL; size_t entry_name_len = 0; @@ -1759,8 +1739,6 @@ static ZIPARCHIVE_METHOD(addFile) zend_string *filename; zend_long flags = ZIP_FL_OVERWRITE; - ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|slll", &filename, &entry_name, &entry_name_len, &offset_start, &offset_len, &flags) == FAILURE) { RETURN_THROWS(); @@ -1776,7 +1754,7 @@ static ZIPARCHIVE_METHOD(addFile) entry_name_len = ZSTR_LEN(filename); } - if (php_zip_add_file(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), + if (php_zip_add_file(Z_ZIP_P(self), ZSTR_VAL(filename), ZSTR_LEN(filename), entry_name, entry_name_len, offset_start, offset_len, -1, flags) < 0) { RETURN_FALSE; } else { @@ -1789,15 +1767,12 @@ static ZIPARCHIVE_METHOD(addFile) Add a file in a Zip archive using its path and the name to use. */ static ZIPARCHIVE_METHOD(replaceFile) { - struct zip *intern; zval *self = ZEND_THIS; zend_long index; zend_long offset_start = 0, offset_len = 0; zend_string *filename; zend_long flags = 0; - ZIP_FROM_OBJECT(intern, self); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Pl|lll", &filename, &index, &offset_start, &offset_len, &flags) == FAILURE) { RETURN_THROWS(); @@ -1813,7 +1788,7 @@ static ZIPARCHIVE_METHOD(replaceFile) RETURN_FALSE; } - if (php_zip_add_file(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), + if (php_zip_add_file(Z_ZIP_P(self), ZSTR_VAL(filename), ZSTR_LEN(filename), NULL, 0, offset_start, offset_len, index, flags) < 0) { RETURN_FALSE; } else { @@ -1861,7 +1836,8 @@ static ZIPARCHIVE_METHOD(addFromString) RETURN_FALSE; } - if (zip_file_add(intern, name, zs, flags) == -1) { + ze_obj->last_id = zip_file_add(intern, name, zs, flags); + if (ze_obj->last_id == -1) { zip_source_free(zs); RETURN_FALSE; } else { @@ -3069,11 +3045,12 @@ static PHP_MINIT_FUNCTION(zip) zip_class_entry = zend_register_internal_class(&ce); zend_hash_init(&zip_prop_handlers, 0, NULL, php_zip_free_prop_handler, 1); - php_zip_register_prop_handler(&zip_prop_handlers, "status", php_zip_status, NULL, NULL, IS_LONG); - php_zip_register_prop_handler(&zip_prop_handlers, "statusSys", php_zip_status_sys, NULL, NULL, IS_LONG); - php_zip_register_prop_handler(&zip_prop_handlers, "numFiles", php_zip_get_num_files, NULL, NULL, IS_LONG); - php_zip_register_prop_handler(&zip_prop_handlers, "filename", NULL, NULL, php_zipobj_get_filename, IS_STRING); - php_zip_register_prop_handler(&zip_prop_handlers, "comment", NULL, php_zipobj_get_zip_comment, NULL, IS_STRING); + php_zip_register_prop_handler(&zip_prop_handlers, "lastId", php_zip_last_id, NULL, IS_LONG); + php_zip_register_prop_handler(&zip_prop_handlers, "status", php_zip_status, NULL, IS_LONG); + php_zip_register_prop_handler(&zip_prop_handlers, "statusSys", php_zip_status_sys, NULL, IS_LONG); + php_zip_register_prop_handler(&zip_prop_handlers, "numFiles", php_zip_get_num_files, NULL, IS_LONG); + php_zip_register_prop_handler(&zip_prop_handlers, "filename", NULL, php_zipobj_get_filename, IS_STRING); + php_zip_register_prop_handler(&zip_prop_handlers, "comment", NULL, php_zipobj_get_zip_comment, IS_STRING); zend_class_implements(zip_class_entry, 1, zend_ce_countable); REGISTER_ZIP_CLASS_CONST_LONG("CREATE", ZIP_CREATE); diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 96390e025a185..f28937ebe266f 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -59,13 +59,14 @@ typedef struct _ze_zip_object { char *filename; int filename_len; int buffers_cnt; - zend_object zo; + zip_int64_t last_id; #ifdef HAVE_PROGRESS_CALLBACK zval progress_callback; #endif #ifdef HAVE_CANCEL_CALLBACK zval cancel_callback; #endif + zend_object zo; } ze_zip_object; static inline ze_zip_object *php_zip_fetch_object(zend_object *obj) { diff --git a/ext/zip/tests/bug11216.phpt b/ext/zip/tests/bug11216.phpt index e6f76af2187d8..a32e42d4e4233 100644 --- a/ext/zip/tests/bug11216.phpt +++ b/ext/zip/tests/bug11216.phpt @@ -18,6 +18,7 @@ unlink('__test.zip'); bool(true) ZipArchive Object ( + [lastId] => 0 [status] => 0 [statusSys] => 0 [numFiles] => 1 diff --git a/ext/zip/tests/bug38943.phpt b/ext/zip/tests/bug38943.phpt index ffd0f8dc16498..e2819d0948a15 100644 --- a/ext/zip/tests/bug38943.phpt +++ b/ext/zip/tests/bug38943.phpt @@ -37,6 +37,8 @@ object(myZip)#1 (%d) { [0]=> int(1) } + ["lastId"]=> + int(0) ["status"]=> int(0) ["statusSys"]=> diff --git a/ext/zip/tests/bug38943_2.phpt b/ext/zip/tests/bug38943_2.phpt index 01147a1825d4b..0b6612f254fdc 100644 --- a/ext/zip/tests/bug38943_2.phpt +++ b/ext/zip/tests/bug38943_2.phpt @@ -23,6 +23,8 @@ object(myZip)#1 (%d) { [0]=> int(1) } + ["lastId"]=> + int(0) ["status"]=> int(0) ["statusSys"]=> diff --git a/ext/zip/tests/bug38944.phpt b/ext/zip/tests/bug38944.phpt index d016fa6268aaa..b47d06daa8b94 100644 --- a/ext/zip/tests/bug38944.phpt +++ b/ext/zip/tests/bug38944.phpt @@ -25,7 +25,9 @@ int(0) int(0) string(%d) "%s" string(0) "" -object(ZipArchive)#%d (5) { +object(ZipArchive)#%d (6) { + ["lastId"]=> + int(-1) ["status"]=> int(0) ["statusSys"]=> diff --git a/ext/zip/tests/oo_addemptydir.phpt b/ext/zip/tests/oo_addemptydir.phpt index 1a95662b15cf1..901af852010c7 100644 --- a/ext/zip/tests/oo_addemptydir.phpt +++ b/ext/zip/tests/oo_addemptydir.phpt @@ -18,7 +18,13 @@ if (!$zip->open($file)) { exit('failed'); } +var_dump($zip->lastId); // -1 (nothing added) $zip->addEmptyDir('emptydir'); +var_dump($zip->lastId); // 4 +$zip->addEmptyDir('emptydir'); +var_dump($zip->lastId); // -1 (already exists) +$zip->addEmptyDir('emptydir', ZipArchive::FL_OVERWRITE); +var_dump($zip->lastId); // 4 if ($zip->status == ZIPARCHIVE::ER_OK) { if (!verify_entries($zip, [ "bar", @@ -38,4 +44,8 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { @unlink($file); ?> --EXPECT-- +int(-1) +int(4) +int(-1) +int(4) OK diff --git a/ext/zip/tests/oo_addfile.phpt b/ext/zip/tests/oo_addfile.phpt index 5ee47256ce0d7..4ca302a5eb5d1 100644 --- a/ext/zip/tests/oo_addfile.phpt +++ b/ext/zip/tests/oo_addfile.phpt @@ -17,12 +17,15 @@ $zip = new ZipArchive; if (!$zip->open($file)) { exit('failed'); } +var_dump($zip->lastId); if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) { echo "failed\n"; } +var_dump($zip->lastId); if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) { echo "failed\n"; } +var_dump($zip->lastId); if ($zip->status == ZIPARCHIVE::ER_OK) { if (!verify_entries($zip, [ "bar", @@ -48,6 +51,9 @@ var_dump(strlen($zip->getFromName('mini.txt')) == 34); @unlink($file); ?> --EXPECT-- +int(-1) +int(4) +int(5) OK bool(true) bool(true) diff --git a/ext/zip/tests/oo_setcomment.phpt b/ext/zip/tests/oo_setcomment.phpt index 4518e68647313..5e1975be3f5d5 100644 --- a/ext/zip/tests/oo_setcomment.phpt +++ b/ext/zip/tests/oo_setcomment.phpt @@ -21,7 +21,9 @@ $zip->addFromString('entry1.txt', 'entry #1'); $zip->addFromString('entry2.txt', 'entry #2'); $zip->addFromString('dir/entry2d.txt', 'entry #2'); $zip->addFromString('entry4.txt', 'entry #1'); +var_dump($zip->setCommentIndex($zip->lastId, 'entry4.txt')); $zip->addFromString('entry5.txt', 'entry #2'); +var_dump($zip->setCommentIndex($zip->lastId, 'entry5.txt')); var_dump($zip->setCommentName('entry1.txt', 'entry1.txt')); @@ -29,8 +31,6 @@ var_dump($zip->setCommentName('entry2.txt', 'entry2.txt')); var_dump($zip->setCommentName('dir/entry2d.txt', 'dir/entry2d.txt')); var_dump($zip->setArchiveComment('archive')); -var_dump($zip->setCommentIndex(3, 'entry4.txt')); -var_dump($zip->setCommentIndex(4, 'entry5.txt')); var_dump($zip->setArchiveComment('archive')); if (!$zip->status == ZIPARCHIVE::ER_OK) { From 32c2ae2939a360854acc46d7dfcd06d4a52c52e9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 4 Mar 2020 15:31:38 +0100 Subject: [PATCH 156/201] NEWS --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 055afa4896a14..b8496a37313ea 100644 --- a/NEWS +++ b/NEWS @@ -140,5 +140,6 @@ PHP NEWS . Add "flags" options to ZipArchive::addGlob and addPattern methods keeping previous behavior having FL_OVERWRITE by default. (Remi) . Add ZipArchive::replaceFile() method + . Add lastId property to ZipArchive <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> From 6f536052755445dfd2080fd596ddc552f7d129a5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 5 Mar 2020 10:57:26 +0100 Subject: [PATCH 157/201] - make status, statusSys properties and ZipArchive::getStatusString() method available after archive is closed --- NEWS | 7 ++- ext/zip/php_zip.c | 107 ++++++++++++++++++++++------------ ext/zip/php_zip.h | 2 + ext/zip/tests/bug38943.phpt | 2 +- ext/zip/tests/bug38943_2.phpt | 2 +- ext/zip/tests/oo_cancel.phpt | 4 ++ 6 files changed, 84 insertions(+), 40 deletions(-) diff --git a/NEWS b/NEWS index b8496a37313ea..fa0a8cdc905fa 100644 --- a/NEWS +++ b/NEWS @@ -139,7 +139,10 @@ PHP NEWS addFromString methods. (Remi) . Add "flags" options to ZipArchive::addGlob and addPattern methods keeping previous behavior having FL_OVERWRITE by default. (Remi) - . Add ZipArchive::replaceFile() method - . Add lastId property to ZipArchive + . Add ZipArchive::replaceFile() method. (Remi) + . Add lastId property to ZipArchive. (Remi) + . ZipArchive::status and ZipArchive::statusSys properties and + ZipArchive::getStatusString() method stay valid after the archive + is closed. (Remi) <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index ed562eae6d796..34ef7ccde6248 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -304,7 +304,7 @@ static int php_zip_add_file(ze_zip_object *obj, const char *filename, size_t fil if (!zs) { return -1; } - // Replace + /* Replace */ if (replace >= 0) { if (zip_file_replace(obj->za, replace, zs, flags) < 0) { zip_source_free(zs); @@ -313,7 +313,7 @@ static int php_zip_add_file(ze_zip_object *obj, const char *filename, size_t fil zip_error_clear(obj->za); return 1; } - // Add + /* Add */ obj->last_id = zip_file_add(obj->za, entry_name, zs, flags); if (obj->last_id < 0) { zip_source_free(zs); @@ -436,18 +436,21 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, static zend_long php_zip_status(ze_zip_object *obj) /* {{{ */ { + int zep = obj->err_zip; /* saved err if closed */ + + if (obj->za) { #if LIBZIP_VERSION_MAJOR < 1 - int zep, syp; + int syp; - zip_error_get(obj->za, &zep, &syp); + zip_error_get(obj->za, &zep, &syp); #else - int zep; - zip_error_t *err; + zip_error_t *err; - err = zip_get_error(obj->za); - zep = zip_error_code_zip(err); - zip_error_fini(err); + err = zip_get_error(obj->za); + zep = zip_error_code_zip(err); + zip_error_fini(err); #endif + } return zep; } /* }}} */ @@ -460,26 +463,32 @@ static zend_long php_zip_last_id(ze_zip_object *obj) /* {{{ */ static zend_long php_zip_status_sys(ze_zip_object *obj) /* {{{ */ { + int syp = obj->err_sys; /* saved err if closed */ + + if (obj->za) { #if LIBZIP_VERSION_MAJOR < 1 - int zep, syp; + int zep; - zip_error_get(obj->za, &zep, &syp); + zip_error_get(obj->za, &zep, &syp); #else - int syp; - zip_error_t *err; + zip_error_t *err; - err = zip_get_error(obj->za); - syp = zip_error_code_system(err); - zip_error_fini(err); + err = zip_get_error(obj->za); + syp = zip_error_code_system(err); + zip_error_fini(err); #endif + } return syp; } /* }}} */ static zend_long php_zip_get_num_files(ze_zip_object *obj) /* {{{ */ { - zip_int64_t num = zip_get_num_entries(obj->za, 0); - return MIN(num, ZEND_LONG_MAX); + if (obj->za) { + zip_int64_t num = zip_get_num_entries(obj->za, 0); + return MIN(num, ZEND_LONG_MAX); + } + return 0; } /* }}} */ @@ -803,12 +812,10 @@ static zval *php_zip_property_reader(ze_zip_object *obj, zip_prop_handler *hnd, zend_long retint = 0; int len = 0; - if (obj && obj->za != NULL) { - if (hnd->read_const_char_func) { - retchar = hnd->read_const_char_func(obj, &len); - } else if (hnd->read_int_func) { - retint = hnd->read_int_func(obj); - } + if (hnd->read_const_char_func) { + retchar = hnd->read_const_char_func(obj, &len); + } else if (hnd->read_int_func) { + retint = hnd->read_int_func(obj); } switch (hnd->type) { @@ -1488,7 +1495,23 @@ static ZIPARCHIVE_METHOD(close) ze_obj = Z_ZIP_P(self); - if ((err = zip_close(intern))) { + err = zip_close(intern); + + /* Save error for property reader */ +#if LIBZIP_VERSION_MAJOR < 1 + zip_error_get(obj->za, &ze_obj->err_zip, &ze_obj->err_sys); +#else + { + zip_error_t *ziperr; + + ziperr = zip_get_error(intern); + ze_obj->err_zip = zip_error_code_zip(ziperr); + ze_obj->err_sys = zip_error_code_system(ziperr); + zip_error_fini(ziperr); + } +#endif + + if (err) { #if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1 php_error_docref(NULL, E_WARNING, "zip_close have failed"); #else @@ -1533,30 +1556,42 @@ static ZIPARCHIVE_METHOD(count) * Returns the status error message, system and/or zip messages */ static ZIPARCHIVE_METHOD(getStatusString) { - struct zip *intern; zval *self = ZEND_THIS; #if LIBZIP_VERSION_MAJOR < 1 int zep, syp, len; char error_string[128]; -#else - zip_error_t *err; #endif + ze_zip_object *ze_obj; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - ZIP_FROM_OBJECT(intern, self); + ze_obj = Z_ZIP_P(self); /* not ZIP_FROM_OBJECT as we can use saved error after close */ #if LIBZIP_VERSION_MAJOR < 1 - zip_error_get(intern, &zep, &syp); - - len = zip_error_to_str(error_string, 128, zep, syp); + if (ze_obj->za) { + zip_error_get(ze_obj->za, &zep, &syp); + len = zip_error_to_str(error_string, 128, zep, syp); + } else { + len = zip_error_to_str(error_string, 128, ze_obj->err_zip, ze_obj->err_sys); + } RETVAL_STRINGL(error_string, len); #else - err = zip_get_error(intern); - RETVAL_STRING(zip_error_strerror(err)); - zip_error_fini(err); + if (ze_obj->za) { + zip_error_t *err; + + err = zip_get_error(ze_obj->za); + RETVAL_STRING(zip_error_strerror(err)); + zip_error_fini(err); + } else { + zip_error_t err; + + zip_error_init_with_code(&err, ze_obj->err_zip); + err.sys_err = ze_obj->err_sys; /* missing setter */ + RETVAL_STRING(zip_error_strerror(&err)); + zip_error_fini(&err); + } #endif } /* }}} */ @@ -3159,7 +3194,7 @@ static PHP_MINIT_FUNCTION(zip) REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_OS_2", ZIP_OPSYS_OS_2); REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_MACINTOSH", ZIP_OPSYS_MACINTOSH); REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_Z_SYSTEM", ZIP_OPSYS_Z_SYSTEM); - REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_Z_CPM", ZIP_OPSYS_CPM); // typo kept for BC + REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_Z_CPM", ZIP_OPSYS_CPM); /* typo kept for BC */ REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_CPM", ZIP_OPSYS_CPM); REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_WINDOWS_NTFS", ZIP_OPSYS_WINDOWS_NTFS); REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_MVS", ZIP_OPSYS_MVS); diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index f28937ebe266f..1f3ec76f02f39 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -60,6 +60,8 @@ typedef struct _ze_zip_object { int filename_len; int buffers_cnt; zip_int64_t last_id; + int err_zip; + int err_sys; #ifdef HAVE_PROGRESS_CALLBACK zval progress_callback; #endif diff --git a/ext/zip/tests/bug38943.phpt b/ext/zip/tests/bug38943.phpt index e2819d0948a15..f079f81153e78 100644 --- a/ext/zip/tests/bug38943.phpt +++ b/ext/zip/tests/bug38943.phpt @@ -38,7 +38,7 @@ object(myZip)#1 (%d) { int(1) } ["lastId"]=> - int(0) + int(-1) ["status"]=> int(0) ["statusSys"]=> diff --git a/ext/zip/tests/bug38943_2.phpt b/ext/zip/tests/bug38943_2.phpt index 0b6612f254fdc..fa2a086b1975d 100644 --- a/ext/zip/tests/bug38943_2.phpt +++ b/ext/zip/tests/bug38943_2.phpt @@ -24,7 +24,7 @@ object(myZip)#1 (%d) { int(1) } ["lastId"]=> - int(0) + int(-1) ["status"]=> int(0) ["statusSys"]=> diff --git a/ext/zip/tests/oo_cancel.phpt b/ext/zip/tests/oo_cancel.phpt index 4c487072c0383..2da21d9904638 100644 --- a/ext/zip/tests/oo_cancel.phpt +++ b/ext/zip/tests/oo_cancel.phpt @@ -27,6 +27,8 @@ var_dump($zip->registerCancelCallback(function () { var_dump($zip->addFromString(PHP_BINARY, 'entry #1')); var_dump($zip->close()); +var_dump($zip->status == ZipArchive::ER_CANCELLED); +var_dump($zip->getStatusString()); @unlink($file); ?> Done @@ -36,4 +38,6 @@ bool(true) Warning: ZipArchive::close(): Operation cancelled in %s bool(false) +bool(true) +string(19) "Operation cancelled" Done From 541eeace598cc1c87f686573da8dcbc6a6b5efc4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 5 Mar 2020 13:46:34 +0100 Subject: [PATCH 158/201] drop old constant with bad name, kept until now for BC --- ext/zip/php_zip.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 34ef7ccde6248..c167ceedc2949 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -3194,7 +3194,6 @@ static PHP_MINIT_FUNCTION(zip) REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_OS_2", ZIP_OPSYS_OS_2); REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_MACINTOSH", ZIP_OPSYS_MACINTOSH); REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_Z_SYSTEM", ZIP_OPSYS_Z_SYSTEM); - REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_Z_CPM", ZIP_OPSYS_CPM); /* typo kept for BC */ REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_CPM", ZIP_OPSYS_CPM); REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_WINDOWS_NTFS", ZIP_OPSYS_WINDOWS_NTFS); REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_MVS", ZIP_OPSYS_MVS); From e786e9c83c56613c861f431451526a6a27d5dc7c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 5 Mar 2020 14:03:20 +0100 Subject: [PATCH 159/201] upgrade information about changs in Zip --- UPGRADING | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/UPGRADING b/UPGRADING index fcfb715622339..f99344ac0c359 100644 --- a/UPGRADING +++ b/UPGRADING @@ -368,6 +368,8 @@ PHP 8.0 UPGRADE NOTES option), whereas formerly it was treated as directory name. This means that if no trailing directory separator is given, the following character is no longer stripped from the filename. + . ZipArchive::OPSYS_Z_CPM have been removed, should use ZipArchive::OPSYS_CPM + (this name was a typo). - Zlib: . gzgetss() has been removed. @@ -421,6 +423,12 @@ PHP 8.0 UPGRADE NOTES . Introduce DOMParentNode and DOMChildNode with new traversal and manipulation APIs RFC: https://wiki.php.net/rfc/dom_living_standard_api +- Zip: + . Extension updated to version 1.18 + . New ZipArchive::lastId property to get index value of last added entry. + . Error can be checked after an archive is closed using ZipArchive::status, + ZipArchive::statusSys properties or ZipArchive::getStatusString() method. + ======================================== 3. Changes in SAPI modules ======================================== @@ -437,6 +445,13 @@ PHP 8.0 UPGRADE NOTES 5. Changed Functions ======================================== +- Zip + . ZipArchive::addGlob and ZipArchive::addPattern methods accept a "flags" + value in the "options" array argument. + . ZipArchive::addEmptyDir, ZipArchive::addFile and aZipArchive::addFromString + methods have a new "flags" argument. This allow to manage name encoding + (ZipArchive::FL_ENC_*) and entry replacement (ZipArchive::FL_OVERWRITE) + ======================================== 6. New Functions ======================================== @@ -457,6 +472,13 @@ PHP 8.0 UPGRADE NOTES IEEE 754 semantics. Division by zero is considered well-defined and will return one of Inf, -Inf or NaN. +- Zip: + . ZipArchive::setMtimeName and ZipArchive::setMtimeIndex to set the + modification time of an entry. + . ZipArchive::setProgressCallback to provide updates during archive close. + . ZipArchive::setCancelCallback to allow cancellation during archive close. + . ZipArchive::replaceFile to replace an entry content. + ======================================== 7. New Classes and Interfaces ======================================== From b8100a150afa80aa2b1eda43e798035d4dcc917a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 5 Mar 2020 18:06:10 +0100 Subject: [PATCH 160/201] [ci skip] Tweeks to release-process.md As discussed with Derick and Remi. --- docs/release-process.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/release-process.md b/docs/release-process.md index abb7711b73eb6..4d9780b464826 100644 --- a/docs/release-process.md +++ b/docs/release-process.md @@ -202,6 +202,8 @@ ssh lists.php.net sudo -u ezmlm ezmlm-sub ~ezmlm/primary-qa-tester/mod moderator-email-address ``` + 6. For RCs, post tweet with release announcement (and link to news article on + php.net) ([@official_php](https://twitter.com/official_php)) ## Rolling a stable release @@ -426,6 +428,9 @@ ## Prime the selection of the Release Managers of the next version +This should be done by one of the release managers of the latest release +branch: + 1. About three months before the scheduled release of the first alpha of the next minor or major release, issue a call for volunteers on internals@lists.php.net (cf. http://news.php.net/php.internals/98652). From 0d913f9acf821f4d3074ac457b93d7c478edbcc5 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Fri, 6 Mar 2020 00:03:13 +0100 Subject: [PATCH 161/201] Fix another memory leak in dom_zvals_to_fragment. --- ext/dom/parentnode.c | 7 +++++++ ext/dom/tests/DOM4_ParentNode_append_with_attributes.phpt | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index be30c79261142..a9502a51590ca 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -179,6 +179,13 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod newNodeObj->document = document; xmlSetTreeDoc(newNode, documentNode); + if (newNode->type == XML_ATTRIBUTE_NODE) { + xmlFree(fragment); + + php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); + return NULL; + } + if (!xmlAddChild(fragment, newNode)) { xmlFree(fragment); diff --git a/ext/dom/tests/DOM4_ParentNode_append_with_attributes.phpt b/ext/dom/tests/DOM4_ParentNode_append_with_attributes.phpt index 3fb266729a895..f2c6aa9a6d1bd 100644 --- a/ext/dom/tests/DOM4_ParentNode_append_with_attributes.phpt +++ b/ext/dom/tests/DOM4_ParentNode_append_with_attributes.phpt @@ -19,8 +19,12 @@ $element = $dom->documentElement; try { $element->append($replacement, $addition); } catch (DOMException $e) { - echo $e->getMessage(); + echo $e->getMessage() . "\n"; } + +echo $dom->saveXML(); ?> --EXPECT-- Hierarchy Request Error + + From b84277297ae18f11055a5731a881a347df8d76b9 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 5 Mar 2020 14:57:27 +0100 Subject: [PATCH 162/201] Fix #75673: SplStack::unserialize() behavior Even though `SplStack::unserialize()` is not supposed to be called on an already constructed instance, it is probably better if the method clears the stack before actually unserializing. --- NEWS | 3 +++ ext/spl/spl_dllist.c | 6 ++++++ ext/spl/tests/bug75673.phpt | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 ext/spl/tests/bug75673.phpt diff --git a/NEWS b/NEWS index 8f89531714f05..f3750061e169e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.3.17 +- Spl: + . Fixed bug #75673 (SplStack::unserialize() behavior). (cmb) + 19 Mar 2020, PHP 7.3.16 - Core: diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index ba9488abfc226..9919b1aa63898 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -1185,6 +1185,12 @@ SPL_METHOD(SplDoublyLinkedList, unserialize) return; } + while (intern->llist->count > 0) { + zval tmp; + spl_ptr_llist_pop(intern->llist, &tmp); + zval_ptr_dtor(&tmp); + } + s = p = (const unsigned char*)buf; PHP_VAR_UNSERIALIZE_INIT(var_hash); diff --git a/ext/spl/tests/bug75673.phpt b/ext/spl/tests/bug75673.phpt new file mode 100644 index 0000000000000..76fe3745fb43d --- /dev/null +++ b/ext/spl/tests/bug75673.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #75673 (SplStack::unserialize() behavior) +--FILE-- +push("one"); +$stack->push("two"); + +$serialized = $stack->serialize(); +var_dump($stack->count()); +$stack->unserialize($serialized); +var_dump($stack->count()); +$stack->unserialize($serialized); +var_dump($stack->count()); +?> +--EXPECT-- +int(2) +int(2) +int(2) From be14d4e135832988b21736af8de71369fa652620 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 5 Mar 2020 15:26:26 +0100 Subject: [PATCH 163/201] better fix for #72374 --- ext/zip/php_zip.c | 23 ++++++++--------------- ext/zip/tests/bug72374.phpt | 19 +++++++++++-------- ext/zip/tests/oo_addpattern.phpt | 6 +++--- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index c167ceedc2949..898627960242a 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1644,7 +1644,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* { zval *self = ZEND_THIS; char *path = "."; - char *remove_path = NULL, *save_remove_path; + char *remove_path = NULL; char *add_path = NULL; size_t add_path_len, remove_path_len = 0, path_len = 1; zend_long remove_all_path = 0; @@ -1676,15 +1676,6 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* RETURN_FALSE; } - save_remove_path = remove_path; - if (remove_path && remove_path_len > 1) { - size_t real_len = strlen(remove_path); - if ((real_len > 1) && ((remove_path[real_len - 1] == '/') || (remove_path[real_len - 1] == '\\'))) { - remove_path = estrndup(remove_path, real_len - 1); - remove_path_len -= 1; - } - } - if (type == 1) { found = php_zip_glob(ZSTR_VAL(pattern), ZSTR_LEN(pattern), glob_flags, return_value); } else { @@ -1707,8 +1698,13 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* file_stripped = ZSTR_VAL(basename); file_stripped_len = ZSTR_LEN(basename); } else if (remove_path && strstr(Z_STRVAL_P(zval_file), remove_path) != NULL) { - file_stripped = Z_STRVAL_P(zval_file) + remove_path_len; - file_stripped_len = Z_STRLEN_P(zval_file) - remove_path_len; + if (IS_SLASH(Z_STRVAL_P(zval_file)[remove_path_len])) { + file_stripped = Z_STRVAL_P(zval_file) + remove_path_len + 1; + file_stripped_len = Z_STRLEN_P(zval_file) - remove_path_len - 1; + } else { + file_stripped = Z_STRVAL_P(zval_file) + remove_path_len; + file_stripped_len = Z_STRLEN_P(zval_file) - remove_path_len; + } } else { file_stripped = Z_STRVAL_P(zval_file); file_stripped_len = Z_STRLEN_P(zval_file); @@ -1741,9 +1737,6 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* } } } - if (remove_path != save_remove_path) { - efree(remove_path); - } } /* }}} */ diff --git a/ext/zip/tests/bug72374.phpt b/ext/zip/tests/bug72374.phpt index b214be3eaf66b..b9906c4a9e972 100644 --- a/ext/zip/tests/bug72374.phpt +++ b/ext/zip/tests/bug72374.phpt @@ -9,16 +9,19 @@ if(!extension_loaded('zip')) die('skip'); $dirname = dirname(__FILE__) . '/'; include $dirname . 'utils.inc'; -$dirname = $dirname . 'bug72374/'; +$dirname = $dirname . 'bug72374'; mkdir($dirname); -$file = $dirname . 'some-foo.txt'; -touch($file); +$file1 = $dirname . '/some-foo.txt'; +touch($file1); +$file2 = $dirname . '/some-bar.txt'; +touch($file2); $zip = new ZipArchive(); -$zip->open($dirname . 'test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE); -$zip->addGlob($file, 0, array('remove_path' => $dirname . 'some-')); -$zip->addGlob($file, 0, array('remove_path' => $dirname)); -verify_entries($zip, ['foo.txt', '/some-foo.txt']); +$zip->open($dirname . '/test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE); +$zip->addGlob($file1, 0, array('remove_path' => $dirname . '/some-')); +$zip->addGlob($file1, 0, array('remove_path' => $dirname . '/')); +$zip->addGlob($file2, 0, array('remove_path' => $dirname)); +verify_entries($zip, ['foo.txt', 'some-foo.txt', 'some-bar.txt']); $zip->close(); ?> --CLEAN-- @@ -26,7 +29,7 @@ $zip->close(); $dirname = dirname(__FILE__) . '/'; include $dirname . 'utils.inc'; -$dirname = $dirname . 'bug72374/'; +$dirname = $dirname . 'bug72374'; rmdir_rf($dirname); ?> --EXPECT-- diff --git a/ext/zip/tests/oo_addpattern.phpt b/ext/zip/tests/oo_addpattern.phpt index 227a89bb178f9..2b9ef1164778a 100644 --- a/ext/zip/tests/oo_addpattern.phpt +++ b/ext/zip/tests/oo_addpattern.phpt @@ -25,7 +25,7 @@ if (!$zip->open($file)) { exit('failed'); } $dir = realpath($dirname); -$options = array('add_path' => 'baz', 'remove_path' => $dir); +$options = array('add_path' => 'baz/', 'remove_path' => $dir); if (!$zip->addPattern('/\.txt$/', $dir, $options)) { echo "failed 1\n"; } @@ -44,8 +44,8 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { "foobar/", "foobar/baz", "entry1.txt", - "baz" . DIRECTORY_SEPARATOR . "foo.txt", - "baz" . DIRECTORY_SEPARATOR . "bar.txt" + "baz/foo.txt", + "baz/bar.txt" ])) { echo "failed\n"; } else { From 125724cf58ef0a03d12612e6e4a8ae9204454cca Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 6 Mar 2020 10:29:16 +0100 Subject: [PATCH 164/201] [ci skip] fix for #72374 is no more a BC break --- NEWS | 2 +- UPGRADING | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index fa0a8cdc905fa..43de837425fd8 100644 --- a/NEWS +++ b/NEWS @@ -131,7 +131,7 @@ PHP NEWS (cmb) - Zip: - . Fixed bug #72374 (remove_path strips first char of filename). (tyage) + . Fixed bug #72374 (remove_path strips first char of filename). (tyage, Remi) . Add ZipArchive::setMtimeName and ZipArchive::setMtimeIndex methods. (Remi) . Add ZipArchive::setProgressCallback method (since libzip 1.3.0). (Remi) . Add ZipArchive::setCancelCallback method (since libzip 1.6.0). (Remi) diff --git a/UPGRADING b/UPGRADING index f99344ac0c359..4eebd4e49efd2 100644 --- a/UPGRADING +++ b/UPGRADING @@ -363,11 +363,6 @@ PHP 8.0 UPGRADE NOTES objects instead of resources. - Zip: - . The remove_path option of ZipArchive::addGlob() and ::addPattern() is now - treated as arbitrary string prefix (for consistency with the add_path - option), whereas formerly it was treated as directory name. This means that - if no trailing directory separator is given, the following character is - no longer stripped from the filename. . ZipArchive::OPSYS_Z_CPM have been removed, should use ZipArchive::OPSYS_CPM (this name was a typo). @@ -428,6 +423,9 @@ PHP 8.0 UPGRADE NOTES . New ZipArchive::lastId property to get index value of last added entry. . Error can be checked after an archive is closed using ZipArchive::status, ZipArchive::statusSys properties or ZipArchive::getStatusString() method. + . The remove_path option of ZipArchive::addGlob() and ::addPattern() is now + treated as arbitrary string prefix (for consistency with the add_path + option), whereas formerly it was treated as directory name. ======================================== 3. Changes in SAPI modules From e9ae581f024e06878b2b1991b7daed6318c811a7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 6 Mar 2020 11:08:59 +0100 Subject: [PATCH 165/201] Fixed bug #62609: Allow implementing Traversable in abstract class Master only, as this depends on fixes to calling order of interface implementation handlers. --- NEWS | 2 ++ Zend/tests/bug62609.phpt | 12 ++++++++++++ Zend/tests/bug62609_2.phpt | 22 ++++++++++++++++++++++ Zend/zend_interfaces.c | 5 +++++ 4 files changed, 41 insertions(+) create mode 100644 Zend/tests/bug62609.phpt create mode 100644 Zend/tests/bug62609_2.phpt diff --git a/NEWS b/NEWS index 43de837425fd8..5dca4c4770984 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ PHP NEWS checks). (Nikita) . Fixed bug #69084 (Unclear error message when not implementing a renamed abstract trait function). (Nikita) + . Fixed bug #62609 (Allow implementing Traversable on abstract classes). + (Nikita) - CURL: . Bumped required libcurl version to 7.29.0. (cmb) diff --git a/Zend/tests/bug62609.phpt b/Zend/tests/bug62609.phpt new file mode 100644 index 0000000000000..9f4827d53ad8a --- /dev/null +++ b/Zend/tests/bug62609.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #62609: Allow implementing Traversable on abstract classes (fail) +--FILE-- + +--EXPECT-- +Fatal error: Class NonAbstractTraversable must implement interface Traversable as part of either Iterator or IteratorAggregate in Unknown on line 0 diff --git a/Zend/tests/bug62609_2.phpt b/Zend/tests/bug62609_2.phpt new file mode 100644 index 0000000000000..c59ac8c2def6b --- /dev/null +++ b/Zend/tests/bug62609_2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #62609: Allow implementing Traversable on abstract classes (work) +--FILE-- + +--EXPECT-- +foo +bar diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index cf8b24d76ab8d..acebe0a1fb729 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -293,6 +293,11 @@ static int zend_implement_traversable(zend_class_entry *interface, zend_class_en if (class_type->get_iterator || (class_type->parent && class_type->parent->get_iterator)) { return SUCCESS; } + /* Abstract class can implement Traversable only, in which case the extending class must + * implement Iterator or IteratorAggregate. */ + if (class_type->ce_flags & ZEND_ACC_EXPLICIT_ABSTRACT_CLASS) { + return SUCCESS; + } if (class_type->num_interfaces) { ZEND_ASSERT(class_type->ce_flags & ZEND_ACC_RESOLVED_INTERFACES); for (i = 0; i < class_type->num_interfaces; i++) { From c3ab8fd3f8d8212d51b14f4d9529fd1fd1f7c2ab Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 6 Mar 2020 11:16:20 +0100 Subject: [PATCH 166/201] Add test for bug #63816 This has been fixed in PHP 7.4, add a test for it. --- Zend/tests/bug63816.phpt | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Zend/tests/bug63816.phpt diff --git a/Zend/tests/bug63816.phpt b/Zend/tests/bug63816.phpt new file mode 100644 index 0000000000000..b6db9bd1dabb6 --- /dev/null +++ b/Zend/tests/bug63816.phpt @@ -0,0 +1,45 @@ +--TEST-- +Bug #63816: implementation child interface and after parent cause fatal error +--FILE-- + +===DONE=== +--EXPECT-- +===DONE=== From 979978cb61281347ddde7f653ad7c7af04f87739 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 6 Mar 2020 10:54:16 +0100 Subject: [PATCH 167/201] Fix community job Marco broke things again. --- azure/community_job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/community_job.yml b/azure/community_job.yml index dc17e10ec5523..87b06184ba956 100644 --- a/azure/community_job.yml +++ b/azure/community_job.yml @@ -75,7 +75,7 @@ jobs: - script: | git clone https://github.com/amphp/amp.git --branch=master --depth=1 cd amp - php7.3 /usr/bin/composer install --no-progress --ignore-platform-reqs + php /usr/bin/composer install --no-progress --ignore-platform-reqs export USE_ZEND_ALLOC=0 sed -i 's/$exit = true/$exit = false/g' vendor/phpunit/phpunit/src/TextUI/Command.php php vendor/bin/phpunit From 9c6e206bce57d84ffe13181033ec6c7be1779ad0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 6 Mar 2020 16:29:17 +0100 Subject: [PATCH 168/201] Remove NO_ACCESS flag for zend_is_callable() We may add support for fake_scope if necessary. --- Zend/zend_API.c | 4 +--- Zend/zend_API.h | 1 - ext/filter/callback_filter.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 50a1d434dbddb..dd823d627ce41 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2956,7 +2956,6 @@ static zend_always_inline int zend_is_callable_check_func(int check_flags, zval } } if (!(fcc->function_handler->common.fn_flags & ZEND_ACC_PUBLIC) && - !(check_flags & IS_CALLABLE_CHECK_NO_ACCESS) && (fcc->calling_scope && ((fcc->object && fcc->calling_scope->__call) || (!fcc->object && fcc->calling_scope->__callstatic)))) { @@ -3024,8 +3023,7 @@ static zend_always_inline int zend_is_callable_check_func(int check_flags, zval } } if (retval - && !(fcc->function_handler->common.fn_flags & ZEND_ACC_PUBLIC) - && !(check_flags & IS_CALLABLE_CHECK_NO_ACCESS)) { + && !(fcc->function_handler->common.fn_flags & ZEND_ACC_PUBLIC)) { scope = zend_get_executed_scope(); if (fcc->function_handler->common.scope != scope) { if ((fcc->function_handler->common.fn_flags & ZEND_ACC_PRIVATE) diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 0e9315916780f..f64f346951732 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -327,7 +327,6 @@ ZEND_API int zend_disable_class(char *class_name, size_t class_name_length); ZEND_API ZEND_COLD void zend_wrong_param_count(void); #define IS_CALLABLE_CHECK_SYNTAX_ONLY (1<<0) -#define IS_CALLABLE_CHECK_NO_ACCESS (1<<1) #define IS_CALLABLE_CHECK_SILENT (1<<3) ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc); diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c index d9ad4bdf24fa3..d02a30b7544d5 100644 --- a/ext/filter/callback_filter.c +++ b/ext/filter/callback_filter.c @@ -22,7 +22,7 @@ void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL) zval args[1]; int status; - if (!option_array || !zend_is_callable(option_array, IS_CALLABLE_CHECK_NO_ACCESS, NULL)) { + if (!option_array || !zend_is_callable(option_array, 0, NULL)) { php_error_docref(NULL, E_WARNING, "First argument is expected to be a valid callback"); zval_ptr_dtor(value); ZVAL_NULL(value); From 941a3b6ccdae528b633576fdffdda99b0eb48876 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 6 Mar 2020 16:34:15 +0100 Subject: [PATCH 169/201] Remove unnecessary uses of CHECK_SILENT If no error is passed, it is always silent. --- Zend/zend_execute.c | 2 +- ext/opcache/jit/zend_jit_helpers.c | 2 +- main/streams/userspace.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index f550614130d35..6f6fb59ecab88 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1011,7 +1011,7 @@ static zend_always_inline zend_bool zend_check_type_slow( builtin_types: type_mask = ZEND_TYPE_FULL_MASK(type); - if ((type_mask & MAY_BE_CALLABLE) && zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL)) { + if ((type_mask & MAY_BE_CALLABLE) && zend_is_callable(arg, 0, NULL)) { return 1; } if ((type_mask & MAY_BE_ITERABLE) && zend_is_iterable(arg)) { diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 7fd91c7317d4b..40d10e4255ebd 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1184,7 +1184,7 @@ static zend_always_inline zend_bool zend_jit_verify_type_common(zval *arg, const builtin_types: type_mask = ZEND_TYPE_FULL_MASK(arg_info->type); - if ((type_mask & MAY_BE_CALLABLE) && zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL)) { + if ((type_mask & MAY_BE_CALLABLE) && zend_is_callable(arg, 0, NULL)) { return 1; } if ((type_mask & MAY_BE_ITERABLE) && zend_is_iterable(arg)) { diff --git a/main/streams/userspace.c b/main/streams/userspace.c index dd6806d35f69c..ffdd0754e4f0e 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -1000,7 +1000,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value case PHP_STREAM_TRUNCATE_SUPPORTED: if (zend_is_callable_ex(&func_name, Z_ISUNDEF(us->object)? NULL : Z_OBJ(us->object), - IS_CALLABLE_CHECK_SILENT, NULL, NULL, NULL)) + 0, NULL, NULL, NULL)) ret = PHP_STREAM_OPTION_RETURN_OK; else ret = PHP_STREAM_OPTION_RETURN_ERR; From dc4f42508dc109d6e8d86ab279b8438bb341f112 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 6 Mar 2020 16:38:18 +0100 Subject: [PATCH 170/201] Skip test on Windows if privileges are insufficient --- ext/spl/tests/bug68825.phpt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ext/spl/tests/bug68825.phpt b/ext/spl/tests/bug68825.phpt index b1ed5fb60f42a..5eec04ea165f7 100644 --- a/ext/spl/tests/bug68825.phpt +++ b/ext/spl/tests/bug68825.phpt @@ -1,5 +1,16 @@ --TEST-- Bug #68825 (Exception in DirectoryIterator::getLinkTarget()) +--SKIPIF-- +&1', $out); + @unlink($fn); + if (strpos($ret, 'privilege')) { + die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.'); + } +} +?> --FILE-- Date: Fri, 6 Mar 2020 17:49:55 +0100 Subject: [PATCH 171/201] PHP-7.4 is now 7.4.5-dev --- main/php_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/php_version.h b/main/php_version.h index 27e342e367db6..78a44f7cf3a50 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 7 #define PHP_MINOR_VERSION 4 -#define PHP_RELEASE_VERSION 3 +#define PHP_RELEASE_VERSION 5 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "7.4.3-dev" -#define PHP_VERSION_ID 70403 +#define PHP_VERSION "7.4.5-dev" +#define PHP_VERSION_ID 70405 From 373a6d82749baf7681127a696374bc0effded5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 7 Mar 2020 20:26:06 +0100 Subject: [PATCH 172/201] Regenerate reflection stubs --- ext/reflection/php_reflection_arginfo.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 45ead8eaac9b5..82c048ad5c881 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -449,8 +449,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ReflectionReference_fromArr ZEND_ARG_INFO(0, key) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionReference_getId, 0, 0, IS_STRING, 0) -ZEND_END_ARG_INFO() +#define arginfo_class_ReflectionReference_getId arginfo_class_ReflectionFunction___toString #define arginfo_class_ReflectionReference___clone arginfo_class_ReflectionFunctionAbstract___clone From ed998f8a0dc727be21b3a4b10841c10dbafe5e6d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 9 Mar 2020 07:09:50 +0100 Subject: [PATCH 173/201] Fix #50678 files extracted by ZipArchive class lost their original modified time --- NEWS | 2 ++ UPGRADING | 1 + ext/zip/php_zip.c | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 5dca4c4770984..2c30043c71d1f 100644 --- a/NEWS +++ b/NEWS @@ -146,5 +146,7 @@ PHP NEWS . ZipArchive::status and ZipArchive::statusSys properties and ZipArchive::getStatusString() method stay valid after the archive is closed. (Remi) + . Fixed bug #50678 (files extracted by ZipArchive class lost their + original modified time). (Remi) <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> diff --git a/UPGRADING b/UPGRADING index 4eebd4e49efd2..41a72c280dad1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -449,6 +449,7 @@ PHP 8.0 UPGRADE NOTES . ZipArchive::addEmptyDir, ZipArchive::addFile and aZipArchive::addFromString methods have a new "flags" argument. This allow to manage name encoding (ZipArchive::FL_ENC_*) and entry replacement (ZipArchive::FL_OVERWRITE) + . ZipArchive::extractTo now restore file modification time. ======================================== 6. New Functions diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 898627960242a..e7ca9cb4775a0 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -258,6 +258,13 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, size_t php_stream_write(stream, b, n); } + if (stream->wrapper->wops->stream_metadata) { + struct utimbuf ut; + + ut.modtime = ut.actime = sb.mtime; + stream->wrapper->wops->stream_metadata(stream->wrapper, fullpath, PHP_STREAM_META_TOUCH, &ut, NULL); + } + php_stream_close(stream); n = zip_fclose(zf); From ef42a7afa502005ab5732614a288476146e43eae Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 9 Mar 2020 09:19:57 +0100 Subject: [PATCH 174/201] fix use after free --- ext/zip/php_zip.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index e7ca9cb4775a0..d8e1f285a9170 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1503,26 +1503,26 @@ static ZIPARCHIVE_METHOD(close) ze_obj = Z_ZIP_P(self); err = zip_close(intern); - - /* Save error for property reader */ -#if LIBZIP_VERSION_MAJOR < 1 - zip_error_get(obj->za, &ze_obj->err_zip, &ze_obj->err_sys); -#else - { - zip_error_t *ziperr; - - ziperr = zip_get_error(intern); - ze_obj->err_zip = zip_error_code_zip(ziperr); - ze_obj->err_sys = zip_error_code_system(ziperr); - zip_error_fini(ziperr); - } -#endif - if (err) { #if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1 php_error_docref(NULL, E_WARNING, "zip_close have failed"); + ze_obj->err_zip = 0; + ze_obj->err_sys = 0; #else php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern)); + /* Save error for property reader */ + #if LIBZIP_VERSION_MAJOR < 1 + zip_error_get(intern, &ze_obj->err_zip, &ze_obj->err_sys); + #else + { + zip_error_t *ziperr; + + ziperr = zip_get_error(intern); + ze_obj->err_zip = zip_error_code_zip(ziperr); + ze_obj->err_sys = zip_error_code_system(ziperr); + zip_error_fini(ziperr); + } + #endif zip_discard(intern); #endif } From f5c1359f57e6745b2176275ccba966663fbcdb4b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 9 Mar 2020 09:29:34 +0100 Subject: [PATCH 175/201] proper fix --- ext/zip/php_zip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index d8e1f285a9170..a63bef6b7bf26 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1506,8 +1506,6 @@ static ZIPARCHIVE_METHOD(close) if (err) { #if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1 php_error_docref(NULL, E_WARNING, "zip_close have failed"); - ze_obj->err_zip = 0; - ze_obj->err_sys = 0; #else php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern)); /* Save error for property reader */ @@ -1525,6 +1523,9 @@ static ZIPARCHIVE_METHOD(close) #endif zip_discard(intern); #endif + } else { + ze_obj->err_zip = 0; + ze_obj->err_sys = 0; } efree(ze_obj->filename); From c5f091e47f8e958715adc9fcb791f3a15e3932c6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 9 Mar 2020 09:55:56 +0100 Subject: [PATCH 176/201] Remove DOM_GET_THIS macro This macro is trivial, it's more obvious to use ZEND_THIS directly. --- ext/dom/xml_common.h | 5 +---- ext/dom/xpath.c | 4 +--- ext/xsl/xsltprocessor.c | 24 +++++++----------------- 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index d239b85b638df..40548c2d1a894 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -81,11 +81,8 @@ PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj); #define DOM_RET_OBJ(obj, ret, domobject) \ *ret = php_dom_create_object(obj, return_value, domobject) -#define DOM_GET_THIS(zval) \ - do { zval = ZEND_THIS; } while (0) - #define DOM_GET_THIS_OBJ(__ptr, __id, __prtype, __intern) \ - DOM_GET_THIS(__id); \ + __id = ZEND_THIS; \ DOM_GET_OBJ(__ptr, __id, __prtype, __intern); #endif diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index d3960c5790d99..718b433b40921 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -503,13 +503,11 @@ PHP_METHOD(domxpath, evaluate) /* {{{ proto void dom_xpath_register_php_functions() */ PHP_METHOD(domxpath, registerPhpFunctions) { - zval *id; + zval *id = ZEND_THIS; dom_xpath_object *intern; zval *array_value, *entry, new_string; zend_string *name; - DOM_GET_THIS(id); - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "a", &array_value) == SUCCESS) { intern = Z_XPATHOBJ_P(id); ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(array_value), entry) { diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index c64fd668a1f10..d17d0c92f681f 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -745,13 +745,12 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml) PHP_FUNCTION(xsl_xsltprocessor_set_parameter) { - zval *id; + zval *id = ZEND_THIS; zval *array_value, *entry, new_string; xsl_object *intern; char *namespace; size_t namespace_len; zend_string *string_key, *name, *value; - DOM_GET_THIS(id); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "sa", &namespace, &namespace_len, &array_value) == SUCCESS) { intern = Z_XSL_P(id); @@ -790,15 +789,13 @@ PHP_FUNCTION(xsl_xsltprocessor_set_parameter) */ PHP_FUNCTION(xsl_xsltprocessor_get_parameter) { - zval *id; + zval *id = ZEND_THIS; char *namespace; size_t namespace_len = 0; zval *value; zend_string *name; xsl_object *intern; - DOM_GET_THIS(id); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &namespace, &namespace_len, &name) == FAILURE) { RETURN_THROWS(); } @@ -815,14 +812,12 @@ PHP_FUNCTION(xsl_xsltprocessor_get_parameter) */ PHP_FUNCTION(xsl_xsltprocessor_remove_parameter) { - zval *id; + zval *id = ZEND_THIS; size_t namespace_len = 0; char *namespace; zend_string *name; xsl_object *intern; - DOM_GET_THIS(id); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &namespace, &namespace_len, &name) == FAILURE) { RETURN_THROWS(); } @@ -839,13 +834,11 @@ PHP_FUNCTION(xsl_xsltprocessor_remove_parameter) */ PHP_FUNCTION(xsl_xsltprocessor_register_php_functions) { - zval *id; + zval *id = ZEND_THIS; xsl_object *intern; zval *array_value, *entry, new_string; zend_string *name; - DOM_GET_THIS(id); - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "a", &array_value) == SUCCESS) { intern = Z_XSL_P(id); @@ -878,11 +871,10 @@ PHP_FUNCTION(xsl_xsltprocessor_register_php_functions) /* {{{ proto bool xsl_xsltprocessor_set_profiling(string filename) */ PHP_FUNCTION(xsl_xsltprocessor_set_profiling) { - zval *id; + zval *id = ZEND_THIS; xsl_object *intern; char *filename = NULL; size_t filename_len; - DOM_GET_THIS(id); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "p!", &filename, &filename_len) == SUCCESS) { intern = Z_XSL_P(id); @@ -904,11 +896,10 @@ PHP_FUNCTION(xsl_xsltprocessor_set_profiling) /* {{{ proto int xsl_xsltprocessor_set_security_prefs(int securityPrefs) */ PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs) { - zval *id; + zval *id = ZEND_THIS; xsl_object *intern; zend_long securityPrefs, oldSecurityPrefs; - DOM_GET_THIS(id); if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &securityPrefs) == FAILURE) { RETURN_THROWS(); } @@ -924,10 +915,9 @@ PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs) /* {{{ proto int xsl_xsltprocessor_get_security_prefs() */ PHP_FUNCTION(xsl_xsltprocessor_get_security_prefs) { - zval *id; + zval *id = ZEND_THIS; xsl_object *intern; - DOM_GET_THIS(id); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "") == SUCCESS) { intern = Z_XSL_P(id); RETURN_LONG(intern->securityPrefs); From f44dd16b7a2b79285163d5a4c10db60fd5c6648d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 5 Mar 2020 16:56:42 +0100 Subject: [PATCH 177/201] Improve error message of foreach Closes GH-5240 --- Zend/tests/foreach_undefined.phpt | 2 +- Zend/zend_vm_def.h | 6 +++--- Zend/zend_vm_execute.h | 16 ++++++++-------- ext/simplexml/tests/bug38347.phpt | 2 +- ext/simplexml/tests/sxe_003.phpt | 2 +- tests/classes/bug27468.phpt | 2 +- tests/lang/bug27439.phpt | 6 +++--- tests/lang/bug29566.phpt | 2 +- tests/lang/foreachLoop.003.phpt | 10 +++++----- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Zend/tests/foreach_undefined.phpt b/Zend/tests/foreach_undefined.phpt index bc1d8bbc71519..0d46f7cec4b26 100644 --- a/Zend/tests/foreach_undefined.phpt +++ b/Zend/tests/foreach_undefined.phpt @@ -10,5 +10,5 @@ echo "Done\n"; --EXPECTF-- Warning: Undefined variable: a in %s on line %d -Warning: Invalid argument supplied for foreach() in %s on line %d +Warning: foreach() argument must be of type array|object, null given in %s on line %d Done diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index bf5a156389ed2..5d8293dfd7130 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -6188,7 +6188,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, JMP_ADDR) } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; FREE_OP1(); @@ -6277,7 +6277,7 @@ ZEND_VM_COLD_CONST_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, JMP_ADDR) } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; if (OP1_TYPE == IS_VAR) { @@ -6587,7 +6587,7 @@ ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY, JMP_ADDR) value_type = Z_TYPE_INFO_P(value); } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array))); if (UNEXPECTED(EG(exception))) { UNDEF_RESULT(); HANDLE_EXCEPTION(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index c87df4e871545..d07c6c0f5113a 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -4175,7 +4175,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_ } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; if (IS_CONST == IS_VAR) { @@ -17685,7 +17685,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZE } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -17773,7 +17773,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; if (IS_TMP_VAR == IS_VAR) { @@ -20345,7 +20345,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZE } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -20434,7 +20434,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; if (IS_VAR == IS_VAR) { @@ -20744,7 +20744,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER(Z value_type = Z_TYPE_INFO_P(value); } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array))); if (UNEXPECTED(EG(exception))) { UNDEF_RESULT(); HANDLE_EXCEPTION(); @@ -36334,7 +36334,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEN } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -36422,7 +36422,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; if (IS_CV == IS_VAR) { diff --git a/ext/simplexml/tests/bug38347.phpt b/ext/simplexml/tests/bug38347.phpt index c6b5bf7facd2c..73bcd06e82b95 100644 --- a/ext/simplexml/tests/bug38347.phpt +++ b/ext/simplexml/tests/bug38347.phpt @@ -24,5 +24,5 @@ SimpleXMLElement Object ( ) -Warning: Invalid argument supplied for foreach() in %sbug38347.php on line 6 +Warning: foreach() argument must be of type array|object, null given in %sbug38347.php on line 6 Done diff --git a/ext/simplexml/tests/sxe_003.phpt b/ext/simplexml/tests/sxe_003.phpt index 37a4e554d253e..0705919b692b0 100644 --- a/ext/simplexml/tests/sxe_003.phpt +++ b/ext/simplexml/tests/sxe_003.phpt @@ -58,7 +58,7 @@ for ($sxe->rewind(); $sxe->valid(); $sxe->next()) { ?> --EXPECTF-- -Warning: Invalid argument supplied for foreach() in %ssxe_003.php on line %d +Warning: foreach() argument must be of type array|object, null given in %ssxe_003.php on line %d ===RESET=== bool(true) string(5) "elem1" diff --git a/tests/classes/bug27468.phpt b/tests/classes/bug27468.phpt index 4ef8d44a61d09..d590683c82cfd 100644 --- a/tests/classes/bug27468.phpt +++ b/tests/classes/bug27468.phpt @@ -13,5 +13,5 @@ echo 'OK'; --EXPECTF-- Warning: Undefined property: foo::$x in %s on line %d -Warning: Invalid argument supplied for foreach() in %sbug27468.php on line 4 +Warning: foreach() argument must be of type array|object, null given in %sbug27468.php on line 4 OK diff --git a/tests/lang/bug27439.phpt b/tests/lang/bug27439.phpt index ceb714d81bf1a..c9f08a0403b97 100644 --- a/tests/lang/bug27439.phpt +++ b/tests/lang/bug27439.phpt @@ -67,10 +67,10 @@ echo "===DONE==="; 123 Warning: Undefined property: test::$foobar in %s on line %d -Warning: Invalid argument supplied for foreach() in %s on line %d +Warning: foreach() argument must be of type array|object, null given in %s on line %d -Warning: Invalid argument supplied for foreach() in %s on line %d +Warning: foreach() argument must be of type array|object, string given in %s on line %d -Warning: Invalid argument supplied for foreach() in %s on line %d +Warning: foreach() argument must be of type array|object, string given in %s on line %d 123 ===DONE=== diff --git a/tests/lang/bug29566.phpt b/tests/lang/bug29566.phpt index 9c9a466388e01..0e6d45158b533 100644 --- a/tests/lang/bug29566.phpt +++ b/tests/lang/bug29566.phpt @@ -13,4 +13,4 @@ foreach($var['nosuchkey'] as $v) { --EXPECTF-- Warning: Illegal string offset 'nosuchkey' in %sbug29566.php on line %d -Warning: Invalid argument supplied for foreach() in %sbug29566.php on line %d +Warning: foreach() argument must be of type array|object, string given in %sbug29566.php on line %d diff --git a/tests/lang/foreachLoop.003.phpt b/tests/lang/foreachLoop.003.phpt index 352ac335b7b30..c4ca3019f31f0 100644 --- a/tests/lang/foreachLoop.003.phpt +++ b/tests/lang/foreachLoop.003.phpt @@ -33,13 +33,13 @@ echo "done.\n"; --EXPECTF-- Not an array. -Warning: Invalid argument supplied for foreach() in %s on line 4 +Warning: foreach() argument must be of type array|object, bool given in %s on line 4 -Warning: Invalid argument supplied for foreach() in %s on line 9 +Warning: foreach() argument must be of type array|object, null given in %s on line 9 -Warning: Invalid argument supplied for foreach() in %s on line 14 +Warning: foreach() argument must be of type array|object, int given in %s on line 14 -Warning: Invalid argument supplied for foreach() in %s on line 19 +Warning: foreach() argument must be of type array|object, float given in %s on line 19 -Warning: Invalid argument supplied for foreach() in %s on line 24 +Warning: foreach() argument must be of type array|object, string given in %s on line 24 done. From c6d941dc951076d5a37fdd975879c56ff6d2333e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 9 Mar 2020 11:37:29 +0100 Subject: [PATCH 178/201] Regenerate the VM Some error message changes were missed out previously. --- Zend/zend_vm_execute.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index d07c6c0f5113a..c8af9759c0978 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -4087,7 +4087,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER( } } } else { - zend_error(E_WARNING, "Invalid argument supplied for foreach()"); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_get_type_by_const(Z_TYPE_P(array_ptr))); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -33308,7 +33308,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_UNUSED_UNUSED_H if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("Argument 1 ($object) passed to get_class() must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; From 191451da90b6fe81641d55bf782b551c65e4fd70 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 9 Mar 2020 12:55:14 +0100 Subject: [PATCH 179/201] Fix bug #79358: JIT miscompile in composer --- ext/opcache/jit/zend_jit.c | 11 +++++++++-- ext/opcache/jit/zend_jit_x86.h | 2 +- ext/opcache/tests/jit/bug79358.phpt | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 ext/opcache/tests/jit/bug79358.phpt diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 07d82b89de808..1b3fbcee2f2c9 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -2474,7 +2474,8 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op case ZEND_IS_NOT_EQUAL: case ZEND_IS_SMALLER: case ZEND_IS_SMALLER_OR_EQUAL: - case ZEND_CASE: + case ZEND_CASE: { + res_addr = RES_REG_ADDR(); if ((opline->result_type & IS_TMP_VAR) && (i + 1) <= end && ((opline+1)->opcode == ZEND_JMPZ @@ -2488,6 +2489,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op smart_branch_opcode = (opline+1)->opcode; target_label = ssa->cfg.blocks[b].successors[0]; target_label2 = ssa->cfg.blocks[b].successors[1]; + /* For EX variant write into the result of EX opcode. */ + if ((opline+1)->opcode == ZEND_JMPZ_EX + || (opline+1)->opcode == ZEND_JMPNZ_EX) { + res_addr = OP_REG_ADDR(opline + 1, result_type, result, result_def); + } } else { smart_branch_opcode = 0; target_label = target_label2 = (uint32_t)-1; @@ -2495,12 +2501,13 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op if (!zend_jit_cmp(&dasm_state, opline, op_array, OP1_INFO(), OP1_REG_ADDR(), OP2_INFO(), OP2_REG_ADDR(), - RES_REG_ADDR(), + res_addr, zend_may_throw(opline, op_array, ssa), smart_branch_opcode, target_label, target_label2)) { goto jit_failure; } goto done; + } case ZEND_IS_IDENTICAL: case ZEND_IS_NOT_IDENTICAL: if ((opline->result_type & IS_TMP_VAR) diff --git a/ext/opcache/jit/zend_jit_x86.h b/ext/opcache/jit/zend_jit_x86.h index b3806036f6d0d..6a3b4551051a6 100644 --- a/ext/opcache/jit/zend_jit_x86.h +++ b/ext/opcache/jit/zend_jit_x86.h @@ -270,7 +270,7 @@ static zend_always_inline zend_jit_addr _zend_jit_decode_op(zend_uchar op_type, #define OP2_ADDR() \ OP_ADDR(opline, op2_type, op2) #define RES_ADDR() \ - OP_ADDR(opline, op2_type, op2) + OP_ADDR(opline, result_type, result) #define OP1_DATA_ADDR() \ OP_ADDR(opline + 1, op1_type, op1) diff --git a/ext/opcache/tests/jit/bug79358.phpt b/ext/opcache/tests/jit/bug79358.phpt new file mode 100644 index 0000000000000..1d794045a8509 --- /dev/null +++ b/ext/opcache/tests/jit/bug79358.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #79358: JIT miscompile in composer +--FILE-- + 0xdead && unimportant()) || + ($x < 0xbeef && unimportant()); +} + +var_dump(test(0xcccc)); + +?> +--EXPECT-- +bool(false) From 760faa12b20db56bd3e2faab8d658f622af7da6a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 9 Mar 2020 14:59:59 +0100 Subject: [PATCH 180/201] Fixed bug #79357 Peculiarly, for once the cause was not SOAPs "interesting" error handling, but a bug in the call trampoline for internal functions... --- NEWS | 4 +++ Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 2 +- ext/soap/tests/bug79357.phpt | 16 +++++++++++ ext/soap/tests/bug79357.wsdl | 52 ++++++++++++++++++++++++++++++++++++ 5 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 ext/soap/tests/bug79357.phpt create mode 100644 ext/soap/tests/bug79357.wsdl diff --git a/NEWS b/NEWS index 7e6b0377d1bc7..0836b20688d10 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,10 @@ PHP NEWS ?? ??? ????, PHP 7.4.5 +- SOAP: + . Fixed bug #79357 (SOAP request segfaults when any request parameter is + missing). (Nikita) + - Spl: . Fixed bug #75673 (SplStack::unserialize() behavior). (cmb) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 26679777af159..0282c3c584f61 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8301,10 +8301,10 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY) } if (ret == NULL) { - ZVAL_NULL(&retval); ret = &retval; } + ZVAL_NULL(ret); if (!zend_execute_internal) { /* saves one function call if zend_execute_internal is not used */ fbc->internal_function.handler(call, ret); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 4da5094a791e5..d79bdb1c1f21a 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2806,10 +2806,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z } if (ret == NULL) { - ZVAL_NULL(&retval); ret = &retval; } + ZVAL_NULL(ret); if (!zend_execute_internal) { /* saves one function call if zend_execute_internal is not used */ fbc->internal_function.handler(call, ret); diff --git a/ext/soap/tests/bug79357.phpt b/ext/soap/tests/bug79357.phpt new file mode 100644 index 0000000000000..da3cce5dc264b --- /dev/null +++ b/ext/soap/tests/bug79357.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #79357: SOAP request segfaults when any request parameter is missing +--FILE-- +Add(['intA'=>1]); +var_dump($res); + +?> +--EXPECTF-- +Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'intB' property in %s:%d +Stack trace: +#0 %s(%d): SoapClient->__call('Add', Array) +#1 {main} + thrown in %s on line %d diff --git a/ext/soap/tests/bug79357.wsdl b/ext/soap/tests/bug79357.wsdl new file mode 100644 index 0000000000000..9b69a1c20e56d --- /dev/null +++ b/ext/soap/tests/bug79357.wsdl @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds two integers. This is a test WebService. ©DNE Online + + + + + + + + + + + + + + + + + + + + + + From d9c45d86f9cd3d20f66ebf38384a9f53113415e5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 9 Mar 2020 16:17:02 +0100 Subject: [PATCH 181/201] Improve type inference for COALESCE Place a pi node on the non-null edge to remove a spurious undef/null type. Additionally, adjust the profitability heuristic to be more accurate if the "other predecessor" writes to the variable. Ideally this should not just consider the direct predecessors, but it's sufficient for this case. This partially addresses bug #79353 by removing the discrepancy between ?? and ??=. --- ext/opcache/Optimizer/zend_ssa.c | 38 +++++++++++++++++++++------ ext/opcache/tests/opt/coalesce.phpt | 40 +++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 ext/opcache/tests/opt/coalesce.phpt diff --git a/ext/opcache/Optimizer/zend_ssa.c b/ext/opcache/Optimizer/zend_ssa.c index 41a5f10372c3f..4cd9619f20459 100644 --- a/ext/opcache/Optimizer/zend_ssa.c +++ b/ext/opcache/Optimizer/zend_ssa.c @@ -32,16 +32,30 @@ static zend_bool dominates(const zend_basic_block *blocks, int a, int b) { return a == b; } -static zend_bool dominates_other_predecessors( - const zend_cfg *cfg, const zend_basic_block *block, int check, int exclude) { +static zend_bool will_rejoin( + const zend_cfg *cfg, const zend_dfg *dfg, const zend_basic_block *block, + int other_successor, int exclude, int var) { int i; for (i = 0; i < block->predecessors_count; i++) { int predecessor = cfg->predecessors[block->predecessor_offset + i]; - if (predecessor != exclude && !dominates(cfg->blocks, check, predecessor)) { - return 0; + if (predecessor == exclude) { + continue; + } + + /* The variable is changed in this predecessor, + * so we will not rejoin with the original value. */ + // TODO: This should not be limited to the direct predecessor block. + if (DFG_ISSET(dfg->def, dfg->size, predecessor, var)) { + continue; + } + + /* The other successor dominates this predecessor, + * so we will get the original value from it. */ + if (dominates(cfg->blocks, other_successor, predecessor)) { + return 1; } } - return 1; + return 0; } static zend_bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, int from, int to, int var) /* {{{ */ @@ -68,11 +82,11 @@ static zend_bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa return 1; } - /* Check that the other successor of the from block does not dominate all other predecessors. - * If it does, we'd probably end up annihilating a positive+negative pi assertion. */ + /* Check whether we will rejoin with the original value coming from the other successor, + * in which case the pi node will not have an effect. */ other_successor = from_block->successors[0] == to ? from_block->successors[1] : from_block->successors[0]; - return !dominates_other_predecessors(&ssa->cfg, to_block, other_successor, from); + return !will_rejoin(&ssa->cfg, dfg, to_block, other_successor, from, var); } /* }}} */ @@ -252,6 +266,14 @@ static void place_essa_pis( bt = blocks[j].successors[0]; bf = blocks[j].successors[1]; break; + case ZEND_COALESCE: + if (opline->op1_type == IS_CV) { + int var = EX_VAR_TO_NUM(opline->op1.var); + if ((pi = add_pi(arena, op_array, dfg, ssa, j, blocks[j].successors[0], var))) { + pi_not_type_mask(pi, MAY_BE_NULL); + } + } + continue; default: continue; } diff --git a/ext/opcache/tests/opt/coalesce.phpt b/ext/opcache/tests/opt/coalesce.phpt new file mode 100644 index 0000000000000..0135b0df7dc75 --- /dev/null +++ b/ext/opcache/tests/opt/coalesce.phpt @@ -0,0 +1,40 @@ +--TEST-- +COALESCE optimization +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +opcache.opt_debug_level=0x20000 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +$_main: ; (lines=1, args=0, vars=0, tmps=0) + ; (after optimizer) + ; %s +L0 (14): RETURN int(1) + +a: ; (lines=2, args=0, vars=1, tmps=1) + ; (after optimizer) + ; %s +L0 (4): T1 = COALESCE CV0($test) L1 +L1 (5): RETURN bool(true) + +b: ; (lines=2, args=0, vars=1, tmps=1) + ; (after optimizer) + ; %s +L0 (9): T1 = COALESCE CV0($test) L1 +L1 (10): RETURN bool(true) From d5e206620b80b0f198f6dd1865a758edf7ea1494 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 9 Mar 2020 17:58:36 +0100 Subject: [PATCH 182/201] Enclose INI values containing {TMP} in quotes At least on Windows, the temporary directory may contain tilde signs, which would result in an INI parse error. --- ext/mysqli/tests/mysqli_store_result_buffered_c.phpt | 2 +- ext/mysqli/tests/mysqli_store_result_copy.phpt | 2 +- ext/opcache/tests/bug71443.phpt | 2 +- ext/opcache/tests/bug76275.phpt | 2 +- ext/opcache/tests/bug78189.phpt | 2 +- ext/readline/tests/bug69054.phpt | 2 +- ext/session/tests/bug32330.phpt | 2 +- ext/session/tests/session_set_save_handler_sid_002.phpt | 2 +- ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt | 2 +- ext/standard/tests/file/bug41655_1-win32.phpt | 2 +- ext/standard/tests/file/bug41655_1.phpt | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt b/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt index cc776f01e2cfb..548b9719d272b 100644 --- a/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt +++ b/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt @@ -7,7 +7,7 @@ require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); ?> --INI-- -mysqlnd.debug=d:t:O,{TMP}/mysqlnd.trace +mysqlnd.debug="d:t:O,{TMP}/mysqlnd.trace" --FILE-- --INI-- -mysqlnd.debug=d:t:O,{TMP}/mysqlnd.trace +mysqlnd.debug="d:t:O,{TMP}/mysqlnd.trace" mysqlnd.net_read_buffer_size=1 mysqlnd.mempool_default_size=1 mysqlnd.fetch_data_copy=0 diff --git a/ext/opcache/tests/bug71443.phpt b/ext/opcache/tests/bug71443.phpt index 54c123d4ad8ff..5887a2c018e99 100644 --- a/ext/opcache/tests/bug71443.phpt +++ b/ext/opcache/tests/bug71443.phpt @@ -3,7 +3,7 @@ Bug #71443 (Segfault using built-in webserver with intl using symfony) --INI-- opcache.enable=1 opcache.enable_cli=1 -opcache.file_cache={TMP} +opcache.file_cache="{TMP}" opcache.file_cache_only=1 --SKIPIF-- diff --git a/ext/opcache/tests/bug76275.phpt b/ext/opcache/tests/bug76275.phpt index 0600b382f962e..56a47316b4276 100644 --- a/ext/opcache/tests/bug76275.phpt +++ b/ext/opcache/tests/bug76275.phpt @@ -3,7 +3,7 @@ Bug #76275: Assertion failure in file cache when unserializing empty try_catch_a --INI-- opcache.enabled=1 opcache.enable_cli=1 -opcache.file_cache={TMP} +opcache.file_cache="{TMP}" --SKIPIF-- --FILE-- diff --git a/ext/opcache/tests/bug78189.phpt b/ext/opcache/tests/bug78189.phpt index d97d8e94706f2..5e59b5eab6c35 100644 --- a/ext/opcache/tests/bug78189.phpt +++ b/ext/opcache/tests/bug78189.phpt @@ -8,7 +8,7 @@ if (substr(PHP_OS, 0, 3) !== 'WIN') die('skip this test is for Windows platforms --INI-- opcache.enable_cli=1 opcache.optimization_level=-1 -opcache.file_cache={TMP} +opcache.file_cache="{TMP}" opcache.file_cache_only=1 --FILE-- --INI-- -open_basedir={TMP} +open_basedir="{TMP}" --FILE-- ==DONE== diff --git a/ext/session/tests/bug32330.phpt b/ext/session/tests/bug32330.phpt index 4d432ef1d4536..1c7713dbfb226 100644 --- a/ext/session/tests/bug32330.phpt +++ b/ext/session/tests/bug32330.phpt @@ -6,7 +6,7 @@ Bug #32330 (session_destroy, "Failed to initialize storage module", custom sessi session.use_trans_sid=0 session.use_cookies=1 session.name=sid -session.save_path={TMP} +session.save_path="{TMP}" session.gc_probability=1 session.gc_divisor=1 session.save_handler=files diff --git a/ext/session/tests/session_set_save_handler_sid_002.phpt b/ext/session/tests/session_set_save_handler_sid_002.phpt index 76ffb63991501..991c731918c44 100644 --- a/ext/session/tests/session_set_save_handler_sid_002.phpt +++ b/ext/session/tests/session_set_save_handler_sid_002.phpt @@ -3,7 +3,7 @@ Test session_set_save_handler() function: create_sid --INI-- session.save_handler=files session.name=PHPSESSID -session.save_path={TMP} +session.save_path="{TMP}" --SKIPIF-- --FILE-- diff --git a/ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt b/ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt index 1a9b7858d3978..feebc0d7243a3 100644 --- a/ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt +++ b/ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt @@ -4,7 +4,7 @@ SQLite3::loadExtension with empty extension test Jelle Lampaert #Belgian Testfest 2009 --INI-- -sqlite3.extension_dir={TMP} +sqlite3.extension_dir="{TMP}" --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/bug41655_1-win32.phpt b/ext/standard/tests/file/bug41655_1-win32.phpt index f21ad0088ba3e..8ce47b1ff0cff 100644 --- a/ext/standard/tests/file/bug41655_1-win32.phpt +++ b/ext/standard/tests/file/bug41655_1-win32.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { --CREDITS-- Dave Kelsey --INI-- -open_basedir={TMP} +open_basedir="{TMP}" --FILE-- --INI-- -open_basedir={TMP} +open_basedir="{TMP}" --FILE-- Date: Thu, 5 Mar 2020 21:12:59 +0100 Subject: [PATCH 183/201] Perform some maintenance work on the XSL extension Added stubs, fixed some ZPP, and changed PHP_FALIASes to PHP_METHODs. Closes GH-5241 --- ...cessor_hasExsltSupport_wrongparam_001.phpt | 8 +- ext/xsl/xsl_fe.h | 24 +-- ext/xsl/xsltprocessor.c | 195 +++++++----------- ext/xsl/xsltprocessor.stub.php | 55 +++++ ext/xsl/xsltprocessor_arginfo.h | 49 +++++ 5 files changed, 196 insertions(+), 135 deletions(-) create mode 100644 ext/xsl/xsltprocessor.stub.php create mode 100644 ext/xsl/xsltprocessor_arginfo.h diff --git a/ext/xsl/tests/xsltprocessor_hasExsltSupport_wrongparam_001.phpt b/ext/xsl/tests/xsltprocessor_hasExsltSupport_wrongparam_001.phpt index bdbdd5da58f0c..fd8fa429fc218 100644 --- a/ext/xsl/tests/xsltprocessor_hasExsltSupport_wrongparam_001.phpt +++ b/ext/xsl/tests/xsltprocessor_hasExsltSupport_wrongparam_001.phpt @@ -7,7 +7,11 @@ Rodrigo Prado de Jesus --FILE-- hasExsltSupport('stringValue')); +try { + $proc->hasExsltSupport('stringValue'); +} catch (ArgumentCountError $exception) { + echo $exception->getMessage() . "\n"; +} ?> --EXPECT-- -bool(true) +XSLTProcessor::hasExsltSupport() expects exactly 0 parameters, 1 given diff --git a/ext/xsl/xsl_fe.h b/ext/xsl/xsl_fe.h index fbb01866196c7..dd8168186393e 100644 --- a/ext/xsl/xsl_fe.h +++ b/ext/xsl/xsl_fe.h @@ -20,17 +20,17 @@ extern const zend_function_entry php_xsl_xsltprocessor_class_functions[]; extern zend_class_entry *xsl_xsltprocessor_class_entry; -PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet); -PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc); -PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri); -PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml); -PHP_FUNCTION(xsl_xsltprocessor_set_parameter); -PHP_FUNCTION(xsl_xsltprocessor_get_parameter); -PHP_FUNCTION(xsl_xsltprocessor_remove_parameter); -PHP_FUNCTION(xsl_xsltprocessor_has_exslt_support); -PHP_FUNCTION(xsl_xsltprocessor_register_php_functions); -PHP_FUNCTION(xsl_xsltprocessor_set_profiling); -PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs); -PHP_FUNCTION(xsl_xsltprocessor_get_security_prefs); +PHP_METHOD(XSLTProcessor, importStylesheet); +PHP_METHOD(XSLTProcessor, transformToDoc); +PHP_METHOD(XSLTProcessor, transformToUri); +PHP_METHOD(XSLTProcessor, transformToXml); +PHP_METHOD(XSLTProcessor, setParameter); +PHP_METHOD(XSLTProcessor, getParameter); +PHP_METHOD(XSLTProcessor, removeParameter); +PHP_METHOD(XSLTProcessor, hasExsltSupport); +PHP_METHOD(XSLTProcessor, registerPHPFunctions); +PHP_METHOD(XSLTProcessor, setProfiling); +PHP_METHOD(XSLTProcessor, setSecurityPrefs); +PHP_METHOD(XSLTProcessor, getSecurityPrefs); #endif diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index d17d0c92f681f..539fe39e617d3 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -21,61 +21,9 @@ #include "php.h" #include "php_xsl.h" +#include "xsltprocessor_arginfo.h" #include "ext/libxml/php_libxml.h" -/* {{{ arginfo */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0, 0, 1) - ZEND_ARG_INFO(0, doc) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_doc, 0, 0, 1) - ZEND_ARG_INFO(0, doc) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_uri, 0, 0, 2) - ZEND_ARG_INFO(0, doc) - ZEND_ARG_INFO(0, uri) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_xml, 0, 0, 1) - ZEND_ARG_INFO(0, doc) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_set_parameter, 0, 0, 2) - ZEND_ARG_INFO(0, namespace) - ZEND_ARG_INFO(0, name) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_get_parameter, 0, 0, 2) - ZEND_ARG_INFO(0, namespace) - ZEND_ARG_INFO(0, name) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_remove_parameter, 0, 0, 2) - ZEND_ARG_INFO(0, namespace) - ZEND_ARG_INFO(0, name) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_has_exslt_support, 0, 0, 0) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_register_php_functions, 0, 0, 0) - ZEND_ARG_INFO(0, restrict) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_set_profiling, 0, 0, 1) - ZEND_ARG_INFO(0, filename) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_set_security_prefs, 0, 0, 1) - ZEND_ARG_INFO(0, securityPrefs) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_get_security_prefs, 0, 0, 0) -ZEND_END_ARG_INFO(); -/* }}} */ - /* * class xsl_xsltprocessor * @@ -84,18 +32,18 @@ ZEND_END_ARG_INFO(); */ const zend_function_entry php_xsl_xsltprocessor_class_functions[] = { - PHP_FALIAS(importStylesheet, xsl_xsltprocessor_import_stylesheet, arginfo_xsl_xsltprocessor_import_stylesheet) - PHP_FALIAS(transformToDoc, xsl_xsltprocessor_transform_to_doc, arginfo_xsl_xsltprocessor_transform_to_doc) - PHP_FALIAS(transformToUri, xsl_xsltprocessor_transform_to_uri, arginfo_xsl_xsltprocessor_transform_to_uri) - PHP_FALIAS(transformToXml, xsl_xsltprocessor_transform_to_xml, arginfo_xsl_xsltprocessor_transform_to_xml) - PHP_FALIAS(setParameter, xsl_xsltprocessor_set_parameter, arginfo_xsl_xsltprocessor_set_parameter) - PHP_FALIAS(getParameter, xsl_xsltprocessor_get_parameter, arginfo_xsl_xsltprocessor_get_parameter) - PHP_FALIAS(removeParameter, xsl_xsltprocessor_remove_parameter, arginfo_xsl_xsltprocessor_remove_parameter) - PHP_FALIAS(hasExsltSupport, xsl_xsltprocessor_has_exslt_support, arginfo_xsl_xsltprocessor_has_exslt_support) - PHP_FALIAS(registerPHPFunctions, xsl_xsltprocessor_register_php_functions, arginfo_xsl_xsltprocessor_register_php_functions) - PHP_FALIAS(setProfiling, xsl_xsltprocessor_set_profiling, arginfo_xsl_xsltprocessor_set_profiling) - PHP_FALIAS(setSecurityPrefs, xsl_xsltprocessor_set_security_prefs, arginfo_xsl_xsltprocessor_set_security_prefs) - PHP_FALIAS(getSecurityPrefs, xsl_xsltprocessor_get_security_prefs, arginfo_xsl_xsltprocessor_get_security_prefs) + PHP_ME(XSLTProcessor, importStylesheet, arginfo_class_XSLTProcessor_importStylesheet, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, transformToDoc, arginfo_class_XSLTProcessor_transformToDoc, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, transformToUri, arginfo_class_XSLTProcessor_transformToUri, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, transformToXml, arginfo_class_XSLTProcessor_transformToXml, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, setParameter, arginfo_class_XSLTProcessor_setParameter, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, getParameter, arginfo_class_XSLTProcessor_getParameter, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, removeParameter, arginfo_class_XSLTProcessor_removeParameter, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, hasExsltSupport, arginfo_class_XSLTProcessor_hasExsltSupport, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, registerPHPFunctions, arginfo_class_XSLTProcessor_registerPHPFunctions, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, setProfiling, arginfo_class_XSLTProcessor_setProfiling, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, setSecurityPrefs, arginfo_class_XSLTProcessor_setSecurityPrefs, ZEND_ACC_PUBLIC) + PHP_ME(XSLTProcessor, getSecurityPrefs, arginfo_class_XSLTProcessor_getSecurityPrefs, ZEND_ACC_PUBLIC) PHP_FE_END }; @@ -386,11 +334,11 @@ void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs) /* {{ } /* }}} */ -/* {{{ proto void xsl_xsltprocessor_import_stylesheet(domdocument doc) +/* {{{ proto void XSLTProcessor::importStylesheet(domdocument doc) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since: */ -PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet) +PHP_METHOD(XSLTProcessor, importStylesheet) { zval *id, *docp = NULL; xmlDoc *doc = NULL, *newdoc = NULL; @@ -470,7 +418,7 @@ PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet) php_xsl_set_object(id, sheetp); RETVAL_TRUE; } -/* }}} end xsl_xsltprocessor_import_stylesheet */ +/* }}} end XSLTProcessor::importStylesheet */ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStylesheetPtr style, zval *docp) /* {{{ */ { @@ -613,11 +561,11 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl } /* }}} */ -/* {{{ proto domdocument xsl_xsltprocessor_transform_to_doc(domnode doc) +/* {{{ proto domdocument XSLTProcessor::transformToDoc(domnode doc) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since: */ -PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc) +PHP_METHOD(XSLTProcessor, transformToDoc) { zval *id, *docp = NULL; xmlDoc *newdocp; @@ -668,11 +616,11 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc) } } -/* }}} end xsl_xsltprocessor_transform_to_doc */ +/* }}} end XSLTProcessor::transformToDoc */ -/* {{{ proto int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri) +/* {{{ proto int XSLTProcessor::transformToUri(domdocument doc, string uri) */ -PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri) +PHP_METHOD(XSLTProcessor, transformToUri) { zval *id, *docp = NULL; xmlDoc *newdocp; @@ -700,11 +648,11 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri) RETVAL_LONG(ret); } -/* }}} end xsl_xsltprocessor_transform_to_uri */ +/* }}} end XSLTProcessor::transformToUri */ -/* {{{ proto string xsl_xsltprocessor_transform_to_xml(domdocument doc) +/* {{{ proto string XSLTProcessor::transformToXml(domdocument doc) */ -PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml) +PHP_METHOD(XSLTProcessor, transformToXml) { zval *id, *docp = NULL; xmlDoc *newdocp; @@ -738,11 +686,11 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml) RETURN_FALSE; } } -/* }}} end xsl_xsltprocessor_transform_to_xml */ +/* }}} end XSLTProcessor::transformToXml */ -/* {{{ proto bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value]) +/* {{{ proto bool XSLTProcessor::setParameter(string namespace, mixed name [, string value]) */ -PHP_FUNCTION(xsl_xsltprocessor_set_parameter) +PHP_METHOD(XSLTProcessor, setParameter) { zval *id = ZEND_THIS; @@ -764,7 +712,7 @@ PHP_FUNCTION(xsl_xsltprocessor_set_parameter) } str = zval_try_get_string(entry); if (UNEXPECTED(!str)) { - return; + RETURN_THROWS(); } ZVAL_STR(&tmp, str); zend_hash_update(intern->parameter, string_key, &tmp); @@ -783,11 +731,11 @@ PHP_FUNCTION(xsl_xsltprocessor_set_parameter) } } -/* }}} end xsl_xsltprocessor_set_parameter */ +/* }}} end XSLTProcessor::setParameter */ -/* {{{ proto string xsl_xsltprocessor_get_parameter(string namespace, string name) +/* {{{ proto string XSLTProcessor::getParameter(string namespace, string name) */ -PHP_FUNCTION(xsl_xsltprocessor_get_parameter) +PHP_METHOD(XSLTProcessor, getParameter) { zval *id = ZEND_THIS; char *namespace; @@ -806,11 +754,11 @@ PHP_FUNCTION(xsl_xsltprocessor_get_parameter) RETURN_FALSE; } } -/* }}} end xsl_xsltprocessor_get_parameter */ +/* }}} end XSLTProcessor::getParameter */ -/* {{{ proto bool xsl_xsltprocessor_remove_parameter(string namespace, string name) +/* {{{ proto bool XSLTProcessor::removeParameter(string namespace, string name) */ -PHP_FUNCTION(xsl_xsltprocessor_remove_parameter) +PHP_METHOD(XSLTProcessor, removeParameter) { zval *id = ZEND_THIS; size_t namespace_len = 0; @@ -828,11 +776,11 @@ PHP_FUNCTION(xsl_xsltprocessor_remove_parameter) RETURN_FALSE; } } -/* }}} end xsl_xsltprocessor_remove_parameter */ +/* }}} end XSLTProcessor::removeParameter */ -/* {{{ proto void xsl_xsltprocessor_register_php_functions([mixed $restrict]) +/* {{{ proto void XSLTProcessor::registerPHPFunctions([mixed $restrict]) */ -PHP_FUNCTION(xsl_xsltprocessor_register_php_functions) +PHP_METHOD(XSLTProcessor, registerPHPFunctions) { zval *id = ZEND_THIS; xsl_object *intern; @@ -860,41 +808,41 @@ PHP_FUNCTION(xsl_xsltprocessor_register_php_functions) zend_hash_update(intern->registered_phpfunctions, name, &new_string); intern->registerPhpFunctions = 2; - } else { + } else if (zend_parse_parameters_none() == SUCCESS) { intern = Z_XSL_P(id); intern->registerPhpFunctions = 1; } - } -/* }}} end xsl_xsltprocessor_register_php_functions(); */ +/* }}} end XSLTProcessor::registerPHPFunctions(); */ -/* {{{ proto bool xsl_xsltprocessor_set_profiling(string filename) */ -PHP_FUNCTION(xsl_xsltprocessor_set_profiling) +/* {{{ proto bool XSLTProcessor::setProfiling(string filename) */ +PHP_METHOD(XSLTProcessor, setProfiling) { zval *id = ZEND_THIS; xsl_object *intern; char *filename = NULL; size_t filename_len; - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "p!", &filename, &filename_len) == SUCCESS) { - intern = Z_XSL_P(id); - if (intern->profiling) { - efree(intern->profiling); - } - if (filename != NULL) { - intern->profiling = estrndup(filename, filename_len); - } else { - intern->profiling = NULL; - } - RETURN_TRUE; + if (zend_parse_parameters(ZEND_NUM_ARGS(), "p!", &filename, &filename_len) == FAILURE) { + RETURN_THROWS(); + } + + intern = Z_XSL_P(id); + if (intern->profiling) { + efree(intern->profiling); + } + if (filename != NULL) { + intern->profiling = estrndup(filename, filename_len); } else { - WRONG_PARAM_COUNT; + intern->profiling = NULL; } + + RETURN_TRUE; } -/* }}} end xsl_xsltprocessor_set_profiling */ +/* }}} end XSLTProcessor::setProfiling */ -/* {{{ proto int xsl_xsltprocessor_set_security_prefs(int securityPrefs) */ -PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs) +/* {{{ proto int XSLTProcessor::setSecurityPrefs(int securityPrefs) */ +PHP_METHOD(XSLTProcessor, setSecurityPrefs) { zval *id = ZEND_THIS; xsl_object *intern; @@ -910,31 +858,36 @@ PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs) intern->securityPrefsSet = 1; RETURN_LONG(oldSecurityPrefs); } -/* }}} end xsl_xsltprocessor_set_security_prefs */ +/* }}} end XSLTProcessor::setSecurityPrefs */ -/* {{{ proto int xsl_xsltprocessor_get_security_prefs() */ -PHP_FUNCTION(xsl_xsltprocessor_get_security_prefs) +/* {{{ proto int XSLTProcessor::getSecurityPrefs() */ +PHP_METHOD(XSLTProcessor, getSecurityPrefs) { zval *id = ZEND_THIS; xsl_object *intern; - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "") == SUCCESS) { - intern = Z_XSL_P(id); - RETURN_LONG(intern->securityPrefs); - } else { - WRONG_PARAM_COUNT; + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); } + + intern = Z_XSL_P(id); + + RETURN_LONG(intern->securityPrefs); } -/* }}} end xsl_xsltprocessor_get_security_prefs */ +/* }}} end XSLTProcessor::getSecurityPrefs */ -/* {{{ proto bool xsl_xsltprocessor_has_exslt_support() +/* {{{ proto bool XSLTProcessor::hasExsltSupport() */ -PHP_FUNCTION(xsl_xsltprocessor_has_exslt_support) +PHP_METHOD(XSLTProcessor, hasExsltSupport) { + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } + #if HAVE_XSL_EXSLT RETURN_TRUE; #else RETURN_FALSE; #endif } -/* }}} end xsl_xsltprocessor_has_exslt_support(); */ +/* }}} end XSLTProcessor::hasExsltSupport(); */ diff --git a/ext/xsl/xsltprocessor.stub.php b/ext/xsl/xsltprocessor.stub.php new file mode 100644 index 0000000000000..8b4dcd1697631 --- /dev/null +++ b/ext/xsl/xsltprocessor.stub.php @@ -0,0 +1,55 @@ + Date: Fri, 6 Mar 2020 10:01:10 +0100 Subject: [PATCH 184/201] Add some stubs for SPL Closes GH-5245 --- ext/spl/php_spl.stub.php | 3 - ext/spl/spl_array.c | 174 +++++++++--------------- ext/spl/spl_array.stub.php | 225 +++++++++++++++++++++++++++++++ ext/spl/spl_array_arginfo.h | 136 +++++++++++++++++++ ext/spl/spl_fixedarray.c | 58 +++----- ext/spl/spl_fixedarray.stub.php | 64 +++++++++ ext/spl/spl_fixedarray_arginfo.h | 46 +++++++ ext/spl/tests/bug71412.phpt | 2 +- 8 files changed, 550 insertions(+), 158 deletions(-) create mode 100755 ext/spl/spl_array.stub.php create mode 100644 ext/spl/spl_array_arginfo.h create mode 100755 ext/spl/spl_fixedarray.stub.php create mode 100644 ext/spl/spl_fixedarray_arginfo.h diff --git a/ext/spl/php_spl.stub.php b/ext/spl/php_spl.stub.php index 8bf6e79c743e7..b9c5335b70f4c 100755 --- a/ext/spl/php_spl.stub.php +++ b/ext/spl/php_spl.stub.php @@ -1,7 +1,5 @@ public method __construct ] { - Parameters [2] { Parameter #0 [ $array ] - Parameter #1 [ $flags ] + Parameter #1 [ int $flags ] } } From fff5771cccaca49565c90349320f3c06cbe19328 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 3 Mar 2020 14:31:09 +0100 Subject: [PATCH 185/201] Require non-absolute trait method refs to be unambiguous Currently, when writing something like class X { use T1, T2 { func as otherFunc; } function func() {} } where both T1::func() and T2::func() exist, we will simply assume that func refers to T1::func(). This is surprising, and it doesn't really make sense that this particular method gets picked. This commit validates that non-absolute method references are unambiguous, i.e. refer to exactly one method. If there is ambiguity, it is required to write T1::func as otherFunc or similar. Closes GH-5232. --- UPGRADING | 14 ++++++++++++ Zend/tests/bug62069.phpt | 32 +++++++++++++++++++++++++++ Zend/tests/bug62069_2.phpt | 35 ++++++++++++++++++++++++++++++ Zend/tests/traits/language011.phpt | 2 +- Zend/zend_inheritance.c | 8 +++++-- 5 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 Zend/tests/bug62069.phpt create mode 100644 Zend/tests/bug62069_2.phpt diff --git a/UPGRADING b/UPGRADING index 41a72c280dad1..db8e2eb22ee51 100644 --- a/UPGRADING +++ b/UPGRADING @@ -149,6 +149,20 @@ PHP 8.0 UPGRADE NOTES function test($a = [], $b) {} // Deprecated function test(Foo $a = null, $b) {} // Allowed + . Non-absolute trait method references in trait alias adaptations are now + required to be unambiguous: + + class X { + use T1, T2 { + func as otherFunc; + } + function func() {} + } + + If both T1::func() and T2::func() exist, this code was previously silently + accepted, and func as assumed to refer to T1::func. Now it will generate a + fatal error instead, and either T1::func or T2::func needs to be written + explicitly. - COM: . Removed the ability to import case-insensitive constants from type diff --git a/Zend/tests/bug62069.phpt b/Zend/tests/bug62069.phpt new file mode 100644 index 0000000000000..d434e271c6207 --- /dev/null +++ b/Zend/tests/bug62069.phpt @@ -0,0 +1,32 @@ +--TEST-- +Bug #62069: binding wrong traits if they have same name methods +--FILE-- +f2(); + +?> +--EXPECTF-- +Fatal error: An alias was defined for method func(), which exists in both T1 and T2. Use T1::func or T2::func to resolve the ambiguity in %s on line %d diff --git a/Zend/tests/bug62069_2.phpt b/Zend/tests/bug62069_2.phpt new file mode 100644 index 0000000000000..c7c42ba6d1973 --- /dev/null +++ b/Zend/tests/bug62069_2.phpt @@ -0,0 +1,35 @@ +--TEST-- +Bug #62069: binding wrong traits if they have same name methods (variation 2) +--FILE-- +f2(); + +?> +--EXPECTF-- +Fatal error: An alias was defined for method func(), which exists in both T1 and T2. Use T1::func or T2::func to resolve the ambiguity in %s on line %d diff --git a/Zend/tests/traits/language011.phpt b/Zend/tests/traits/language011.phpt index 44de874705dd5..1f5b496308878 100644 --- a/Zend/tests/traits/language011.phpt +++ b/Zend/tests/traits/language011.phpt @@ -18,7 +18,7 @@ trait World { class MyClass { - use Hello, World { sayHello as sayWorld; } + use Hello, World { World::sayHello as sayWorld; } } $o = new MyClass(); diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index a031207b85e8b..eab275e509421 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1858,8 +1858,12 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e continue; } - // TODO: This is ambiguous! The first trait is assumed. - break; + zend_error_noreturn(E_COMPILE_ERROR, + "An alias was defined for method %s(), which exists in both %s and %s. Use %s::%s or %s::%s to resolve the ambiguity", + ZSTR_VAL(cur_method_ref->method_name), + ZSTR_VAL(trait->name), ZSTR_VAL(traits[j]->name), + ZSTR_VAL(trait->name), ZSTR_VAL(cur_method_ref->method_name), + ZSTR_VAL(traits[j]->name), ZSTR_VAL(cur_method_ref->method_name)); } } } From d9219f997df2e5852f76e04767baaca4acf729e7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 10 Mar 2020 16:17:32 +0100 Subject: [PATCH 186/201] Enable better trait conflict error message I don't think there is any reason to disable this anymore, at least all the messages generated in tests look correct and more useful. --- Zend/tests/traits/bugs/case-sensitive.phpt | 2 +- Zend/tests/traits/conflict001.phpt | 2 +- Zend/tests/traits/conflict003.phpt | 2 +- Zend/tests/traits/error_011.phpt | 2 +- Zend/tests/traits/error_015.phpt | 2 +- Zend/tests/traits/language010.phpt | 2 +- Zend/tests/traits/language011.phpt | 2 +- Zend/tests/traits/language014.phpt | 2 +- Zend/tests/traits/methods_002.phpt | 2 +- Zend/zend_inheritance.c | 5 ----- 10 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Zend/tests/traits/bugs/case-sensitive.phpt b/Zend/tests/traits/bugs/case-sensitive.phpt index 080b6b7cce483..b0a2e4b545409 100644 --- a/Zend/tests/traits/bugs/case-sensitive.phpt +++ b/Zend/tests/traits/bugs/case-sensitive.phpt @@ -20,4 +20,4 @@ class MyClass { } ?> --EXPECTF-- -Fatal error: Trait method M1 has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d +Fatal error: Trait method B::M1 has not been applied as MyClass::M1, because of collision with A::M1 in %s on line %d diff --git a/Zend/tests/traits/conflict001.phpt b/Zend/tests/traits/conflict001.phpt index c288df735101c..16dd6fc2d5317 100644 --- a/Zend/tests/traits/conflict001.phpt +++ b/Zend/tests/traits/conflict001.phpt @@ -22,4 +22,4 @@ class TraitsTest { } ?> --EXPECTF-- -Fatal error: Trait method hello has not been applied, because there are collisions with other trait methods on TraitsTest in %s on line %d +Fatal error: Trait method THello2::hello has not been applied as TraitsTest::hello, because of collision with THello1::hello in %s on line %d diff --git a/Zend/tests/traits/conflict003.phpt b/Zend/tests/traits/conflict003.phpt index e274063a6f112..23ab97edc6af7 100644 --- a/Zend/tests/traits/conflict003.phpt +++ b/Zend/tests/traits/conflict003.phpt @@ -28,4 +28,4 @@ class Talker { ?> --EXPECTF-- -Fatal error: Trait method smallTalk has not been applied, because there are collisions with other trait methods on Talker in %s on line %d +Fatal error: Trait method B::smallTalk has not been applied as Talker::smallTalk, because of collision with A::smallTalk in %s on line %d diff --git a/Zend/tests/traits/error_011.phpt b/Zend/tests/traits/error_011.phpt index 5042a4be1c443..9fb6bffe8ba79 100644 --- a/Zend/tests/traits/error_011.phpt +++ b/Zend/tests/traits/error_011.phpt @@ -23,4 +23,4 @@ var_dump($x->test()); ?> --EXPECTF-- -Fatal error: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d +Fatal error: Trait method c::test has not been applied as bar::test, because of collision with foo::test in %s on line %d diff --git a/Zend/tests/traits/error_015.phpt b/Zend/tests/traits/error_015.phpt index e494eb680e7e8..c1309bd71354d 100644 --- a/Zend/tests/traits/error_015.phpt +++ b/Zend/tests/traits/error_015.phpt @@ -23,4 +23,4 @@ var_dump($x->test()); ?> --EXPECTF-- -Fatal error: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d +Fatal error: Trait method baz::test has not been applied as bar::test, because of collision with foo::test in %s on line %d diff --git a/Zend/tests/traits/language010.phpt b/Zend/tests/traits/language010.phpt index cd518f43e2019..a5e85d0796334 100644 --- a/Zend/tests/traits/language010.phpt +++ b/Zend/tests/traits/language010.phpt @@ -27,4 +27,4 @@ $o->world(); ?> --EXPECTF-- -Fatal error: Trait method world has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d +Fatal error: Trait method World::world has not been applied as MyClass::world, because of collision with Hello::world in %s on line %d diff --git a/Zend/tests/traits/language011.phpt b/Zend/tests/traits/language011.phpt index 1f5b496308878..6b66da86ce793 100644 --- a/Zend/tests/traits/language011.phpt +++ b/Zend/tests/traits/language011.phpt @@ -27,4 +27,4 @@ $o->sayWorld(); ?> --EXPECTF-- -Fatal error: Trait method sayHello has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d +Fatal error: Trait method World::sayHello has not been applied as MyClass::sayHello, because of collision with Hello::sayHello in %s on line %d diff --git a/Zend/tests/traits/language014.phpt b/Zend/tests/traits/language014.phpt index 20dcdea7c8a96..2e1046fc3d422 100644 --- a/Zend/tests/traits/language014.phpt +++ b/Zend/tests/traits/language014.phpt @@ -27,4 +27,4 @@ $o->world(); ?> --EXPECTF-- -Fatal error: Trait method hello has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d +Fatal error: Trait method World::world has not been applied as MyClass::hello, because of collision with Hello::hello in %s on line %d diff --git a/Zend/tests/traits/methods_002.phpt b/Zend/tests/traits/methods_002.phpt index b23f8df27a3ff..2c72f6c5a68d6 100644 --- a/Zend/tests/traits/methods_002.phpt +++ b/Zend/tests/traits/methods_002.phpt @@ -25,4 +25,4 @@ var_dump(clone $o); ?> --EXPECTF-- -Fatal error: Trait method __clone has not been applied, because there are collisions with other trait methods on bar in %s on line %d +Fatal error: Trait method baz::__clone has not been applied as bar::__clone, because of collision with foo::__clone in %s on line %d diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index eab275e509421..a4371db6f20be 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1612,15 +1612,10 @@ static void zend_add_trait_method(zend_class_entry *ce, zend_string *name, zend_ } else if (UNEXPECTED((existing_fn->common.scope->ce_flags & ZEND_ACC_TRAIT) && !(existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT))) { /* two traits can't define the same non-abstract method */ -#if 1 - zend_error_noreturn(E_COMPILE_ERROR, "Trait method %s has not been applied, because there are collisions with other trait methods on %s", - ZSTR_VAL(name), ZSTR_VAL(ce->name)); -#else /* TODO: better error message */ zend_error_noreturn(E_COMPILE_ERROR, "Trait method %s::%s has not been applied as %s::%s, because of collision with %s::%s", ZSTR_VAL(fn->common.scope->name), ZSTR_VAL(fn->common.function_name), ZSTR_VAL(ce->name), ZSTR_VAL(name), ZSTR_VAL(existing_fn->common.scope->name), ZSTR_VAL(existing_fn->common.function_name)); -#endif } else { /* inherited members are overridden by members inserted by traits */ /* check whether the trait method fulfills the inheritance requirements */ From e8678fcb42c5cb1ea38ff9c6819baca74c2bb5ea Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 10 Mar 2020 16:49:17 +0100 Subject: [PATCH 187/201] Fixed bug #75902 Don't special-case nested arrays/objects in str_replace(), instead perform a string cast on them as well. For arrays, this will always result in the usual conversion warning. This behavior is consistent with preg_replace(). If we didn't want to cast the array to string here, we should instead perform the replacement recursively. Silently copying it is just confusing. --- NEWS | 2 + ext/standard/string.c | 13 ++-- ext/standard/tests/strings/bug25671.phpt | 17 +++-- ext/standard/tests/strings/bug71969.phpt | 13 +--- .../tests/strings/str_replace_variation1.phpt | 62 +++++++++++-------- 5 files changed, 59 insertions(+), 48 deletions(-) diff --git a/NEWS b/NEWS index 2c30043c71d1f..6a871ab37269a 100644 --- a/NEWS +++ b/NEWS @@ -119,6 +119,8 @@ PHP NEWS filter). (kkopachev) . Fixed bug #78385 (parse_url() does not include 'query' when question mark is the last char). (Islam Israfilov) + . Fixed bug #75902 (str_replace should warn when misused with nested arrays). + (Nikita) . Made quoting of cmd execution functions consistent. (cmb) - tidy: diff --git a/ext/standard/string.c b/ext/standard/string.c index ec397fe97c216..363117fce86a4 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4326,15 +4326,12 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit /* For each subject entry, convert it to string, then perform replacement and add the result to the return_value array. */ ZEND_HASH_FOREACH_KEY_VAL(subject_ht, num_key, string_key, subject_entry) { + zend_string *tmp_subject_str; ZVAL_DEREF(subject_entry); - if (Z_TYPE_P(subject_entry) != IS_ARRAY && Z_TYPE_P(subject_entry) != IS_OBJECT) { - zend_string *tmp_subject_str; - subject_str = zval_get_tmp_string(subject_entry, &tmp_subject_str); - count += php_str_replace_in_subject(search, replace, subject_str, &result, case_sensitivity); - zend_tmp_string_release(tmp_subject_str); - } else { - ZVAL_COPY(&result, subject_entry); - } + subject_str = zval_get_tmp_string(subject_entry, &tmp_subject_str); + count += php_str_replace_in_subject(search, replace, subject_str, &result, case_sensitivity); + zend_tmp_string_release(tmp_subject_str); + /* Add to return array */ if (string_key) { zend_hash_add_new(Z_ARRVAL_P(return_value), string_key, &result); diff --git a/ext/standard/tests/strings/bug25671.phpt b/ext/standard/tests/strings/bug25671.phpt index cd6dec6641e28..c564fac2c0a50 100644 --- a/ext/standard/tests/strings/bug25671.phpt +++ b/ext/standard/tests/strings/bug25671.phpt @@ -15,8 +15,15 @@ Bug #25671 (subarrays not copied correctly) echo serialize(str_replace(" ", "", $arr)) . "\n"; echo serialize(str_replace(" ", "", $arr)) . "\n"; ?> ---EXPECT-- -a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:22:"This is a last strung.";} -a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:22:"This is a last strung.";} -a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:18:"Thisisalaststring.";} -a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:18:"Thisisalaststring.";} +--EXPECTF-- +Warning: Array to string conversion in %s on line %d +a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;s:5:"Array";i:3;s:22:"This is a last strung.";} + +Warning: Array to string conversion in %s on line %d +a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;s:5:"Array";i:3;s:22:"This is a last strung.";} + +Warning: Array to string conversion in %s on line %d +a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;s:5:"Array";i:3;s:18:"Thisisalaststring.";} + +Warning: Array to string conversion in %s on line %d +a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;s:5:"Array";i:3;s:18:"Thisisalaststring.";} diff --git a/ext/standard/tests/strings/bug71969.phpt b/ext/standard/tests/strings/bug71969.phpt index 9795186e15272..5d2153c39320e 100644 --- a/ext/standard/tests/strings/bug71969.phpt +++ b/ext/standard/tests/strings/bug71969.phpt @@ -13,16 +13,9 @@ foreach($a as &$record) } var_dump(str_replace("2", "3", $a)); ?> ---EXPECT-- +--EXPECTF-- +Warning: Array to string conversion in %s on line %d array(1) { [0]=> - array(1) { - ["one"]=> - array(2) { - ["a"]=> - string(4) "2222" - ["b"]=> - string(4) "1111" - } - } + string(5) "Array" } diff --git a/ext/standard/tests/strings/str_replace_variation1.phpt b/ext/standard/tests/strings/str_replace_variation1.phpt index 2e6dd18b94fe5..78b483ad934c6 100644 --- a/ext/standard/tests/strings/str_replace_variation1.phpt +++ b/ext/standard/tests/strings/str_replace_variation1.phpt @@ -27,9 +27,11 @@ foreach( $search_arr as $value ) { } ?> ---EXPECT-- +--EXPECTF-- *** Testing str_replace() with various search values *** -- Iteration 0 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(5) "FOUND" @@ -50,8 +52,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -60,6 +61,8 @@ array(12) { int(5) -- Iteration 1 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(1) "1" @@ -80,8 +83,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -90,6 +92,8 @@ array(12) { int(0) -- Iteration 2 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(5) "FOUND" @@ -110,8 +114,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -120,6 +123,8 @@ array(12) { int(5) -- Iteration 3 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(1) "1" @@ -140,8 +145,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -150,6 +154,8 @@ array(12) { int(2) -- Iteration 4 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(1) "1" @@ -170,8 +176,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -180,6 +185,8 @@ array(12) { int(2) -- Iteration 5 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(5) "FOUND" @@ -200,8 +207,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -210,6 +216,8 @@ array(12) { int(5) -- Iteration 6 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(1) "1" @@ -230,8 +238,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -240,6 +247,8 @@ array(12) { int(2) -- Iteration 7 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(1) "1" @@ -260,8 +269,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -270,6 +278,8 @@ array(12) { int(2) -- Iteration 8 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(1) "1" @@ -290,8 +300,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -300,6 +309,8 @@ array(12) { int(0) -- Iteration 9 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(1) "1" @@ -320,8 +331,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> @@ -330,6 +340,8 @@ array(12) { int(0) -- Iteration 10 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(1) "1" @@ -350,8 +362,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(5) "FOUND" [11]=> @@ -360,6 +371,8 @@ array(12) { int(1) -- Iteration 11 -- + +Warning: Array to string conversion in %s on line %d array(12) { [0]=> string(1) "1" @@ -380,8 +393,7 @@ array(12) { [8]=> string(0) "" [9]=> - array(0) { - } + string(5) "Array" [10]=> string(3) "php" [11]=> From f73528f0e0d59ac744ccb4a94a3a9d7b9f0fba1b Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Mon, 9 Mar 2020 15:36:48 +0100 Subject: [PATCH 188/201] Check for sys/auxv.h before using it. Fixes aarch64 compile with uclibc-ng (does not provide sys/auxv.h header file). Closes GH-5248. Signed-off-by: Peter Seiderer --- configure.ac | 1 + ext/standard/crc32.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 12e130902ba73..fd025d37c7827 100644 --- a/configure.ac +++ b/configure.ac @@ -440,6 +440,7 @@ resolv.h \ strings.h \ syslog.h \ sysexits.h \ +sys/auxv.h \ sys/ioctl.h \ sys/file.h \ sys/mman.h \ diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c index c3ca59036c9db..765135a142e7a 100644 --- a/ext/standard/crc32.c +++ b/ext/standard/crc32.c @@ -20,7 +20,7 @@ #include "basic_functions.h" #include "crc32.h" -#if defined(__aarch64__) +#if defined(__aarch64__) && defined(HAVE_SYS_AUXV_H) # include # if defined(__linux__) # include @@ -85,7 +85,7 @@ PHP_NAMED_FUNCTION(php_if_crc32) crc = crcinit^0xFFFFFFFF; -#if defined(__aarch64__) +#if defined(__aarch64__) && defined(HAVE_SYS_AUXV_H) if (has_crc32_insn()) { crc = crc32_aarch64(crc, p, nr); RETURN_LONG(crc^0xFFFFFFFF); From 2462f2dab185f53544f2c5335ba6c16a007f3c71 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 10 Mar 2020 16:12:53 +0100 Subject: [PATCH 189/201] Fix #79364: When copy empty array, next key is unspecified We must not forget to keep the `nNextFreeElement` when duplicating empty arrays. --- NEWS | 3 +++ Zend/tests/bug79364.phpt | 22 ++++++++++++++++++++++ Zend/zend_hash.c | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/bug79364.phpt diff --git a/NEWS b/NEWS index f3750061e169e..b290b23f81bdb 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.3.17 +- Core: + . Fixed bug #79364 (When copy empty array, next key is unspecified). (cmb) + - Spl: . Fixed bug #75673 (SplStack::unserialize() behavior). (cmb) diff --git a/Zend/tests/bug79364.phpt b/Zend/tests/bug79364.phpt new file mode 100644 index 0000000000000..6d96b4d7935d5 --- /dev/null +++ b/Zend/tests/bug79364.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #79364 (When copy empty array, next key is unspecified) +--FILE-- + +--EXPECT-- +array(1) { + [2]=> + int(3) +} +array(1) { + [2]=> + int(4) +} diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 8c0bce5b411ff..6fc4666da9ae2 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1934,7 +1934,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source) target->nTableMask = HT_MIN_MASK; target->nNumUsed = 0; target->nNumOfElements = 0; - target->nNextFreeElement = 0; + target->nNextFreeElement = source->nNextFreeElement; target->nInternalPointer = 0; HT_SET_DATA_ADDR(target, &uninitialized_bucket); } else if (GC_FLAGS(source) & IS_ARRAY_IMMUTABLE) { From 53797c206a4304e0c322c39cb02abf891429367e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 11 Mar 2020 10:16:04 +0100 Subject: [PATCH 190/201] Fix #78210: Invalid pointer address This is actually about three distinct issues: * If an empty string is passed as $address to `stream_socket_sendto()`, the `sa` is not initialized, so we must not pass it as `addr` to `php_stream_xport_sendto()`. * On POSIX, `recvfrom()` truncates messages which are too long to fit into the specified buffer (unless `MSG_PEEK` is given), discards the excessive bytes, and returns the buffer length. On Windows, the same happens, but `recvfrom()` returns `SOCKET_ERROR` with the error code `WSAEMSGSIZE`. We have to catch this for best POSIX compatibility. * In `php_network_parse_network_address_with_port()`, we have to zero `in6` (not only its alias `sa`) to properly support IPv6. Co-Authored-By: Nikita Popov --- NEWS | 1 + ext/standard/streamsfuncs.c | 2 +- main/network.c | 6 ++++-- main/streams/xp_socket.c | 6 ++++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index b290b23f81bdb..7d61149ac01e8 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ PHP NEWS - Core: . Fixed bug #79364 (When copy empty array, next key is unspecified). (cmb) + . Fixed bug #78210 (Invalid pointer address). (cmb, Nikita) - Spl: . Fixed bug #75673 (SplStack::unserialize() behavior). (cmb) diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 8f0bd8bc8e179..6fbfb0bcdc504 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -366,7 +366,7 @@ PHP_FUNCTION(stream_socket_sendto) } } - RETURN_LONG(php_stream_xport_sendto(stream, data, datalen, (int)flags, target_addr ? &sa : NULL, sl)); + RETURN_LONG(php_stream_xport_sendto(stream, data, datalen, (int)flags, target_addr_len ? &sa : NULL, sl)); } /* }}} */ diff --git a/main/network.c b/main/network.c index 21f17e8ade0c3..f00c775c6f3fb 100644 --- a/main/network.c +++ b/main/network.c @@ -512,9 +512,11 @@ PHPAPI int php_network_parse_network_address_with_port(const char *addr, zend_lo zend_string *errstr = NULL; #if HAVE_IPV6 struct sockaddr_in6 *in6 = (struct sockaddr_in6*)sa; -#endif - memset(sa, 0, sizeof(struct sockaddr)); + memset(in6, 0, sizeof(struct sockaddr_in6)); +#else + memset(in4, 0, sizeof(struct sockaddr_in)); +#endif if (*addr == '[') { colon = memchr(addr + 1, ']', addrlen-1); diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index acdb1f8876ca7..0ae0c0f77bfe6 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -272,6 +272,12 @@ static inline int sock_recvfrom(php_netstream_data_t *sock, char *buf, size_t bu socklen_t sl = sizeof(sa); ret = recvfrom(sock->socket, buf, XP_SOCK_BUF_SIZE(buflen), flags, (struct sockaddr*)&sa, &sl); ret = (ret == SOCK_CONN_ERR) ? -1 : ret; +#ifdef PHP_WIN32 + /* POSIX discards excess bytes without signalling failure; emulate this on Windows */ + if (ret == -1 && WSAGetLastError() == WSAEMSGSIZE) { + ret = buflen; + } +#endif if (sl) { php_network_populate_name_from_sockaddr((struct sockaddr*)&sa, sl, textaddr, addr, addrlen); From e902e4acd94b46a85efbc8b88e0808bb318b8ac2 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 11 Mar 2020 15:13:27 +0300 Subject: [PATCH 191/201] Allow to fetch function address --- ext/ffi/ffi.c | 20 +++++++++++++- ext/ffi/tests/101.phpt | 59 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 ext/ffi/tests/101.phpt diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index d99448dd69f05..b0bcd584fd06b 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -2354,7 +2354,7 @@ static zval *zend_ffi_read_var(zval *object, zval *member, int read_type, void * if (ffi->symbols) { sym = zend_hash_find_ptr(ffi->symbols, var_name); - if (sym && sym->kind != ZEND_FFI_SYM_VAR && sym->kind != ZEND_FFI_SYM_CONST) { + if (sym && sym->kind != ZEND_FFI_SYM_VAR && sym->kind != ZEND_FFI_SYM_CONST && sym->kind != ZEND_FFI_SYM_FUNC) { sym = NULL; } } @@ -2368,6 +2368,24 @@ static zval *zend_ffi_read_var(zval *object, zval *member, int read_type, void * if (sym->kind == ZEND_FFI_SYM_VAR) { zend_ffi_cdata_to_zval(NULL, sym->addr, ZEND_FFI_TYPE(sym->type), read_type, rv, (zend_ffi_flags)sym->is_const, 0); + } else if (sym->kind == ZEND_FFI_SYM_FUNC) { + zend_ffi_cdata *cdata; + zend_ffi_type *new_type = emalloc(sizeof(zend_ffi_type)); + + new_type->kind = ZEND_FFI_TYPE_POINTER; + new_type->attr = 0; + new_type->size = sizeof(void*); + new_type->align = _Alignof(void*); + new_type->pointer.type = ZEND_FFI_TYPE(sym->type); + + cdata = emalloc(sizeof(zend_ffi_cdata)); + zend_ffi_object_init(&cdata->std, zend_ffi_cdata_ce); + cdata->std.handlers = &zend_ffi_cdata_handlers; + cdata->type = ZEND_FFI_TYPE_MAKE_OWNED(new_type); + cdata->flags = ZEND_FFI_FLAG_CONST; + cdata->ptr_holder = sym->addr; + cdata->ptr = &cdata->ptr_holder; + ZVAL_OBJ(rv, &cdata->std); } else { ZVAL_LONG(rv, sym->value); } diff --git a/ext/ffi/tests/101.phpt b/ext/ffi/tests/101.phpt new file mode 100644 index 0000000000000..91c6fc4ddfa3e --- /dev/null +++ b/ext/ffi/tests/101.phpt @@ -0,0 +1,59 @@ +--TEST-- +FFI 101: PHP symbols (function address) +--SKIPIF-- + + +--INI-- +ffi.enable=1 +--FILE-- +get_zend_version; +var_dump(trim(explode("\n",$f())[0])); +//var_dump(trim(FFI::string($zend->get_zend_version()))); +var_dump($zend->zend_printf); +var_dump(($zend->zend_printf)("Hello %s!\n", "World")); + +$f = $zend->zend_hash_func; +var_dump($f("file", strlen("file"))); + +$str = $zend->new("char[16]"); +FFI::memcpy($str, "Hello World!", strlen("Hello World!")); +$f = $zend->zend_str_tolower; +$f($str, strlen("Hello World!")); +var_dump(FFI::string($str)); + +?> +--EXPECTF-- +string(%d) "Zend Engine %s" +object(FFI\CData:uint%d_t(*)())#%d (1) { + [0]=> + object(FFI\CData:uint%d_t())#%d (0) { + } +} +Hello World! +int(13) +int(%i) +string(12) "hello world!" From c45552e32bf03e39560f3fbf6bbca64d32cf7fa6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 11 Mar 2020 15:29:58 +0300 Subject: [PATCH 192/201] Export FFI::__BIGGEST_ALIGNMENT__ --- ext/ffi/ffi.c | 12 +++++++----- ext/ffi/tests/022.phpt | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index d99448dd69f05..ffc4f845080de 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -43,6 +43,11 @@ #endif #endif +#ifndef __BIGGEST_ALIGNMENT__ +/* XXX need something better, perhaps with regard to SIMD, etc. */ +# define __BIGGEST_ALIGNMENT__ sizeof(size_t) +#endif + ZEND_DECLARE_MODULE_GLOBALS(ffi) typedef enum _zend_ffi_tag_kind { @@ -5016,6 +5021,8 @@ ZEND_MINIT_FUNCTION(ffi) zend_ffi_handlers.get_properties = zend_fake_get_properties; zend_ffi_handlers.get_gc = zend_fake_get_gc; + zend_declare_class_constant_long(zend_ffi_ce, "__BIGGEST_ALIGNMENT__", sizeof("__BIGGEST_ALIGNMENT__")-1, __BIGGEST_ALIGNMENT__); + INIT_NS_CLASS_ENTRY(ce, "FFI", "CData", NULL); zend_ffi_cdata_ce = zend_register_internal_class(&ce); zend_ffi_cdata_ce->ce_flags |= ZEND_ACC_FINAL; @@ -6347,11 +6354,6 @@ void zend_ffi_set_abi(zend_ffi_dcl *dcl, uint16_t abi) /* {{{ */ } /* }}} */ -#ifndef __BIGGEST_ALIGNMENT__ -/* XXX need something better, perhaps with regard to SIMD, etc. */ -# define __BIGGEST_ALIGNMENT__ sizeof(size_t) -#endif - #define SIMPLE_ATTRIBUTES(_) \ _(cdecl) \ _(fastcall) \ diff --git a/ext/ffi/tests/022.phpt b/ext/ffi/tests/022.phpt index a1c009dce8b9a..3eb28fb214836 100644 --- a/ext/ffi/tests/022.phpt +++ b/ext/ffi/tests/022.phpt @@ -61,8 +61,8 @@ test_size(32, "struct {char a; uint32_t b __attribute__((aligned(16)));}"); test_align(16, "struct {char a; uint32_t b __attribute__((aligned(16)));}"); if (substr(PHP_OS, 0, 3) != 'WIN') { - test_size(32, "struct {char a; uint32_t b __attribute__((aligned));}"); - test_align(16, "struct {char a; uint32_t b __attribute__((aligned));}"); + test_size(FFI::__BIGGEST_ALIGNMENT__ * 2, "struct {char a; uint32_t b __attribute__((aligned));}"); + test_align(FFI::__BIGGEST_ALIGNMENT__, "struct {char a; uint32_t b __attribute__((aligned));}"); } test_size(16, "struct __declspec(align(16)) {char a; uint32_t b;}"); From 22c83454d6d9f890da347c5d2aff503a4b45411b Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Thu, 12 Mar 2020 15:43:15 +0800 Subject: [PATCH 193/201] Folder mark missed --- ext/ffi/ffi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index d99448dd69f05..fcd26674e1942 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -582,6 +582,7 @@ static uint64_t zend_ffi_bit_field_read(void *ptr, zend_ffi_field *field) /* {{{ return val; } +/* }}} */ static void zend_ffi_bit_field_to_zval(void *ptr, zend_ffi_field *field, zval *rv) /* {{{ */ { From 7c081db885756d7b176a55b90b8746f664d1e042 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 7 Mar 2020 11:20:06 +0100 Subject: [PATCH 194/201] Fix #61597: SXE properties may lack attributes and content We must not treat a node as string if it has attributes, unless it is an entity declaration which is always treated as string by simplexml. --- NEWS | 3 +++ ext/simplexml/simplexml.c | 2 +- ext/simplexml/tests/000.phpt | 32 ++++++++++++++++++++++++++++++- ext/simplexml/tests/009b.phpt | 25 ++++++++++++++++++++++-- ext/simplexml/tests/bug51615.phpt | 26 ++++++++++++++++++++++--- ext/simplexml/tests/bug61597.phpt | 30 +++++++++++++++++++++++++++++ 6 files changed, 111 insertions(+), 7 deletions(-) create mode 100644 ext/simplexml/tests/bug61597.phpt diff --git a/NEWS b/NEWS index 7d61149ac01e8..8fd4c708fda2e 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ PHP NEWS . Fixed bug #79364 (When copy empty array, next key is unspecified). (cmb) . Fixed bug #78210 (Invalid pointer address). (cmb, Nikita) +- SimpleXML: + . Fixed bug #61597 (SXE properties may lack attributes and content). (cmb) + - Spl: . Fixed bug #75673 (SplStack::unserialize() behavior). (cmb) diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index ab394b5c83b76..a27a9849a318e 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -964,7 +964,7 @@ static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval php_sxe_object *subnode; xmlChar *contents; - if (node->children && node->children->type == XML_TEXT_NODE && !xmlIsBlankNode(node->children)) { + if ((!node->properties || node->type == XML_ENTITY_DECL) && node->children && node->children->type == XML_TEXT_NODE && !xmlIsBlankNode(node->children)) { contents = xmlNodeListGetString(node->doc, node->children, 1); if (contents) { ZVAL_STRING(value, (char *)contents); diff --git a/ext/simplexml/tests/000.phpt b/ext/simplexml/tests/000.phpt index 8a35fc9ba353c..dde32d8eaa093 100644 --- a/ext/simplexml/tests/000.phpt +++ b/ext/simplexml/tests/000.phpt @@ -51,7 +51,37 @@ object(SimpleXMLElement)#%d (3) { ["elem1"]=> array(2) { [0]=> - string(36) "There is some text.Here is some more" + object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(2) { + ["attr1"]=> + string(5) "first" + ["attr2"]=> + string(6) "second" + } + ["comment"]=> + object(SimpleXMLElement)#%d (0) { + } + ["elem2"]=> + object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(2) { + ["att25"]=> + string(2) "25" + ["att42"]=> + string(2) "42" + } + ["elem3"]=> + object(SimpleXMLElement)#%d (1) { + ["elem4"]=> + object(SimpleXMLElement)#%d (1) { + ["test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } + } [1]=> object(SimpleXMLElement)#%d (1) { ["@attributes"]=> diff --git a/ext/simplexml/tests/009b.phpt b/ext/simplexml/tests/009b.phpt index fd920e2e265b2..a8ca72c5eaa72 100644 --- a/ext/simplexml/tests/009b.phpt +++ b/ext/simplexml/tests/009b.phpt @@ -28,8 +28,29 @@ object(SimpleXMLElement)#%d (3) { string(5) "elem1" } ["elem1"]=> - string(10) "Bla bla 1." + object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(5) "first" + } + ["comment"]=> + object(SimpleXMLElement)#%d (0) { + } + ["elem2"]=> + string(35) " + Here we have some text data. + " + } ["elem11"]=> - string(10) "Bla bla 2." + object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(6) "second" + } + [0]=> + string(10) "Bla bla 2." + } } ===DONE=== diff --git a/ext/simplexml/tests/bug51615.phpt b/ext/simplexml/tests/bug51615.phpt index b935414b80daf..32af5f6ee4021 100644 --- a/ext/simplexml/tests/bug51615.phpt +++ b/ext/simplexml/tests/bug51615.phpt @@ -22,7 +22,7 @@ foreach ($html->body->span as $obj) { Warning: DOMDocument::loadHTML(): error parsing attribute name in Entity, line: 1 in %s on line %d Warning: DOMDocument::loadHTML(): error parsing attribute name in Entity, line: 1 in %s on line %d -object(SimpleXMLElement)#%d (3) { +object(SimpleXMLElement)#5 (3) { ["@attributes"]=> array(2) { ["title"]=> @@ -31,9 +31,29 @@ object(SimpleXMLElement)#%d (3) { string(0) "" } [0]=> - string(1) "x" + object(SimpleXMLElement)#4 (2) { + ["@attributes"]=> + array(2) { + ["title"]=> + string(0) "" + ["y"]=> + string(0) "" + } + [0]=> + string(1) "x" + } [1]=> - string(1) "x" + object(SimpleXMLElement)#6 (2) { + ["@attributes"]=> + array(2) { + ["title"]=> + string(0) "" + ["z"]=> + string(0) "" + } + [0]=> + string(1) "x" + } } string(0) "" string(0) "" diff --git a/ext/simplexml/tests/bug61597.phpt b/ext/simplexml/tests/bug61597.phpt new file mode 100644 index 0000000000000..65fa6be7721be --- /dev/null +++ b/ext/simplexml/tests/bug61597.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #61597 (SXE properties may lack attributes and content) +--SKIPIF-- + +--FILE-- + + +corn + +EOX; + +var_dump(simplexml_load_string($xml)); +?> +--EXPECTF-- +object(SimpleXMLElement)#%d (1) { + ["datum"]=> + object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(1) { + ["file-key"]=> + string(19) "8708124062829849862" + } + [0]=> + string(4) "corn" + } +} From 2b5fc8e325e3f385851ab7a7a77010bbccd2b16e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 11 Mar 2020 18:29:40 +0100 Subject: [PATCH 195/201] Fix #79199: curl_copy_handle() memory leak `curl_copy_handle()` already registers a new resource, so we must not increase the refcount of the original resource. --- NEWS | 3 +++ ext/curl/interface.c | 2 -- ext/curl/tests/bug79199.phpt | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 ext/curl/tests/bug79199.phpt diff --git a/NEWS b/NEWS index 8fd4c708fda2e..32db597c9b995 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ PHP NEWS . Fixed bug #79364 (When copy empty array, next key is unspecified). (cmb) . Fixed bug #78210 (Invalid pointer address). (cmb, Nikita) +- CURL: + . Fixed bug #79199 (curl_copy_handle() memory leak). (cmb) + - SimpleXML: . Fixed bug #61597 (SXE properties may lack attributes and content). (cmb) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index f6707310f49c2..630d3b0a89664 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2167,8 +2167,6 @@ PHP_FUNCTION(curl_copy_handle) _php_setup_easy_copy_handlers(dupch, ch); - Z_ADDREF_P(zid); - ZVAL_RES(return_value, zend_register_resource(dupch, le_curl)); dupch->res = Z_RES_P(return_value); } diff --git a/ext/curl/tests/bug79199.phpt b/ext/curl/tests/bug79199.phpt new file mode 100644 index 0000000000000..b56f22614fe6b --- /dev/null +++ b/ext/curl/tests/bug79199.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #79199 (curl_copy_handle() memory leak) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +okay From 0fdffc18070f083b7064f7c7d97bf1900a2b765b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 11 Mar 2020 21:15:28 +0100 Subject: [PATCH 196/201] Update Unicode tables to 13.0.0 --- UPGRADING | 3 + ext/mbstring/unicode_data.h | 7113 ++++++++++++++++++----------------- 2 files changed, 3608 insertions(+), 3508 deletions(-) diff --git a/UPGRADING b/UPGRADING index db8e2eb22ee51..94cdc29c4f382 100644 --- a/UPGRADING +++ b/UPGRADING @@ -515,6 +515,9 @@ PHP 8.0 UPGRADE NOTES . The function imagegetinterpolation() to get the current interpolation method has been added. +- MBString: + . The Unicode data tables have been updated to version 13.0.0. + ======================================== 10. New Global Constants ======================================== diff --git a/ext/mbstring/unicode_data.h b/ext/mbstring/unicode_data.h index 4f0b18653cf4c..d0bc23aa107d3 100644 --- a/ext/mbstring/unicode_data.h +++ b/ext/mbstring/unicode_data.h @@ -1,7 +1,7 @@ /* This file was generated from a modified version UCData's ucgendat. * * DO NOT EDIT THIS FILE! - * + * * Instead, compile ucgendat.c (bundled with PHP in ext/mbstring), download * the appropriate UnicodeData-x.x.x.txt and CompositionExclusions-x.x.x.txt * files from http://www.unicode.org/Public/ and run this program. @@ -13,12 +13,12 @@ static const unsigned short _ucprop_size = 44; static const unsigned short _ucprop_offsets[] = { - 0x0000, 0x0272, 0x03be, 0x03c8, 0x043a, 0x0452, 0x04d8, 0x04e6, - 0x04e8, 0x04ea, 0x04ee, 0x0514, 0x0516, 0xffff, 0x051c, 0x0a0a, - 0x0f06, 0x0f1a, 0x0f8c, 0x1338, 0x1344, 0x1366, 0x13fc, 0x148c, - 0x15ea, 0x166a, 0x1690, 0x16ca, 0x1826, 0x1d74, 0x1df6, 0x1e0e, - 0x1e20, 0x1e4c, 0x1e5a, 0x1e74, 0x1e7e, 0x1e84, 0x1e92, 0x2256, - 0x226c, 0x2280, 0x22fa, 0x2410, 0x2724, 0x0000, 0x0000, 0x0000 + 0x0000, 0x028e, 0x03ec, 0x03f6, 0x0470, 0x0488, 0x0516, 0x0524, + 0x0526, 0x0528, 0x052c, 0x0554, 0x0556, 0xffff, 0x055c, 0x0a58, + 0x0f62, 0x0f76, 0x0ff0, 0x13c2, 0x13ce, 0x13f2, 0x1488, 0x1518, + 0x1682, 0x1702, 0x172c, 0x1768, 0x18d4, 0x1e50, 0x1ede, 0x1ef8, + 0x1f0a, 0x1f3a, 0x1f48, 0x1f62, 0x1f6c, 0x1f72, 0x1f80, 0x236e, + 0x2384, 0x2398, 0x2414, 0x252e, 0x2862, 0x0000, 0x0000, 0x0000 }; static const unsigned int _ucprop_ranges[] = { @@ -51,7 +51,7 @@ static const unsigned int _ucprop_ranges[] = { 0x00000afa, 0x00000aff, 0x00000b01, 0x00000b01, 0x00000b3c, 0x00000b3c, 0x00000b3f, 0x00000b3f, 0x00000b41, 0x00000b44, 0x00000b4d, 0x00000b4d, - 0x00000b56, 0x00000b56, 0x00000b62, 0x00000b63, + 0x00000b55, 0x00000b56, 0x00000b62, 0x00000b63, 0x00000b82, 0x00000b82, 0x00000bc0, 0x00000bc0, 0x00000bcd, 0x00000bcd, 0x00000c00, 0x00000c00, 0x00000c04, 0x00000c04, 0x00000c3e, 0x00000c40, @@ -62,11 +62,11 @@ static const unsigned int _ucprop_ranges[] = { 0x00000ccc, 0x00000ccd, 0x00000ce2, 0x00000ce3, 0x00000d00, 0x00000d01, 0x00000d3b, 0x00000d3c, 0x00000d41, 0x00000d44, 0x00000d4d, 0x00000d4d, - 0x00000d62, 0x00000d63, 0x00000dca, 0x00000dca, - 0x00000dd2, 0x00000dd4, 0x00000dd6, 0x00000dd6, - 0x00000e31, 0x00000e31, 0x00000e34, 0x00000e3a, - 0x00000e47, 0x00000e4e, 0x00000eb1, 0x00000eb1, - 0x00000eb4, 0x00000eb9, 0x00000ebb, 0x00000ebc, + 0x00000d62, 0x00000d63, 0x00000d81, 0x00000d81, + 0x00000dca, 0x00000dca, 0x00000dd2, 0x00000dd4, + 0x00000dd6, 0x00000dd6, 0x00000e31, 0x00000e31, + 0x00000e34, 0x00000e3a, 0x00000e47, 0x00000e4e, + 0x00000eb1, 0x00000eb1, 0x00000eb4, 0x00000ebc, 0x00000ec8, 0x00000ecd, 0x00000f18, 0x00000f19, 0x00000f35, 0x00000f35, 0x00000f37, 0x00000f37, 0x00000f39, 0x00000f39, 0x00000f71, 0x00000f7e, @@ -91,31 +91,32 @@ static const unsigned int _ucprop_ranges[] = { 0x00001a58, 0x00001a5e, 0x00001a60, 0x00001a60, 0x00001a62, 0x00001a62, 0x00001a65, 0x00001a6c, 0x00001a73, 0x00001a7c, 0x00001a7f, 0x00001a7f, - 0x00001ab0, 0x00001abd, 0x00001b00, 0x00001b03, - 0x00001b34, 0x00001b34, 0x00001b36, 0x00001b3a, - 0x00001b3c, 0x00001b3c, 0x00001b42, 0x00001b42, - 0x00001b6b, 0x00001b73, 0x00001b80, 0x00001b81, - 0x00001ba2, 0x00001ba5, 0x00001ba8, 0x00001ba9, - 0x00001bab, 0x00001bad, 0x00001be6, 0x00001be6, - 0x00001be8, 0x00001be9, 0x00001bed, 0x00001bed, - 0x00001bef, 0x00001bf1, 0x00001c2c, 0x00001c33, - 0x00001c36, 0x00001c37, 0x00001cd0, 0x00001cd2, - 0x00001cd4, 0x00001ce0, 0x00001ce2, 0x00001ce8, - 0x00001ced, 0x00001ced, 0x00001cf4, 0x00001cf4, - 0x00001cf8, 0x00001cf9, 0x00001dc0, 0x00001df9, - 0x00001dfb, 0x00001dff, 0x000020d0, 0x000020dc, - 0x000020e1, 0x000020e1, 0x000020e5, 0x000020f0, - 0x00002cef, 0x00002cf1, 0x00002d7f, 0x00002d7f, - 0x00002de0, 0x00002dff, 0x0000302a, 0x0000302d, - 0x00003099, 0x0000309a, 0x0000a66f, 0x0000a66f, - 0x0000a674, 0x0000a67d, 0x0000a69e, 0x0000a69f, - 0x0000a6f0, 0x0000a6f1, 0x0000a802, 0x0000a802, - 0x0000a806, 0x0000a806, 0x0000a80b, 0x0000a80b, - 0x0000a825, 0x0000a826, 0x0000a8c4, 0x0000a8c5, + 0x00001ab0, 0x00001abd, 0x00001abf, 0x00001ac0, + 0x00001b00, 0x00001b03, 0x00001b34, 0x00001b34, + 0x00001b36, 0x00001b3a, 0x00001b3c, 0x00001b3c, + 0x00001b42, 0x00001b42, 0x00001b6b, 0x00001b73, + 0x00001b80, 0x00001b81, 0x00001ba2, 0x00001ba5, + 0x00001ba8, 0x00001ba9, 0x00001bab, 0x00001bad, + 0x00001be6, 0x00001be6, 0x00001be8, 0x00001be9, + 0x00001bed, 0x00001bed, 0x00001bef, 0x00001bf1, + 0x00001c2c, 0x00001c33, 0x00001c36, 0x00001c37, + 0x00001cd0, 0x00001cd2, 0x00001cd4, 0x00001ce0, + 0x00001ce2, 0x00001ce8, 0x00001ced, 0x00001ced, + 0x00001cf4, 0x00001cf4, 0x00001cf8, 0x00001cf9, + 0x00001dc0, 0x00001df9, 0x00001dfb, 0x00001dff, + 0x000020d0, 0x000020dc, 0x000020e1, 0x000020e1, + 0x000020e5, 0x000020f0, 0x00002cef, 0x00002cf1, + 0x00002d7f, 0x00002d7f, 0x00002de0, 0x00002dff, + 0x0000302a, 0x0000302d, 0x00003099, 0x0000309a, + 0x0000a66f, 0x0000a66f, 0x0000a674, 0x0000a67d, + 0x0000a69e, 0x0000a69f, 0x0000a6f0, 0x0000a6f1, + 0x0000a802, 0x0000a802, 0x0000a806, 0x0000a806, + 0x0000a80b, 0x0000a80b, 0x0000a825, 0x0000a826, + 0x0000a82c, 0x0000a82c, 0x0000a8c4, 0x0000a8c5, 0x0000a8e0, 0x0000a8f1, 0x0000a8ff, 0x0000a8ff, 0x0000a926, 0x0000a92d, 0x0000a947, 0x0000a951, 0x0000a980, 0x0000a982, 0x0000a9b3, 0x0000a9b3, - 0x0000a9b6, 0x0000a9b9, 0x0000a9bc, 0x0000a9bc, + 0x0000a9b6, 0x0000a9b9, 0x0000a9bc, 0x0000a9bd, 0x0000a9e5, 0x0000a9e5, 0x0000aa29, 0x0000aa2e, 0x0000aa31, 0x0000aa32, 0x0000aa35, 0x0000aa36, 0x0000aa43, 0x0000aa43, 0x0000aa4c, 0x0000aa4c, @@ -131,13 +132,14 @@ static const unsigned int _ucprop_ranges[] = { 0x00010a05, 0x00010a06, 0x00010a0c, 0x00010a0f, 0x00010a38, 0x00010a3a, 0x00010a3f, 0x00010a3f, 0x00010ae5, 0x00010ae6, 0x00010d24, 0x00010d27, - 0x00010f46, 0x00010f50, 0x00011001, 0x00011001, - 0x00011038, 0x00011046, 0x0001107f, 0x00011081, - 0x000110b3, 0x000110b6, 0x000110b9, 0x000110ba, - 0x00011100, 0x00011102, 0x00011127, 0x0001112b, - 0x0001112d, 0x00011134, 0x00011173, 0x00011173, - 0x00011180, 0x00011181, 0x000111b6, 0x000111be, - 0x000111c9, 0x000111cc, 0x0001122f, 0x00011231, + 0x00010eab, 0x00010eac, 0x00010f46, 0x00010f50, + 0x00011001, 0x00011001, 0x00011038, 0x00011046, + 0x0001107f, 0x00011081, 0x000110b3, 0x000110b6, + 0x000110b9, 0x000110ba, 0x00011100, 0x00011102, + 0x00011127, 0x0001112b, 0x0001112d, 0x00011134, + 0x00011173, 0x00011173, 0x00011180, 0x00011181, + 0x000111b6, 0x000111be, 0x000111c9, 0x000111cc, + 0x000111cf, 0x000111cf, 0x0001122f, 0x00011231, 0x00011234, 0x00011234, 0x00011236, 0x00011237, 0x0001123e, 0x0001123e, 0x000112df, 0x000112df, 0x000112e3, 0x000112ea, 0x00011300, 0x00011301, @@ -155,6 +157,9 @@ static const unsigned int _ucprop_ranges[] = { 0x000116b7, 0x000116b7, 0x0001171d, 0x0001171f, 0x00011722, 0x00011725, 0x00011727, 0x0001172b, 0x0001182f, 0x00011837, 0x00011839, 0x0001183a, + 0x0001193b, 0x0001193c, 0x0001193e, 0x0001193e, + 0x00011943, 0x00011943, 0x000119d4, 0x000119d7, + 0x000119da, 0x000119db, 0x000119e0, 0x000119e0, 0x00011a01, 0x00011a0a, 0x00011a33, 0x00011a38, 0x00011a3b, 0x00011a3e, 0x00011a47, 0x00011a47, 0x00011a51, 0x00011a56, 0x00011a59, 0x00011a5b, @@ -168,7 +173,8 @@ static const unsigned int _ucprop_ranges[] = { 0x00011d90, 0x00011d91, 0x00011d95, 0x00011d95, 0x00011d97, 0x00011d97, 0x00011ef3, 0x00011ef4, 0x00016af0, 0x00016af4, 0x00016b30, 0x00016b36, - 0x00016f8f, 0x00016f92, 0x0001bc9d, 0x0001bc9e, + 0x00016f4f, 0x00016f4f, 0x00016f8f, 0x00016f92, + 0x00016fe4, 0x00016fe4, 0x0001bc9d, 0x0001bc9e, 0x0001d167, 0x0001d169, 0x0001d17b, 0x0001d182, 0x0001d185, 0x0001d18b, 0x0001d1aa, 0x0001d1ad, 0x0001d242, 0x0001d244, 0x0001da00, 0x0001da36, @@ -177,6 +183,7 @@ static const unsigned int _ucprop_ranges[] = { 0x0001daa1, 0x0001daaf, 0x0001e000, 0x0001e006, 0x0001e008, 0x0001e018, 0x0001e01b, 0x0001e021, 0x0001e023, 0x0001e024, 0x0001e026, 0x0001e02a, + 0x0001e130, 0x0001e136, 0x0001e2ec, 0x0001e2ef, 0x0001e8d0, 0x0001e8d6, 0x0001e944, 0x0001e94a, 0x000e0100, 0x000e01ef, 0x00000903, 0x00000903, 0x0000093b, 0x0000093b, 0x0000093e, 0x00000940, @@ -221,24 +228,24 @@ static const unsigned int _ucprop_ranges[] = { 0x00001be7, 0x00001be7, 0x00001bea, 0x00001bec, 0x00001bee, 0x00001bee, 0x00001bf2, 0x00001bf3, 0x00001c24, 0x00001c2b, 0x00001c34, 0x00001c35, - 0x00001ce1, 0x00001ce1, 0x00001cf2, 0x00001cf3, - 0x00001cf7, 0x00001cf7, 0x0000302e, 0x0000302f, - 0x0000a823, 0x0000a824, 0x0000a827, 0x0000a827, - 0x0000a880, 0x0000a881, 0x0000a8b4, 0x0000a8c3, - 0x0000a952, 0x0000a953, 0x0000a983, 0x0000a983, - 0x0000a9b4, 0x0000a9b5, 0x0000a9ba, 0x0000a9bb, - 0x0000a9bd, 0x0000a9c0, 0x0000aa2f, 0x0000aa30, - 0x0000aa33, 0x0000aa34, 0x0000aa4d, 0x0000aa4d, - 0x0000aa7b, 0x0000aa7b, 0x0000aa7d, 0x0000aa7d, - 0x0000aaeb, 0x0000aaeb, 0x0000aaee, 0x0000aaef, - 0x0000aaf5, 0x0000aaf5, 0x0000abe3, 0x0000abe4, - 0x0000abe6, 0x0000abe7, 0x0000abe9, 0x0000abea, - 0x0000abec, 0x0000abec, 0x00011000, 0x00011000, - 0x00011002, 0x00011002, 0x00011082, 0x00011082, - 0x000110b0, 0x000110b2, 0x000110b7, 0x000110b8, - 0x0001112c, 0x0001112c, 0x00011145, 0x00011146, - 0x00011182, 0x00011182, 0x000111b3, 0x000111b5, - 0x000111bf, 0x000111c0, 0x0001122c, 0x0001122e, + 0x00001ce1, 0x00001ce1, 0x00001cf7, 0x00001cf7, + 0x0000302e, 0x0000302f, 0x0000a823, 0x0000a824, + 0x0000a827, 0x0000a827, 0x0000a880, 0x0000a881, + 0x0000a8b4, 0x0000a8c3, 0x0000a952, 0x0000a953, + 0x0000a983, 0x0000a983, 0x0000a9b4, 0x0000a9b5, + 0x0000a9ba, 0x0000a9bb, 0x0000a9be, 0x0000a9c0, + 0x0000aa2f, 0x0000aa30, 0x0000aa33, 0x0000aa34, + 0x0000aa4d, 0x0000aa4d, 0x0000aa7b, 0x0000aa7b, + 0x0000aa7d, 0x0000aa7d, 0x0000aaeb, 0x0000aaeb, + 0x0000aaee, 0x0000aaef, 0x0000aaf5, 0x0000aaf5, + 0x0000abe3, 0x0000abe4, 0x0000abe6, 0x0000abe7, + 0x0000abe9, 0x0000abea, 0x0000abec, 0x0000abec, + 0x00011000, 0x00011000, 0x00011002, 0x00011002, + 0x00011082, 0x00011082, 0x000110b0, 0x000110b2, + 0x000110b7, 0x000110b8, 0x0001112c, 0x0001112c, + 0x00011145, 0x00011146, 0x00011182, 0x00011182, + 0x000111b3, 0x000111b5, 0x000111bf, 0x000111c0, + 0x000111ce, 0x000111ce, 0x0001122c, 0x0001122e, 0x00011232, 0x00011233, 0x00011235, 0x00011235, 0x000112e0, 0x000112e2, 0x00011302, 0x00011303, 0x0001133e, 0x0001133f, 0x00011341, 0x00011344, @@ -254,97 +261,106 @@ static const unsigned int _ucprop_ranges[] = { 0x000116ae, 0x000116af, 0x000116b6, 0x000116b6, 0x00011720, 0x00011721, 0x00011726, 0x00011726, 0x0001182c, 0x0001182e, 0x00011838, 0x00011838, + 0x00011930, 0x00011935, 0x00011937, 0x00011938, + 0x0001193d, 0x0001193d, 0x00011940, 0x00011940, + 0x00011942, 0x00011942, 0x000119d1, 0x000119d3, + 0x000119dc, 0x000119df, 0x000119e4, 0x000119e4, 0x00011a39, 0x00011a39, 0x00011a57, 0x00011a58, 0x00011a97, 0x00011a97, 0x00011c2f, 0x00011c2f, 0x00011c3e, 0x00011c3e, 0x00011ca9, 0x00011ca9, 0x00011cb1, 0x00011cb1, 0x00011cb4, 0x00011cb4, 0x00011d8a, 0x00011d8e, 0x00011d93, 0x00011d94, 0x00011d96, 0x00011d96, 0x00011ef5, 0x00011ef6, - 0x00016f51, 0x00016f7e, 0x0001d165, 0x0001d166, - 0x0001d16d, 0x0001d172, 0x00000488, 0x00000489, - 0x00001abe, 0x00001abe, 0x000020dd, 0x000020e0, - 0x000020e2, 0x000020e4, 0x0000a670, 0x0000a672, - 0x00000030, 0x00000039, 0x00000660, 0x00000669, - 0x000006f0, 0x000006f9, 0x000007c0, 0x000007c9, - 0x00000966, 0x0000096f, 0x000009e6, 0x000009ef, - 0x00000a66, 0x00000a6f, 0x00000ae6, 0x00000aef, - 0x00000b66, 0x00000b6f, 0x00000be6, 0x00000bef, - 0x00000c66, 0x00000c6f, 0x00000ce6, 0x00000cef, - 0x00000d66, 0x00000d6f, 0x00000de6, 0x00000def, - 0x00000e50, 0x00000e59, 0x00000ed0, 0x00000ed9, - 0x00000f20, 0x00000f29, 0x00001040, 0x00001049, - 0x00001090, 0x00001099, 0x000017e0, 0x000017e9, - 0x00001810, 0x00001819, 0x00001946, 0x0000194f, - 0x000019d0, 0x000019d9, 0x00001a80, 0x00001a89, - 0x00001a90, 0x00001a99, 0x00001b50, 0x00001b59, - 0x00001bb0, 0x00001bb9, 0x00001c40, 0x00001c49, - 0x00001c50, 0x00001c59, 0x0000a620, 0x0000a629, - 0x0000a8d0, 0x0000a8d9, 0x0000a900, 0x0000a909, - 0x0000a9d0, 0x0000a9d9, 0x0000a9f0, 0x0000a9f9, - 0x0000aa50, 0x0000aa59, 0x0000abf0, 0x0000abf9, - 0x0000ff10, 0x0000ff19, 0x000104a0, 0x000104a9, - 0x00010d30, 0x00010d39, 0x00011066, 0x0001106f, - 0x000110f0, 0x000110f9, 0x00011136, 0x0001113f, - 0x000111d0, 0x000111d9, 0x000112f0, 0x000112f9, - 0x00011450, 0x00011459, 0x000114d0, 0x000114d9, - 0x00011650, 0x00011659, 0x000116c0, 0x000116c9, - 0x00011730, 0x00011739, 0x000118e0, 0x000118e9, + 0x00016f51, 0x00016f87, 0x00016ff0, 0x00016ff1, + 0x0001d165, 0x0001d166, 0x0001d16d, 0x0001d172, + 0x00000488, 0x00000489, 0x00001abe, 0x00001abe, + 0x000020dd, 0x000020e0, 0x000020e2, 0x000020e4, + 0x0000a670, 0x0000a672, 0x00000030, 0x00000039, + 0x00000660, 0x00000669, 0x000006f0, 0x000006f9, + 0x000007c0, 0x000007c9, 0x00000966, 0x0000096f, + 0x000009e6, 0x000009ef, 0x00000a66, 0x00000a6f, + 0x00000ae6, 0x00000aef, 0x00000b66, 0x00000b6f, + 0x00000be6, 0x00000bef, 0x00000c66, 0x00000c6f, + 0x00000ce6, 0x00000cef, 0x00000d66, 0x00000d6f, + 0x00000de6, 0x00000def, 0x00000e50, 0x00000e59, + 0x00000ed0, 0x00000ed9, 0x00000f20, 0x00000f29, + 0x00001040, 0x00001049, 0x00001090, 0x00001099, + 0x000017e0, 0x000017e9, 0x00001810, 0x00001819, + 0x00001946, 0x0000194f, 0x000019d0, 0x000019d9, + 0x00001a80, 0x00001a89, 0x00001a90, 0x00001a99, + 0x00001b50, 0x00001b59, 0x00001bb0, 0x00001bb9, + 0x00001c40, 0x00001c49, 0x00001c50, 0x00001c59, + 0x0000a620, 0x0000a629, 0x0000a8d0, 0x0000a8d9, + 0x0000a900, 0x0000a909, 0x0000a9d0, 0x0000a9d9, + 0x0000a9f0, 0x0000a9f9, 0x0000aa50, 0x0000aa59, + 0x0000abf0, 0x0000abf9, 0x0000ff10, 0x0000ff19, + 0x000104a0, 0x000104a9, 0x00010d30, 0x00010d39, + 0x00011066, 0x0001106f, 0x000110f0, 0x000110f9, + 0x00011136, 0x0001113f, 0x000111d0, 0x000111d9, + 0x000112f0, 0x000112f9, 0x00011450, 0x00011459, + 0x000114d0, 0x000114d9, 0x00011650, 0x00011659, + 0x000116c0, 0x000116c9, 0x00011730, 0x00011739, + 0x000118e0, 0x000118e9, 0x00011950, 0x00011959, 0x00011c50, 0x00011c59, 0x00011d50, 0x00011d59, 0x00011da0, 0x00011da9, 0x00016a60, 0x00016a69, 0x00016b50, 0x00016b59, 0x0001d7ce, 0x0001d7ff, - 0x0001e950, 0x0001e959, 0x000016ee, 0x000016f0, - 0x00002160, 0x00002182, 0x00002185, 0x00002188, - 0x00003007, 0x00003007, 0x00003021, 0x00003029, - 0x00003038, 0x0000303a, 0x0000a6e6, 0x0000a6ef, - 0x00010140, 0x00010174, 0x00010341, 0x00010341, - 0x0001034a, 0x0001034a, 0x000103d1, 0x000103d5, - 0x00012400, 0x0001246e, 0x000000b2, 0x000000b3, - 0x000000b9, 0x000000b9, 0x000000bc, 0x000000be, - 0x000009f4, 0x000009f9, 0x00000b72, 0x00000b77, - 0x00000bf0, 0x00000bf2, 0x00000c78, 0x00000c7e, - 0x00000d58, 0x00000d5e, 0x00000d70, 0x00000d78, - 0x00000f2a, 0x00000f33, 0x00001369, 0x0000137c, - 0x000017f0, 0x000017f9, 0x000019da, 0x000019da, - 0x00002070, 0x00002070, 0x00002074, 0x00002079, - 0x00002080, 0x00002089, 0x00002150, 0x0000215f, - 0x00002189, 0x00002189, 0x00002460, 0x0000249b, - 0x000024ea, 0x000024ff, 0x00002776, 0x00002793, - 0x00002cfd, 0x00002cfd, 0x00003192, 0x00003195, - 0x00003220, 0x00003229, 0x00003248, 0x0000324f, - 0x00003251, 0x0000325f, 0x00003280, 0x00003289, - 0x000032b1, 0x000032bf, 0x0000a830, 0x0000a835, - 0x00010107, 0x00010133, 0x00010175, 0x00010178, - 0x0001018a, 0x0001018b, 0x000102e1, 0x000102fb, - 0x00010320, 0x00010323, 0x00010858, 0x0001085f, - 0x00010879, 0x0001087f, 0x000108a7, 0x000108af, - 0x000108fb, 0x000108ff, 0x00010916, 0x0001091b, - 0x000109bc, 0x000109bd, 0x000109c0, 0x000109cf, - 0x000109d2, 0x000109ff, 0x00010a40, 0x00010a48, - 0x00010a7d, 0x00010a7e, 0x00010a9d, 0x00010a9f, - 0x00010aeb, 0x00010aef, 0x00010b58, 0x00010b5f, - 0x00010b78, 0x00010b7f, 0x00010ba9, 0x00010baf, - 0x00010cfa, 0x00010cff, 0x00010e60, 0x00010e7e, - 0x00010f1d, 0x00010f26, 0x00010f51, 0x00010f54, + 0x0001e140, 0x0001e149, 0x0001e2f0, 0x0001e2f9, + 0x0001e950, 0x0001e959, 0x0001fbf0, 0x0001fbf9, + 0x000016ee, 0x000016f0, 0x00002160, 0x00002182, + 0x00002185, 0x00002188, 0x00003007, 0x00003007, + 0x00003021, 0x00003029, 0x00003038, 0x0000303a, + 0x0000a6e6, 0x0000a6ef, 0x00010140, 0x00010174, + 0x00010341, 0x00010341, 0x0001034a, 0x0001034a, + 0x000103d1, 0x000103d5, 0x00012400, 0x0001246e, + 0x000000b2, 0x000000b3, 0x000000b9, 0x000000b9, + 0x000000bc, 0x000000be, 0x000009f4, 0x000009f9, + 0x00000b72, 0x00000b77, 0x00000bf0, 0x00000bf2, + 0x00000c78, 0x00000c7e, 0x00000d58, 0x00000d5e, + 0x00000d70, 0x00000d78, 0x00000f2a, 0x00000f33, + 0x00001369, 0x0000137c, 0x000017f0, 0x000017f9, + 0x000019da, 0x000019da, 0x00002070, 0x00002070, + 0x00002074, 0x00002079, 0x00002080, 0x00002089, + 0x00002150, 0x0000215f, 0x00002189, 0x00002189, + 0x00002460, 0x0000249b, 0x000024ea, 0x000024ff, + 0x00002776, 0x00002793, 0x00002cfd, 0x00002cfd, + 0x00003192, 0x00003195, 0x00003220, 0x00003229, + 0x00003248, 0x0000324f, 0x00003251, 0x0000325f, + 0x00003280, 0x00003289, 0x000032b1, 0x000032bf, + 0x0000a830, 0x0000a835, 0x00010107, 0x00010133, + 0x00010175, 0x00010178, 0x0001018a, 0x0001018b, + 0x000102e1, 0x000102fb, 0x00010320, 0x00010323, + 0x00010858, 0x0001085f, 0x00010879, 0x0001087f, + 0x000108a7, 0x000108af, 0x000108fb, 0x000108ff, + 0x00010916, 0x0001091b, 0x000109bc, 0x000109bd, + 0x000109c0, 0x000109cf, 0x000109d2, 0x000109ff, + 0x00010a40, 0x00010a48, 0x00010a7d, 0x00010a7e, + 0x00010a9d, 0x00010a9f, 0x00010aeb, 0x00010aef, + 0x00010b58, 0x00010b5f, 0x00010b78, 0x00010b7f, + 0x00010ba9, 0x00010baf, 0x00010cfa, 0x00010cff, + 0x00010e60, 0x00010e7e, 0x00010f1d, 0x00010f26, + 0x00010f51, 0x00010f54, 0x00010fc5, 0x00010fcb, 0x00011052, 0x00011065, 0x000111e1, 0x000111f4, 0x0001173a, 0x0001173b, 0x000118ea, 0x000118f2, - 0x00011c5a, 0x00011c6c, 0x00016b5b, 0x00016b61, - 0x00016e80, 0x00016e96, 0x0001d2e0, 0x0001d2f3, - 0x0001d360, 0x0001d378, 0x0001e8c7, 0x0001e8cf, - 0x0001ec71, 0x0001ecab, 0x0001ecad, 0x0001ecaf, - 0x0001ecb1, 0x0001ecb4, 0x0001f100, 0x0001f10c, - 0x00000020, 0x00000020, 0x000000a0, 0x000000a0, - 0x00001680, 0x00001680, 0x00002000, 0x0000200a, - 0x0000202f, 0x0000202f, 0x0000205f, 0x0000205f, - 0x00003000, 0x00003000, 0x00002028, 0x00002028, - 0x00002029, 0x00002029, 0x00000000, 0x0000001f, - 0x0000007f, 0x0000009f, 0x000000ad, 0x000000ad, - 0x00000600, 0x00000605, 0x0000061c, 0x0000061c, - 0x000006dd, 0x000006dd, 0x0000070f, 0x0000070f, - 0x000008e2, 0x000008e2, 0x0000180e, 0x0000180e, - 0x0000200b, 0x0000200f, 0x0000202a, 0x0000202e, - 0x00002060, 0x00002064, 0x00002066, 0x0000206f, - 0x0000feff, 0x0000feff, 0x0000fff9, 0x0000fffb, - 0x000110bd, 0x000110bd, 0x000110cd, 0x000110cd, + 0x00011c5a, 0x00011c6c, 0x00011fc0, 0x00011fd4, + 0x00016b5b, 0x00016b61, 0x00016e80, 0x00016e96, + 0x0001d2e0, 0x0001d2f3, 0x0001d360, 0x0001d378, + 0x0001e8c7, 0x0001e8cf, 0x0001ec71, 0x0001ecab, + 0x0001ecad, 0x0001ecaf, 0x0001ecb1, 0x0001ecb4, + 0x0001ed01, 0x0001ed2d, 0x0001ed2f, 0x0001ed3d, + 0x0001f100, 0x0001f10c, 0x00000020, 0x00000020, + 0x000000a0, 0x000000a0, 0x00001680, 0x00001680, + 0x00002000, 0x0000200a, 0x0000202f, 0x0000202f, + 0x0000205f, 0x0000205f, 0x00003000, 0x00003000, + 0x00002028, 0x00002028, 0x00002029, 0x00002029, + 0x00000000, 0x0000001f, 0x0000007f, 0x0000009f, + 0x000000ad, 0x000000ad, 0x00000600, 0x00000605, + 0x0000061c, 0x0000061c, 0x000006dd, 0x000006dd, + 0x0000070f, 0x0000070f, 0x000008e2, 0x000008e2, + 0x0000180e, 0x0000180e, 0x0000200b, 0x0000200f, + 0x0000202a, 0x0000202e, 0x00002060, 0x00002064, + 0x00002066, 0x0000206f, 0x0000feff, 0x0000feff, + 0x0000fff9, 0x0000fffb, 0x000110bd, 0x000110bd, + 0x000110cd, 0x000110cd, 0x00013430, 0x00013438, 0x0001bca0, 0x0001bca3, 0x0001d173, 0x0001d17a, 0x000e0001, 0x000e0001, 0x000e0020, 0x000e007f, 0x0000d800, 0x0000dfff, 0x0000e000, 0x0000f8ff, @@ -645,326 +661,333 @@ static const unsigned int _ucprop_ranges[] = { 0x0000a7a4, 0x0000a7a4, 0x0000a7a6, 0x0000a7a6, 0x0000a7a8, 0x0000a7a8, 0x0000a7aa, 0x0000a7ae, 0x0000a7b0, 0x0000a7b4, 0x0000a7b6, 0x0000a7b6, - 0x0000a7b8, 0x0000a7b8, 0x0000ff21, 0x0000ff3a, - 0x00010400, 0x00010427, 0x000104b0, 0x000104d3, - 0x00010c80, 0x00010cb2, 0x000118a0, 0x000118bf, - 0x00016e40, 0x00016e5f, 0x0001d400, 0x0001d419, - 0x0001d434, 0x0001d44d, 0x0001d468, 0x0001d481, - 0x0001d49c, 0x0001d49c, 0x0001d49e, 0x0001d49f, - 0x0001d4a2, 0x0001d4a2, 0x0001d4a5, 0x0001d4a6, - 0x0001d4a9, 0x0001d4ac, 0x0001d4ae, 0x0001d4b5, - 0x0001d4d0, 0x0001d4e9, 0x0001d504, 0x0001d505, - 0x0001d507, 0x0001d50a, 0x0001d50d, 0x0001d514, - 0x0001d516, 0x0001d51c, 0x0001d538, 0x0001d539, - 0x0001d53b, 0x0001d53e, 0x0001d540, 0x0001d544, - 0x0001d546, 0x0001d546, 0x0001d54a, 0x0001d550, - 0x0001d56c, 0x0001d585, 0x0001d5a0, 0x0001d5b9, - 0x0001d5d4, 0x0001d5ed, 0x0001d608, 0x0001d621, - 0x0001d63c, 0x0001d655, 0x0001d670, 0x0001d689, - 0x0001d6a8, 0x0001d6c0, 0x0001d6e2, 0x0001d6fa, - 0x0001d71c, 0x0001d734, 0x0001d756, 0x0001d76e, - 0x0001d790, 0x0001d7a8, 0x0001d7ca, 0x0001d7ca, - 0x0001e900, 0x0001e921, 0x00000061, 0x0000007a, - 0x000000b5, 0x000000b5, 0x000000df, 0x000000f6, - 0x000000f8, 0x000000ff, 0x00000101, 0x00000101, - 0x00000103, 0x00000103, 0x00000105, 0x00000105, - 0x00000107, 0x00000107, 0x00000109, 0x00000109, - 0x0000010b, 0x0000010b, 0x0000010d, 0x0000010d, - 0x0000010f, 0x0000010f, 0x00000111, 0x00000111, - 0x00000113, 0x00000113, 0x00000115, 0x00000115, - 0x00000117, 0x00000117, 0x00000119, 0x00000119, - 0x0000011b, 0x0000011b, 0x0000011d, 0x0000011d, - 0x0000011f, 0x0000011f, 0x00000121, 0x00000121, - 0x00000123, 0x00000123, 0x00000125, 0x00000125, - 0x00000127, 0x00000127, 0x00000129, 0x00000129, - 0x0000012b, 0x0000012b, 0x0000012d, 0x0000012d, - 0x0000012f, 0x0000012f, 0x00000131, 0x00000131, - 0x00000133, 0x00000133, 0x00000135, 0x00000135, - 0x00000137, 0x00000138, 0x0000013a, 0x0000013a, - 0x0000013c, 0x0000013c, 0x0000013e, 0x0000013e, - 0x00000140, 0x00000140, 0x00000142, 0x00000142, - 0x00000144, 0x00000144, 0x00000146, 0x00000146, - 0x00000148, 0x00000149, 0x0000014b, 0x0000014b, - 0x0000014d, 0x0000014d, 0x0000014f, 0x0000014f, - 0x00000151, 0x00000151, 0x00000153, 0x00000153, - 0x00000155, 0x00000155, 0x00000157, 0x00000157, - 0x00000159, 0x00000159, 0x0000015b, 0x0000015b, - 0x0000015d, 0x0000015d, 0x0000015f, 0x0000015f, - 0x00000161, 0x00000161, 0x00000163, 0x00000163, - 0x00000165, 0x00000165, 0x00000167, 0x00000167, - 0x00000169, 0x00000169, 0x0000016b, 0x0000016b, - 0x0000016d, 0x0000016d, 0x0000016f, 0x0000016f, - 0x00000171, 0x00000171, 0x00000173, 0x00000173, - 0x00000175, 0x00000175, 0x00000177, 0x00000177, - 0x0000017a, 0x0000017a, 0x0000017c, 0x0000017c, - 0x0000017e, 0x00000180, 0x00000183, 0x00000183, - 0x00000185, 0x00000185, 0x00000188, 0x00000188, - 0x0000018c, 0x0000018d, 0x00000192, 0x00000192, - 0x00000195, 0x00000195, 0x00000199, 0x0000019b, - 0x0000019e, 0x0000019e, 0x000001a1, 0x000001a1, - 0x000001a3, 0x000001a3, 0x000001a5, 0x000001a5, - 0x000001a8, 0x000001a8, 0x000001aa, 0x000001ab, - 0x000001ad, 0x000001ad, 0x000001b0, 0x000001b0, - 0x000001b4, 0x000001b4, 0x000001b6, 0x000001b6, - 0x000001b9, 0x000001ba, 0x000001bd, 0x000001bf, - 0x000001c6, 0x000001c6, 0x000001c9, 0x000001c9, - 0x000001cc, 0x000001cc, 0x000001ce, 0x000001ce, - 0x000001d0, 0x000001d0, 0x000001d2, 0x000001d2, - 0x000001d4, 0x000001d4, 0x000001d6, 0x000001d6, - 0x000001d8, 0x000001d8, 0x000001da, 0x000001da, - 0x000001dc, 0x000001dd, 0x000001df, 0x000001df, - 0x000001e1, 0x000001e1, 0x000001e3, 0x000001e3, - 0x000001e5, 0x000001e5, 0x000001e7, 0x000001e7, - 0x000001e9, 0x000001e9, 0x000001eb, 0x000001eb, - 0x000001ed, 0x000001ed, 0x000001ef, 0x000001f0, - 0x000001f3, 0x000001f3, 0x000001f5, 0x000001f5, - 0x000001f9, 0x000001f9, 0x000001fb, 0x000001fb, - 0x000001fd, 0x000001fd, 0x000001ff, 0x000001ff, - 0x00000201, 0x00000201, 0x00000203, 0x00000203, - 0x00000205, 0x00000205, 0x00000207, 0x00000207, - 0x00000209, 0x00000209, 0x0000020b, 0x0000020b, - 0x0000020d, 0x0000020d, 0x0000020f, 0x0000020f, - 0x00000211, 0x00000211, 0x00000213, 0x00000213, - 0x00000215, 0x00000215, 0x00000217, 0x00000217, - 0x00000219, 0x00000219, 0x0000021b, 0x0000021b, - 0x0000021d, 0x0000021d, 0x0000021f, 0x0000021f, - 0x00000221, 0x00000221, 0x00000223, 0x00000223, - 0x00000225, 0x00000225, 0x00000227, 0x00000227, - 0x00000229, 0x00000229, 0x0000022b, 0x0000022b, - 0x0000022d, 0x0000022d, 0x0000022f, 0x0000022f, - 0x00000231, 0x00000231, 0x00000233, 0x00000239, - 0x0000023c, 0x0000023c, 0x0000023f, 0x00000240, - 0x00000242, 0x00000242, 0x00000247, 0x00000247, - 0x00000249, 0x00000249, 0x0000024b, 0x0000024b, - 0x0000024d, 0x0000024d, 0x0000024f, 0x00000293, - 0x00000295, 0x000002af, 0x00000371, 0x00000371, - 0x00000373, 0x00000373, 0x00000377, 0x00000377, - 0x0000037b, 0x0000037d, 0x00000390, 0x00000390, - 0x000003ac, 0x000003ce, 0x000003d0, 0x000003d1, - 0x000003d5, 0x000003d7, 0x000003d9, 0x000003d9, - 0x000003db, 0x000003db, 0x000003dd, 0x000003dd, - 0x000003df, 0x000003df, 0x000003e1, 0x000003e1, - 0x000003e3, 0x000003e3, 0x000003e5, 0x000003e5, - 0x000003e7, 0x000003e7, 0x000003e9, 0x000003e9, - 0x000003eb, 0x000003eb, 0x000003ed, 0x000003ed, - 0x000003ef, 0x000003f3, 0x000003f5, 0x000003f5, - 0x000003f8, 0x000003f8, 0x000003fb, 0x000003fc, - 0x00000430, 0x0000045f, 0x00000461, 0x00000461, - 0x00000463, 0x00000463, 0x00000465, 0x00000465, - 0x00000467, 0x00000467, 0x00000469, 0x00000469, - 0x0000046b, 0x0000046b, 0x0000046d, 0x0000046d, - 0x0000046f, 0x0000046f, 0x00000471, 0x00000471, - 0x00000473, 0x00000473, 0x00000475, 0x00000475, - 0x00000477, 0x00000477, 0x00000479, 0x00000479, - 0x0000047b, 0x0000047b, 0x0000047d, 0x0000047d, - 0x0000047f, 0x0000047f, 0x00000481, 0x00000481, - 0x0000048b, 0x0000048b, 0x0000048d, 0x0000048d, - 0x0000048f, 0x0000048f, 0x00000491, 0x00000491, - 0x00000493, 0x00000493, 0x00000495, 0x00000495, - 0x00000497, 0x00000497, 0x00000499, 0x00000499, - 0x0000049b, 0x0000049b, 0x0000049d, 0x0000049d, - 0x0000049f, 0x0000049f, 0x000004a1, 0x000004a1, - 0x000004a3, 0x000004a3, 0x000004a5, 0x000004a5, - 0x000004a7, 0x000004a7, 0x000004a9, 0x000004a9, - 0x000004ab, 0x000004ab, 0x000004ad, 0x000004ad, - 0x000004af, 0x000004af, 0x000004b1, 0x000004b1, - 0x000004b3, 0x000004b3, 0x000004b5, 0x000004b5, - 0x000004b7, 0x000004b7, 0x000004b9, 0x000004b9, - 0x000004bb, 0x000004bb, 0x000004bd, 0x000004bd, - 0x000004bf, 0x000004bf, 0x000004c2, 0x000004c2, - 0x000004c4, 0x000004c4, 0x000004c6, 0x000004c6, - 0x000004c8, 0x000004c8, 0x000004ca, 0x000004ca, - 0x000004cc, 0x000004cc, 0x000004ce, 0x000004cf, - 0x000004d1, 0x000004d1, 0x000004d3, 0x000004d3, - 0x000004d5, 0x000004d5, 0x000004d7, 0x000004d7, - 0x000004d9, 0x000004d9, 0x000004db, 0x000004db, - 0x000004dd, 0x000004dd, 0x000004df, 0x000004df, - 0x000004e1, 0x000004e1, 0x000004e3, 0x000004e3, - 0x000004e5, 0x000004e5, 0x000004e7, 0x000004e7, - 0x000004e9, 0x000004e9, 0x000004eb, 0x000004eb, - 0x000004ed, 0x000004ed, 0x000004ef, 0x000004ef, - 0x000004f1, 0x000004f1, 0x000004f3, 0x000004f3, - 0x000004f5, 0x000004f5, 0x000004f7, 0x000004f7, - 0x000004f9, 0x000004f9, 0x000004fb, 0x000004fb, - 0x000004fd, 0x000004fd, 0x000004ff, 0x000004ff, - 0x00000501, 0x00000501, 0x00000503, 0x00000503, - 0x00000505, 0x00000505, 0x00000507, 0x00000507, - 0x00000509, 0x00000509, 0x0000050b, 0x0000050b, - 0x0000050d, 0x0000050d, 0x0000050f, 0x0000050f, - 0x00000511, 0x00000511, 0x00000513, 0x00000513, - 0x00000515, 0x00000515, 0x00000517, 0x00000517, - 0x00000519, 0x00000519, 0x0000051b, 0x0000051b, - 0x0000051d, 0x0000051d, 0x0000051f, 0x0000051f, - 0x00000521, 0x00000521, 0x00000523, 0x00000523, - 0x00000525, 0x00000525, 0x00000527, 0x00000527, - 0x00000529, 0x00000529, 0x0000052b, 0x0000052b, - 0x0000052d, 0x0000052d, 0x0000052f, 0x0000052f, - 0x00000560, 0x00000588, 0x000010d0, 0x000010fa, - 0x000010fd, 0x000010ff, 0x000013f8, 0x000013fd, - 0x00001c80, 0x00001c88, 0x00001d00, 0x00001d2b, - 0x00001d6b, 0x00001d77, 0x00001d79, 0x00001d9a, - 0x00001e01, 0x00001e01, 0x00001e03, 0x00001e03, - 0x00001e05, 0x00001e05, 0x00001e07, 0x00001e07, - 0x00001e09, 0x00001e09, 0x00001e0b, 0x00001e0b, - 0x00001e0d, 0x00001e0d, 0x00001e0f, 0x00001e0f, - 0x00001e11, 0x00001e11, 0x00001e13, 0x00001e13, - 0x00001e15, 0x00001e15, 0x00001e17, 0x00001e17, - 0x00001e19, 0x00001e19, 0x00001e1b, 0x00001e1b, - 0x00001e1d, 0x00001e1d, 0x00001e1f, 0x00001e1f, - 0x00001e21, 0x00001e21, 0x00001e23, 0x00001e23, - 0x00001e25, 0x00001e25, 0x00001e27, 0x00001e27, - 0x00001e29, 0x00001e29, 0x00001e2b, 0x00001e2b, - 0x00001e2d, 0x00001e2d, 0x00001e2f, 0x00001e2f, - 0x00001e31, 0x00001e31, 0x00001e33, 0x00001e33, - 0x00001e35, 0x00001e35, 0x00001e37, 0x00001e37, - 0x00001e39, 0x00001e39, 0x00001e3b, 0x00001e3b, - 0x00001e3d, 0x00001e3d, 0x00001e3f, 0x00001e3f, - 0x00001e41, 0x00001e41, 0x00001e43, 0x00001e43, - 0x00001e45, 0x00001e45, 0x00001e47, 0x00001e47, - 0x00001e49, 0x00001e49, 0x00001e4b, 0x00001e4b, - 0x00001e4d, 0x00001e4d, 0x00001e4f, 0x00001e4f, - 0x00001e51, 0x00001e51, 0x00001e53, 0x00001e53, - 0x00001e55, 0x00001e55, 0x00001e57, 0x00001e57, - 0x00001e59, 0x00001e59, 0x00001e5b, 0x00001e5b, - 0x00001e5d, 0x00001e5d, 0x00001e5f, 0x00001e5f, - 0x00001e61, 0x00001e61, 0x00001e63, 0x00001e63, - 0x00001e65, 0x00001e65, 0x00001e67, 0x00001e67, - 0x00001e69, 0x00001e69, 0x00001e6b, 0x00001e6b, - 0x00001e6d, 0x00001e6d, 0x00001e6f, 0x00001e6f, - 0x00001e71, 0x00001e71, 0x00001e73, 0x00001e73, - 0x00001e75, 0x00001e75, 0x00001e77, 0x00001e77, - 0x00001e79, 0x00001e79, 0x00001e7b, 0x00001e7b, - 0x00001e7d, 0x00001e7d, 0x00001e7f, 0x00001e7f, - 0x00001e81, 0x00001e81, 0x00001e83, 0x00001e83, - 0x00001e85, 0x00001e85, 0x00001e87, 0x00001e87, - 0x00001e89, 0x00001e89, 0x00001e8b, 0x00001e8b, - 0x00001e8d, 0x00001e8d, 0x00001e8f, 0x00001e8f, - 0x00001e91, 0x00001e91, 0x00001e93, 0x00001e93, - 0x00001e95, 0x00001e9d, 0x00001e9f, 0x00001e9f, - 0x00001ea1, 0x00001ea1, 0x00001ea3, 0x00001ea3, - 0x00001ea5, 0x00001ea5, 0x00001ea7, 0x00001ea7, - 0x00001ea9, 0x00001ea9, 0x00001eab, 0x00001eab, - 0x00001ead, 0x00001ead, 0x00001eaf, 0x00001eaf, - 0x00001eb1, 0x00001eb1, 0x00001eb3, 0x00001eb3, - 0x00001eb5, 0x00001eb5, 0x00001eb7, 0x00001eb7, - 0x00001eb9, 0x00001eb9, 0x00001ebb, 0x00001ebb, - 0x00001ebd, 0x00001ebd, 0x00001ebf, 0x00001ebf, - 0x00001ec1, 0x00001ec1, 0x00001ec3, 0x00001ec3, - 0x00001ec5, 0x00001ec5, 0x00001ec7, 0x00001ec7, - 0x00001ec9, 0x00001ec9, 0x00001ecb, 0x00001ecb, - 0x00001ecd, 0x00001ecd, 0x00001ecf, 0x00001ecf, - 0x00001ed1, 0x00001ed1, 0x00001ed3, 0x00001ed3, - 0x00001ed5, 0x00001ed5, 0x00001ed7, 0x00001ed7, - 0x00001ed9, 0x00001ed9, 0x00001edb, 0x00001edb, - 0x00001edd, 0x00001edd, 0x00001edf, 0x00001edf, - 0x00001ee1, 0x00001ee1, 0x00001ee3, 0x00001ee3, - 0x00001ee5, 0x00001ee5, 0x00001ee7, 0x00001ee7, - 0x00001ee9, 0x00001ee9, 0x00001eeb, 0x00001eeb, - 0x00001eed, 0x00001eed, 0x00001eef, 0x00001eef, - 0x00001ef1, 0x00001ef1, 0x00001ef3, 0x00001ef3, - 0x00001ef5, 0x00001ef5, 0x00001ef7, 0x00001ef7, - 0x00001ef9, 0x00001ef9, 0x00001efb, 0x00001efb, - 0x00001efd, 0x00001efd, 0x00001eff, 0x00001f07, - 0x00001f10, 0x00001f15, 0x00001f20, 0x00001f27, - 0x00001f30, 0x00001f37, 0x00001f40, 0x00001f45, - 0x00001f50, 0x00001f57, 0x00001f60, 0x00001f67, - 0x00001f70, 0x00001f7d, 0x00001f80, 0x00001f87, - 0x00001f90, 0x00001f97, 0x00001fa0, 0x00001fa7, - 0x00001fb0, 0x00001fb4, 0x00001fb6, 0x00001fb7, - 0x00001fbe, 0x00001fbe, 0x00001fc2, 0x00001fc4, - 0x00001fc6, 0x00001fc7, 0x00001fd0, 0x00001fd3, - 0x00001fd6, 0x00001fd7, 0x00001fe0, 0x00001fe7, - 0x00001ff2, 0x00001ff4, 0x00001ff6, 0x00001ff7, - 0x0000210a, 0x0000210a, 0x0000210e, 0x0000210f, - 0x00002113, 0x00002113, 0x0000212f, 0x0000212f, - 0x00002134, 0x00002134, 0x00002139, 0x00002139, - 0x0000213c, 0x0000213d, 0x00002146, 0x00002149, - 0x0000214e, 0x0000214e, 0x00002184, 0x00002184, - 0x00002c30, 0x00002c5e, 0x00002c61, 0x00002c61, - 0x00002c65, 0x00002c66, 0x00002c68, 0x00002c68, - 0x00002c6a, 0x00002c6a, 0x00002c6c, 0x00002c6c, - 0x00002c71, 0x00002c71, 0x00002c73, 0x00002c74, - 0x00002c76, 0x00002c7b, 0x00002c81, 0x00002c81, - 0x00002c83, 0x00002c83, 0x00002c85, 0x00002c85, - 0x00002c87, 0x00002c87, 0x00002c89, 0x00002c89, - 0x00002c8b, 0x00002c8b, 0x00002c8d, 0x00002c8d, - 0x00002c8f, 0x00002c8f, 0x00002c91, 0x00002c91, - 0x00002c93, 0x00002c93, 0x00002c95, 0x00002c95, - 0x00002c97, 0x00002c97, 0x00002c99, 0x00002c99, - 0x00002c9b, 0x00002c9b, 0x00002c9d, 0x00002c9d, - 0x00002c9f, 0x00002c9f, 0x00002ca1, 0x00002ca1, - 0x00002ca3, 0x00002ca3, 0x00002ca5, 0x00002ca5, - 0x00002ca7, 0x00002ca7, 0x00002ca9, 0x00002ca9, - 0x00002cab, 0x00002cab, 0x00002cad, 0x00002cad, - 0x00002caf, 0x00002caf, 0x00002cb1, 0x00002cb1, - 0x00002cb3, 0x00002cb3, 0x00002cb5, 0x00002cb5, - 0x00002cb7, 0x00002cb7, 0x00002cb9, 0x00002cb9, - 0x00002cbb, 0x00002cbb, 0x00002cbd, 0x00002cbd, - 0x00002cbf, 0x00002cbf, 0x00002cc1, 0x00002cc1, - 0x00002cc3, 0x00002cc3, 0x00002cc5, 0x00002cc5, - 0x00002cc7, 0x00002cc7, 0x00002cc9, 0x00002cc9, - 0x00002ccb, 0x00002ccb, 0x00002ccd, 0x00002ccd, - 0x00002ccf, 0x00002ccf, 0x00002cd1, 0x00002cd1, - 0x00002cd3, 0x00002cd3, 0x00002cd5, 0x00002cd5, - 0x00002cd7, 0x00002cd7, 0x00002cd9, 0x00002cd9, - 0x00002cdb, 0x00002cdb, 0x00002cdd, 0x00002cdd, - 0x00002cdf, 0x00002cdf, 0x00002ce1, 0x00002ce1, - 0x00002ce3, 0x00002ce4, 0x00002cec, 0x00002cec, - 0x00002cee, 0x00002cee, 0x00002cf3, 0x00002cf3, - 0x00002d00, 0x00002d25, 0x00002d27, 0x00002d27, - 0x00002d2d, 0x00002d2d, 0x0000a641, 0x0000a641, - 0x0000a643, 0x0000a643, 0x0000a645, 0x0000a645, - 0x0000a647, 0x0000a647, 0x0000a649, 0x0000a649, - 0x0000a64b, 0x0000a64b, 0x0000a64d, 0x0000a64d, - 0x0000a64f, 0x0000a64f, 0x0000a651, 0x0000a651, - 0x0000a653, 0x0000a653, 0x0000a655, 0x0000a655, - 0x0000a657, 0x0000a657, 0x0000a659, 0x0000a659, - 0x0000a65b, 0x0000a65b, 0x0000a65d, 0x0000a65d, - 0x0000a65f, 0x0000a65f, 0x0000a661, 0x0000a661, - 0x0000a663, 0x0000a663, 0x0000a665, 0x0000a665, - 0x0000a667, 0x0000a667, 0x0000a669, 0x0000a669, - 0x0000a66b, 0x0000a66b, 0x0000a66d, 0x0000a66d, - 0x0000a681, 0x0000a681, 0x0000a683, 0x0000a683, - 0x0000a685, 0x0000a685, 0x0000a687, 0x0000a687, - 0x0000a689, 0x0000a689, 0x0000a68b, 0x0000a68b, - 0x0000a68d, 0x0000a68d, 0x0000a68f, 0x0000a68f, - 0x0000a691, 0x0000a691, 0x0000a693, 0x0000a693, - 0x0000a695, 0x0000a695, 0x0000a697, 0x0000a697, - 0x0000a699, 0x0000a699, 0x0000a69b, 0x0000a69b, - 0x0000a723, 0x0000a723, 0x0000a725, 0x0000a725, - 0x0000a727, 0x0000a727, 0x0000a729, 0x0000a729, - 0x0000a72b, 0x0000a72b, 0x0000a72d, 0x0000a72d, - 0x0000a72f, 0x0000a731, 0x0000a733, 0x0000a733, - 0x0000a735, 0x0000a735, 0x0000a737, 0x0000a737, - 0x0000a739, 0x0000a739, 0x0000a73b, 0x0000a73b, - 0x0000a73d, 0x0000a73d, 0x0000a73f, 0x0000a73f, - 0x0000a741, 0x0000a741, 0x0000a743, 0x0000a743, - 0x0000a745, 0x0000a745, 0x0000a747, 0x0000a747, - 0x0000a749, 0x0000a749, 0x0000a74b, 0x0000a74b, - 0x0000a74d, 0x0000a74d, 0x0000a74f, 0x0000a74f, - 0x0000a751, 0x0000a751, 0x0000a753, 0x0000a753, - 0x0000a755, 0x0000a755, 0x0000a757, 0x0000a757, - 0x0000a759, 0x0000a759, 0x0000a75b, 0x0000a75b, - 0x0000a75d, 0x0000a75d, 0x0000a75f, 0x0000a75f, - 0x0000a761, 0x0000a761, 0x0000a763, 0x0000a763, - 0x0000a765, 0x0000a765, 0x0000a767, 0x0000a767, - 0x0000a769, 0x0000a769, 0x0000a76b, 0x0000a76b, - 0x0000a76d, 0x0000a76d, 0x0000a76f, 0x0000a76f, - 0x0000a771, 0x0000a778, 0x0000a77a, 0x0000a77a, - 0x0000a77c, 0x0000a77c, 0x0000a77f, 0x0000a77f, - 0x0000a781, 0x0000a781, 0x0000a783, 0x0000a783, - 0x0000a785, 0x0000a785, 0x0000a787, 0x0000a787, - 0x0000a78c, 0x0000a78c, 0x0000a78e, 0x0000a78e, - 0x0000a791, 0x0000a791, 0x0000a793, 0x0000a795, - 0x0000a797, 0x0000a797, 0x0000a799, 0x0000a799, - 0x0000a79b, 0x0000a79b, 0x0000a79d, 0x0000a79d, - 0x0000a79f, 0x0000a79f, 0x0000a7a1, 0x0000a7a1, - 0x0000a7a3, 0x0000a7a3, 0x0000a7a5, 0x0000a7a5, - 0x0000a7a7, 0x0000a7a7, 0x0000a7a9, 0x0000a7a9, - 0x0000a7af, 0x0000a7af, 0x0000a7b5, 0x0000a7b5, - 0x0000a7b7, 0x0000a7b7, 0x0000a7b9, 0x0000a7b9, + 0x0000a7b8, 0x0000a7b8, 0x0000a7ba, 0x0000a7ba, + 0x0000a7bc, 0x0000a7bc, 0x0000a7be, 0x0000a7be, + 0x0000a7c2, 0x0000a7c2, 0x0000a7c4, 0x0000a7c7, + 0x0000a7c9, 0x0000a7c9, 0x0000a7f5, 0x0000a7f5, + 0x0000ff21, 0x0000ff3a, 0x00010400, 0x00010427, + 0x000104b0, 0x000104d3, 0x00010c80, 0x00010cb2, + 0x000118a0, 0x000118bf, 0x00016e40, 0x00016e5f, + 0x0001d400, 0x0001d419, 0x0001d434, 0x0001d44d, + 0x0001d468, 0x0001d481, 0x0001d49c, 0x0001d49c, + 0x0001d49e, 0x0001d49f, 0x0001d4a2, 0x0001d4a2, + 0x0001d4a5, 0x0001d4a6, 0x0001d4a9, 0x0001d4ac, + 0x0001d4ae, 0x0001d4b5, 0x0001d4d0, 0x0001d4e9, + 0x0001d504, 0x0001d505, 0x0001d507, 0x0001d50a, + 0x0001d50d, 0x0001d514, 0x0001d516, 0x0001d51c, + 0x0001d538, 0x0001d539, 0x0001d53b, 0x0001d53e, + 0x0001d540, 0x0001d544, 0x0001d546, 0x0001d546, + 0x0001d54a, 0x0001d550, 0x0001d56c, 0x0001d585, + 0x0001d5a0, 0x0001d5b9, 0x0001d5d4, 0x0001d5ed, + 0x0001d608, 0x0001d621, 0x0001d63c, 0x0001d655, + 0x0001d670, 0x0001d689, 0x0001d6a8, 0x0001d6c0, + 0x0001d6e2, 0x0001d6fa, 0x0001d71c, 0x0001d734, + 0x0001d756, 0x0001d76e, 0x0001d790, 0x0001d7a8, + 0x0001d7ca, 0x0001d7ca, 0x0001e900, 0x0001e921, + 0x00000061, 0x0000007a, 0x000000b5, 0x000000b5, + 0x000000df, 0x000000f6, 0x000000f8, 0x000000ff, + 0x00000101, 0x00000101, 0x00000103, 0x00000103, + 0x00000105, 0x00000105, 0x00000107, 0x00000107, + 0x00000109, 0x00000109, 0x0000010b, 0x0000010b, + 0x0000010d, 0x0000010d, 0x0000010f, 0x0000010f, + 0x00000111, 0x00000111, 0x00000113, 0x00000113, + 0x00000115, 0x00000115, 0x00000117, 0x00000117, + 0x00000119, 0x00000119, 0x0000011b, 0x0000011b, + 0x0000011d, 0x0000011d, 0x0000011f, 0x0000011f, + 0x00000121, 0x00000121, 0x00000123, 0x00000123, + 0x00000125, 0x00000125, 0x00000127, 0x00000127, + 0x00000129, 0x00000129, 0x0000012b, 0x0000012b, + 0x0000012d, 0x0000012d, 0x0000012f, 0x0000012f, + 0x00000131, 0x00000131, 0x00000133, 0x00000133, + 0x00000135, 0x00000135, 0x00000137, 0x00000138, + 0x0000013a, 0x0000013a, 0x0000013c, 0x0000013c, + 0x0000013e, 0x0000013e, 0x00000140, 0x00000140, + 0x00000142, 0x00000142, 0x00000144, 0x00000144, + 0x00000146, 0x00000146, 0x00000148, 0x00000149, + 0x0000014b, 0x0000014b, 0x0000014d, 0x0000014d, + 0x0000014f, 0x0000014f, 0x00000151, 0x00000151, + 0x00000153, 0x00000153, 0x00000155, 0x00000155, + 0x00000157, 0x00000157, 0x00000159, 0x00000159, + 0x0000015b, 0x0000015b, 0x0000015d, 0x0000015d, + 0x0000015f, 0x0000015f, 0x00000161, 0x00000161, + 0x00000163, 0x00000163, 0x00000165, 0x00000165, + 0x00000167, 0x00000167, 0x00000169, 0x00000169, + 0x0000016b, 0x0000016b, 0x0000016d, 0x0000016d, + 0x0000016f, 0x0000016f, 0x00000171, 0x00000171, + 0x00000173, 0x00000173, 0x00000175, 0x00000175, + 0x00000177, 0x00000177, 0x0000017a, 0x0000017a, + 0x0000017c, 0x0000017c, 0x0000017e, 0x00000180, + 0x00000183, 0x00000183, 0x00000185, 0x00000185, + 0x00000188, 0x00000188, 0x0000018c, 0x0000018d, + 0x00000192, 0x00000192, 0x00000195, 0x00000195, + 0x00000199, 0x0000019b, 0x0000019e, 0x0000019e, + 0x000001a1, 0x000001a1, 0x000001a3, 0x000001a3, + 0x000001a5, 0x000001a5, 0x000001a8, 0x000001a8, + 0x000001aa, 0x000001ab, 0x000001ad, 0x000001ad, + 0x000001b0, 0x000001b0, 0x000001b4, 0x000001b4, + 0x000001b6, 0x000001b6, 0x000001b9, 0x000001ba, + 0x000001bd, 0x000001bf, 0x000001c6, 0x000001c6, + 0x000001c9, 0x000001c9, 0x000001cc, 0x000001cc, + 0x000001ce, 0x000001ce, 0x000001d0, 0x000001d0, + 0x000001d2, 0x000001d2, 0x000001d4, 0x000001d4, + 0x000001d6, 0x000001d6, 0x000001d8, 0x000001d8, + 0x000001da, 0x000001da, 0x000001dc, 0x000001dd, + 0x000001df, 0x000001df, 0x000001e1, 0x000001e1, + 0x000001e3, 0x000001e3, 0x000001e5, 0x000001e5, + 0x000001e7, 0x000001e7, 0x000001e9, 0x000001e9, + 0x000001eb, 0x000001eb, 0x000001ed, 0x000001ed, + 0x000001ef, 0x000001f0, 0x000001f3, 0x000001f3, + 0x000001f5, 0x000001f5, 0x000001f9, 0x000001f9, + 0x000001fb, 0x000001fb, 0x000001fd, 0x000001fd, + 0x000001ff, 0x000001ff, 0x00000201, 0x00000201, + 0x00000203, 0x00000203, 0x00000205, 0x00000205, + 0x00000207, 0x00000207, 0x00000209, 0x00000209, + 0x0000020b, 0x0000020b, 0x0000020d, 0x0000020d, + 0x0000020f, 0x0000020f, 0x00000211, 0x00000211, + 0x00000213, 0x00000213, 0x00000215, 0x00000215, + 0x00000217, 0x00000217, 0x00000219, 0x00000219, + 0x0000021b, 0x0000021b, 0x0000021d, 0x0000021d, + 0x0000021f, 0x0000021f, 0x00000221, 0x00000221, + 0x00000223, 0x00000223, 0x00000225, 0x00000225, + 0x00000227, 0x00000227, 0x00000229, 0x00000229, + 0x0000022b, 0x0000022b, 0x0000022d, 0x0000022d, + 0x0000022f, 0x0000022f, 0x00000231, 0x00000231, + 0x00000233, 0x00000239, 0x0000023c, 0x0000023c, + 0x0000023f, 0x00000240, 0x00000242, 0x00000242, + 0x00000247, 0x00000247, 0x00000249, 0x00000249, + 0x0000024b, 0x0000024b, 0x0000024d, 0x0000024d, + 0x0000024f, 0x00000293, 0x00000295, 0x000002af, + 0x00000371, 0x00000371, 0x00000373, 0x00000373, + 0x00000377, 0x00000377, 0x0000037b, 0x0000037d, + 0x00000390, 0x00000390, 0x000003ac, 0x000003ce, + 0x000003d0, 0x000003d1, 0x000003d5, 0x000003d7, + 0x000003d9, 0x000003d9, 0x000003db, 0x000003db, + 0x000003dd, 0x000003dd, 0x000003df, 0x000003df, + 0x000003e1, 0x000003e1, 0x000003e3, 0x000003e3, + 0x000003e5, 0x000003e5, 0x000003e7, 0x000003e7, + 0x000003e9, 0x000003e9, 0x000003eb, 0x000003eb, + 0x000003ed, 0x000003ed, 0x000003ef, 0x000003f3, + 0x000003f5, 0x000003f5, 0x000003f8, 0x000003f8, + 0x000003fb, 0x000003fc, 0x00000430, 0x0000045f, + 0x00000461, 0x00000461, 0x00000463, 0x00000463, + 0x00000465, 0x00000465, 0x00000467, 0x00000467, + 0x00000469, 0x00000469, 0x0000046b, 0x0000046b, + 0x0000046d, 0x0000046d, 0x0000046f, 0x0000046f, + 0x00000471, 0x00000471, 0x00000473, 0x00000473, + 0x00000475, 0x00000475, 0x00000477, 0x00000477, + 0x00000479, 0x00000479, 0x0000047b, 0x0000047b, + 0x0000047d, 0x0000047d, 0x0000047f, 0x0000047f, + 0x00000481, 0x00000481, 0x0000048b, 0x0000048b, + 0x0000048d, 0x0000048d, 0x0000048f, 0x0000048f, + 0x00000491, 0x00000491, 0x00000493, 0x00000493, + 0x00000495, 0x00000495, 0x00000497, 0x00000497, + 0x00000499, 0x00000499, 0x0000049b, 0x0000049b, + 0x0000049d, 0x0000049d, 0x0000049f, 0x0000049f, + 0x000004a1, 0x000004a1, 0x000004a3, 0x000004a3, + 0x000004a5, 0x000004a5, 0x000004a7, 0x000004a7, + 0x000004a9, 0x000004a9, 0x000004ab, 0x000004ab, + 0x000004ad, 0x000004ad, 0x000004af, 0x000004af, + 0x000004b1, 0x000004b1, 0x000004b3, 0x000004b3, + 0x000004b5, 0x000004b5, 0x000004b7, 0x000004b7, + 0x000004b9, 0x000004b9, 0x000004bb, 0x000004bb, + 0x000004bd, 0x000004bd, 0x000004bf, 0x000004bf, + 0x000004c2, 0x000004c2, 0x000004c4, 0x000004c4, + 0x000004c6, 0x000004c6, 0x000004c8, 0x000004c8, + 0x000004ca, 0x000004ca, 0x000004cc, 0x000004cc, + 0x000004ce, 0x000004cf, 0x000004d1, 0x000004d1, + 0x000004d3, 0x000004d3, 0x000004d5, 0x000004d5, + 0x000004d7, 0x000004d7, 0x000004d9, 0x000004d9, + 0x000004db, 0x000004db, 0x000004dd, 0x000004dd, + 0x000004df, 0x000004df, 0x000004e1, 0x000004e1, + 0x000004e3, 0x000004e3, 0x000004e5, 0x000004e5, + 0x000004e7, 0x000004e7, 0x000004e9, 0x000004e9, + 0x000004eb, 0x000004eb, 0x000004ed, 0x000004ed, + 0x000004ef, 0x000004ef, 0x000004f1, 0x000004f1, + 0x000004f3, 0x000004f3, 0x000004f5, 0x000004f5, + 0x000004f7, 0x000004f7, 0x000004f9, 0x000004f9, + 0x000004fb, 0x000004fb, 0x000004fd, 0x000004fd, + 0x000004ff, 0x000004ff, 0x00000501, 0x00000501, + 0x00000503, 0x00000503, 0x00000505, 0x00000505, + 0x00000507, 0x00000507, 0x00000509, 0x00000509, + 0x0000050b, 0x0000050b, 0x0000050d, 0x0000050d, + 0x0000050f, 0x0000050f, 0x00000511, 0x00000511, + 0x00000513, 0x00000513, 0x00000515, 0x00000515, + 0x00000517, 0x00000517, 0x00000519, 0x00000519, + 0x0000051b, 0x0000051b, 0x0000051d, 0x0000051d, + 0x0000051f, 0x0000051f, 0x00000521, 0x00000521, + 0x00000523, 0x00000523, 0x00000525, 0x00000525, + 0x00000527, 0x00000527, 0x00000529, 0x00000529, + 0x0000052b, 0x0000052b, 0x0000052d, 0x0000052d, + 0x0000052f, 0x0000052f, 0x00000560, 0x00000588, + 0x000010d0, 0x000010fa, 0x000010fd, 0x000010ff, + 0x000013f8, 0x000013fd, 0x00001c80, 0x00001c88, + 0x00001d00, 0x00001d2b, 0x00001d6b, 0x00001d77, + 0x00001d79, 0x00001d9a, 0x00001e01, 0x00001e01, + 0x00001e03, 0x00001e03, 0x00001e05, 0x00001e05, + 0x00001e07, 0x00001e07, 0x00001e09, 0x00001e09, + 0x00001e0b, 0x00001e0b, 0x00001e0d, 0x00001e0d, + 0x00001e0f, 0x00001e0f, 0x00001e11, 0x00001e11, + 0x00001e13, 0x00001e13, 0x00001e15, 0x00001e15, + 0x00001e17, 0x00001e17, 0x00001e19, 0x00001e19, + 0x00001e1b, 0x00001e1b, 0x00001e1d, 0x00001e1d, + 0x00001e1f, 0x00001e1f, 0x00001e21, 0x00001e21, + 0x00001e23, 0x00001e23, 0x00001e25, 0x00001e25, + 0x00001e27, 0x00001e27, 0x00001e29, 0x00001e29, + 0x00001e2b, 0x00001e2b, 0x00001e2d, 0x00001e2d, + 0x00001e2f, 0x00001e2f, 0x00001e31, 0x00001e31, + 0x00001e33, 0x00001e33, 0x00001e35, 0x00001e35, + 0x00001e37, 0x00001e37, 0x00001e39, 0x00001e39, + 0x00001e3b, 0x00001e3b, 0x00001e3d, 0x00001e3d, + 0x00001e3f, 0x00001e3f, 0x00001e41, 0x00001e41, + 0x00001e43, 0x00001e43, 0x00001e45, 0x00001e45, + 0x00001e47, 0x00001e47, 0x00001e49, 0x00001e49, + 0x00001e4b, 0x00001e4b, 0x00001e4d, 0x00001e4d, + 0x00001e4f, 0x00001e4f, 0x00001e51, 0x00001e51, + 0x00001e53, 0x00001e53, 0x00001e55, 0x00001e55, + 0x00001e57, 0x00001e57, 0x00001e59, 0x00001e59, + 0x00001e5b, 0x00001e5b, 0x00001e5d, 0x00001e5d, + 0x00001e5f, 0x00001e5f, 0x00001e61, 0x00001e61, + 0x00001e63, 0x00001e63, 0x00001e65, 0x00001e65, + 0x00001e67, 0x00001e67, 0x00001e69, 0x00001e69, + 0x00001e6b, 0x00001e6b, 0x00001e6d, 0x00001e6d, + 0x00001e6f, 0x00001e6f, 0x00001e71, 0x00001e71, + 0x00001e73, 0x00001e73, 0x00001e75, 0x00001e75, + 0x00001e77, 0x00001e77, 0x00001e79, 0x00001e79, + 0x00001e7b, 0x00001e7b, 0x00001e7d, 0x00001e7d, + 0x00001e7f, 0x00001e7f, 0x00001e81, 0x00001e81, + 0x00001e83, 0x00001e83, 0x00001e85, 0x00001e85, + 0x00001e87, 0x00001e87, 0x00001e89, 0x00001e89, + 0x00001e8b, 0x00001e8b, 0x00001e8d, 0x00001e8d, + 0x00001e8f, 0x00001e8f, 0x00001e91, 0x00001e91, + 0x00001e93, 0x00001e93, 0x00001e95, 0x00001e9d, + 0x00001e9f, 0x00001e9f, 0x00001ea1, 0x00001ea1, + 0x00001ea3, 0x00001ea3, 0x00001ea5, 0x00001ea5, + 0x00001ea7, 0x00001ea7, 0x00001ea9, 0x00001ea9, + 0x00001eab, 0x00001eab, 0x00001ead, 0x00001ead, + 0x00001eaf, 0x00001eaf, 0x00001eb1, 0x00001eb1, + 0x00001eb3, 0x00001eb3, 0x00001eb5, 0x00001eb5, + 0x00001eb7, 0x00001eb7, 0x00001eb9, 0x00001eb9, + 0x00001ebb, 0x00001ebb, 0x00001ebd, 0x00001ebd, + 0x00001ebf, 0x00001ebf, 0x00001ec1, 0x00001ec1, + 0x00001ec3, 0x00001ec3, 0x00001ec5, 0x00001ec5, + 0x00001ec7, 0x00001ec7, 0x00001ec9, 0x00001ec9, + 0x00001ecb, 0x00001ecb, 0x00001ecd, 0x00001ecd, + 0x00001ecf, 0x00001ecf, 0x00001ed1, 0x00001ed1, + 0x00001ed3, 0x00001ed3, 0x00001ed5, 0x00001ed5, + 0x00001ed7, 0x00001ed7, 0x00001ed9, 0x00001ed9, + 0x00001edb, 0x00001edb, 0x00001edd, 0x00001edd, + 0x00001edf, 0x00001edf, 0x00001ee1, 0x00001ee1, + 0x00001ee3, 0x00001ee3, 0x00001ee5, 0x00001ee5, + 0x00001ee7, 0x00001ee7, 0x00001ee9, 0x00001ee9, + 0x00001eeb, 0x00001eeb, 0x00001eed, 0x00001eed, + 0x00001eef, 0x00001eef, 0x00001ef1, 0x00001ef1, + 0x00001ef3, 0x00001ef3, 0x00001ef5, 0x00001ef5, + 0x00001ef7, 0x00001ef7, 0x00001ef9, 0x00001ef9, + 0x00001efb, 0x00001efb, 0x00001efd, 0x00001efd, + 0x00001eff, 0x00001f07, 0x00001f10, 0x00001f15, + 0x00001f20, 0x00001f27, 0x00001f30, 0x00001f37, + 0x00001f40, 0x00001f45, 0x00001f50, 0x00001f57, + 0x00001f60, 0x00001f67, 0x00001f70, 0x00001f7d, + 0x00001f80, 0x00001f87, 0x00001f90, 0x00001f97, + 0x00001fa0, 0x00001fa7, 0x00001fb0, 0x00001fb4, + 0x00001fb6, 0x00001fb7, 0x00001fbe, 0x00001fbe, + 0x00001fc2, 0x00001fc4, 0x00001fc6, 0x00001fc7, + 0x00001fd0, 0x00001fd3, 0x00001fd6, 0x00001fd7, + 0x00001fe0, 0x00001fe7, 0x00001ff2, 0x00001ff4, + 0x00001ff6, 0x00001ff7, 0x0000210a, 0x0000210a, + 0x0000210e, 0x0000210f, 0x00002113, 0x00002113, + 0x0000212f, 0x0000212f, 0x00002134, 0x00002134, + 0x00002139, 0x00002139, 0x0000213c, 0x0000213d, + 0x00002146, 0x00002149, 0x0000214e, 0x0000214e, + 0x00002184, 0x00002184, 0x00002c30, 0x00002c5e, + 0x00002c61, 0x00002c61, 0x00002c65, 0x00002c66, + 0x00002c68, 0x00002c68, 0x00002c6a, 0x00002c6a, + 0x00002c6c, 0x00002c6c, 0x00002c71, 0x00002c71, + 0x00002c73, 0x00002c74, 0x00002c76, 0x00002c7b, + 0x00002c81, 0x00002c81, 0x00002c83, 0x00002c83, + 0x00002c85, 0x00002c85, 0x00002c87, 0x00002c87, + 0x00002c89, 0x00002c89, 0x00002c8b, 0x00002c8b, + 0x00002c8d, 0x00002c8d, 0x00002c8f, 0x00002c8f, + 0x00002c91, 0x00002c91, 0x00002c93, 0x00002c93, + 0x00002c95, 0x00002c95, 0x00002c97, 0x00002c97, + 0x00002c99, 0x00002c99, 0x00002c9b, 0x00002c9b, + 0x00002c9d, 0x00002c9d, 0x00002c9f, 0x00002c9f, + 0x00002ca1, 0x00002ca1, 0x00002ca3, 0x00002ca3, + 0x00002ca5, 0x00002ca5, 0x00002ca7, 0x00002ca7, + 0x00002ca9, 0x00002ca9, 0x00002cab, 0x00002cab, + 0x00002cad, 0x00002cad, 0x00002caf, 0x00002caf, + 0x00002cb1, 0x00002cb1, 0x00002cb3, 0x00002cb3, + 0x00002cb5, 0x00002cb5, 0x00002cb7, 0x00002cb7, + 0x00002cb9, 0x00002cb9, 0x00002cbb, 0x00002cbb, + 0x00002cbd, 0x00002cbd, 0x00002cbf, 0x00002cbf, + 0x00002cc1, 0x00002cc1, 0x00002cc3, 0x00002cc3, + 0x00002cc5, 0x00002cc5, 0x00002cc7, 0x00002cc7, + 0x00002cc9, 0x00002cc9, 0x00002ccb, 0x00002ccb, + 0x00002ccd, 0x00002ccd, 0x00002ccf, 0x00002ccf, + 0x00002cd1, 0x00002cd1, 0x00002cd3, 0x00002cd3, + 0x00002cd5, 0x00002cd5, 0x00002cd7, 0x00002cd7, + 0x00002cd9, 0x00002cd9, 0x00002cdb, 0x00002cdb, + 0x00002cdd, 0x00002cdd, 0x00002cdf, 0x00002cdf, + 0x00002ce1, 0x00002ce1, 0x00002ce3, 0x00002ce4, + 0x00002cec, 0x00002cec, 0x00002cee, 0x00002cee, + 0x00002cf3, 0x00002cf3, 0x00002d00, 0x00002d25, + 0x00002d27, 0x00002d27, 0x00002d2d, 0x00002d2d, + 0x0000a641, 0x0000a641, 0x0000a643, 0x0000a643, + 0x0000a645, 0x0000a645, 0x0000a647, 0x0000a647, + 0x0000a649, 0x0000a649, 0x0000a64b, 0x0000a64b, + 0x0000a64d, 0x0000a64d, 0x0000a64f, 0x0000a64f, + 0x0000a651, 0x0000a651, 0x0000a653, 0x0000a653, + 0x0000a655, 0x0000a655, 0x0000a657, 0x0000a657, + 0x0000a659, 0x0000a659, 0x0000a65b, 0x0000a65b, + 0x0000a65d, 0x0000a65d, 0x0000a65f, 0x0000a65f, + 0x0000a661, 0x0000a661, 0x0000a663, 0x0000a663, + 0x0000a665, 0x0000a665, 0x0000a667, 0x0000a667, + 0x0000a669, 0x0000a669, 0x0000a66b, 0x0000a66b, + 0x0000a66d, 0x0000a66d, 0x0000a681, 0x0000a681, + 0x0000a683, 0x0000a683, 0x0000a685, 0x0000a685, + 0x0000a687, 0x0000a687, 0x0000a689, 0x0000a689, + 0x0000a68b, 0x0000a68b, 0x0000a68d, 0x0000a68d, + 0x0000a68f, 0x0000a68f, 0x0000a691, 0x0000a691, + 0x0000a693, 0x0000a693, 0x0000a695, 0x0000a695, + 0x0000a697, 0x0000a697, 0x0000a699, 0x0000a699, + 0x0000a69b, 0x0000a69b, 0x0000a723, 0x0000a723, + 0x0000a725, 0x0000a725, 0x0000a727, 0x0000a727, + 0x0000a729, 0x0000a729, 0x0000a72b, 0x0000a72b, + 0x0000a72d, 0x0000a72d, 0x0000a72f, 0x0000a731, + 0x0000a733, 0x0000a733, 0x0000a735, 0x0000a735, + 0x0000a737, 0x0000a737, 0x0000a739, 0x0000a739, + 0x0000a73b, 0x0000a73b, 0x0000a73d, 0x0000a73d, + 0x0000a73f, 0x0000a73f, 0x0000a741, 0x0000a741, + 0x0000a743, 0x0000a743, 0x0000a745, 0x0000a745, + 0x0000a747, 0x0000a747, 0x0000a749, 0x0000a749, + 0x0000a74b, 0x0000a74b, 0x0000a74d, 0x0000a74d, + 0x0000a74f, 0x0000a74f, 0x0000a751, 0x0000a751, + 0x0000a753, 0x0000a753, 0x0000a755, 0x0000a755, + 0x0000a757, 0x0000a757, 0x0000a759, 0x0000a759, + 0x0000a75b, 0x0000a75b, 0x0000a75d, 0x0000a75d, + 0x0000a75f, 0x0000a75f, 0x0000a761, 0x0000a761, + 0x0000a763, 0x0000a763, 0x0000a765, 0x0000a765, + 0x0000a767, 0x0000a767, 0x0000a769, 0x0000a769, + 0x0000a76b, 0x0000a76b, 0x0000a76d, 0x0000a76d, + 0x0000a76f, 0x0000a76f, 0x0000a771, 0x0000a778, + 0x0000a77a, 0x0000a77a, 0x0000a77c, 0x0000a77c, + 0x0000a77f, 0x0000a77f, 0x0000a781, 0x0000a781, + 0x0000a783, 0x0000a783, 0x0000a785, 0x0000a785, + 0x0000a787, 0x0000a787, 0x0000a78c, 0x0000a78c, + 0x0000a78e, 0x0000a78e, 0x0000a791, 0x0000a791, + 0x0000a793, 0x0000a795, 0x0000a797, 0x0000a797, + 0x0000a799, 0x0000a799, 0x0000a79b, 0x0000a79b, + 0x0000a79d, 0x0000a79d, 0x0000a79f, 0x0000a79f, + 0x0000a7a1, 0x0000a7a1, 0x0000a7a3, 0x0000a7a3, + 0x0000a7a5, 0x0000a7a5, 0x0000a7a7, 0x0000a7a7, + 0x0000a7a9, 0x0000a7a9, 0x0000a7af, 0x0000a7af, + 0x0000a7b5, 0x0000a7b5, 0x0000a7b7, 0x0000a7b7, + 0x0000a7b9, 0x0000a7b9, 0x0000a7bb, 0x0000a7bb, + 0x0000a7bd, 0x0000a7bd, 0x0000a7bf, 0x0000a7bf, + 0x0000a7c3, 0x0000a7c3, 0x0000a7c8, 0x0000a7c8, + 0x0000a7ca, 0x0000a7ca, 0x0000a7f6, 0x0000a7f6, 0x0000a7fa, 0x0000a7fa, 0x0000ab30, 0x0000ab5a, - 0x0000ab60, 0x0000ab65, 0x0000ab70, 0x0000abbf, + 0x0000ab60, 0x0000ab68, 0x0000ab70, 0x0000abbf, 0x0000fb00, 0x0000fb06, 0x0000fb13, 0x0000fb17, 0x0000ff41, 0x0000ff5a, 0x00010428, 0x0001044f, 0x000104d8, 0x000104fb, 0x00010cc0, 0x00010cf2, @@ -1014,9 +1037,11 @@ static const unsigned int _ucprop_ranges[] = { 0x0000a7f8, 0x0000a7f9, 0x0000a9cf, 0x0000a9cf, 0x0000a9e6, 0x0000a9e6, 0x0000aa70, 0x0000aa70, 0x0000aadd, 0x0000aadd, 0x0000aaf3, 0x0000aaf4, - 0x0000ab5c, 0x0000ab5f, 0x0000ff70, 0x0000ff70, - 0x0000ff9e, 0x0000ff9f, 0x00016b40, 0x00016b43, - 0x00016f93, 0x00016f9f, 0x00016fe0, 0x00016fe1, + 0x0000ab5c, 0x0000ab5f, 0x0000ab69, 0x0000ab69, + 0x0000ff70, 0x0000ff70, 0x0000ff9e, 0x0000ff9f, + 0x00016b40, 0x00016b43, 0x00016f93, 0x00016f9f, + 0x00016fe0, 0x00016fe1, 0x00016fe3, 0x00016fe3, + 0x0001e137, 0x0001e13d, 0x0001e94b, 0x0001e94b, 0x000000aa, 0x000000aa, 0x000000ba, 0x000000ba, 0x000001bb, 0x000001bb, 0x000001c0, 0x000001c3, 0x00000294, 0x00000294, 0x000005d0, 0x000005ea, @@ -1029,7 +1054,7 @@ static const unsigned int _ucprop_ranges[] = { 0x000007b1, 0x000007b1, 0x000007ca, 0x000007ea, 0x00000800, 0x00000815, 0x00000840, 0x00000858, 0x00000860, 0x0000086a, 0x000008a0, 0x000008b4, - 0x000008b6, 0x000008bd, 0x00000904, 0x00000939, + 0x000008b6, 0x000008c7, 0x00000904, 0x00000939, 0x0000093d, 0x0000093d, 0x00000950, 0x00000950, 0x00000958, 0x00000961, 0x00000972, 0x00000980, 0x00000985, 0x0000098c, 0x0000098f, 0x00000990, @@ -1067,7 +1092,7 @@ static const unsigned int _ucprop_ranges[] = { 0x00000caa, 0x00000cb3, 0x00000cb5, 0x00000cb9, 0x00000cbd, 0x00000cbd, 0x00000cde, 0x00000cde, 0x00000ce0, 0x00000ce1, 0x00000cf1, 0x00000cf2, - 0x00000d05, 0x00000d0c, 0x00000d0e, 0x00000d10, + 0x00000d04, 0x00000d0c, 0x00000d0e, 0x00000d10, 0x00000d12, 0x00000d3a, 0x00000d3d, 0x00000d3d, 0x00000d4e, 0x00000d4e, 0x00000d54, 0x00000d56, 0x00000d5f, 0x00000d61, 0x00000d7a, 0x00000d7f, @@ -1076,11 +1101,8 @@ static const unsigned int _ucprop_ranges[] = { 0x00000dc0, 0x00000dc6, 0x00000e01, 0x00000e30, 0x00000e32, 0x00000e33, 0x00000e40, 0x00000e45, 0x00000e81, 0x00000e82, 0x00000e84, 0x00000e84, - 0x00000e87, 0x00000e88, 0x00000e8a, 0x00000e8a, - 0x00000e8d, 0x00000e8d, 0x00000e94, 0x00000e97, - 0x00000e99, 0x00000e9f, 0x00000ea1, 0x00000ea3, - 0x00000ea5, 0x00000ea5, 0x00000ea7, 0x00000ea7, - 0x00000eaa, 0x00000eab, 0x00000ead, 0x00000eb0, + 0x00000e86, 0x00000e8a, 0x00000e8c, 0x00000ea3, + 0x00000ea5, 0x00000ea5, 0x00000ea7, 0x00000eb0, 0x00000eb2, 0x00000eb3, 0x00000ebd, 0x00000ebd, 0x00000ec0, 0x00000ec4, 0x00000edc, 0x00000edf, 0x00000f00, 0x00000f00, 0x00000f40, 0x00000f47, @@ -1115,85 +1137,88 @@ static const unsigned int _ucprop_ranges[] = { 0x00001b83, 0x00001ba0, 0x00001bae, 0x00001baf, 0x00001bba, 0x00001be5, 0x00001c00, 0x00001c23, 0x00001c4d, 0x00001c4f, 0x00001c5a, 0x00001c77, - 0x00001ce9, 0x00001cec, 0x00001cee, 0x00001cf1, - 0x00001cf5, 0x00001cf6, 0x00002135, 0x00002138, - 0x00002d30, 0x00002d67, 0x00002d80, 0x00002d96, - 0x00002da0, 0x00002da6, 0x00002da8, 0x00002dae, - 0x00002db0, 0x00002db6, 0x00002db8, 0x00002dbe, - 0x00002dc0, 0x00002dc6, 0x00002dc8, 0x00002dce, - 0x00002dd0, 0x00002dd6, 0x00002dd8, 0x00002dde, - 0x00003006, 0x00003006, 0x0000303c, 0x0000303c, - 0x00003041, 0x00003096, 0x0000309f, 0x0000309f, - 0x000030a1, 0x000030fa, 0x000030ff, 0x000030ff, - 0x00003105, 0x0000312f, 0x00003131, 0x0000318e, - 0x000031a0, 0x000031ba, 0x000031f0, 0x000031ff, - 0x00003400, 0x00004db5, 0x00004e00, 0x00009fef, - 0x0000a000, 0x0000a014, 0x0000a016, 0x0000a48c, - 0x0000a4d0, 0x0000a4f7, 0x0000a500, 0x0000a60b, - 0x0000a610, 0x0000a61f, 0x0000a62a, 0x0000a62b, - 0x0000a66e, 0x0000a66e, 0x0000a6a0, 0x0000a6e5, - 0x0000a78f, 0x0000a78f, 0x0000a7f7, 0x0000a7f7, - 0x0000a7fb, 0x0000a801, 0x0000a803, 0x0000a805, - 0x0000a807, 0x0000a80a, 0x0000a80c, 0x0000a822, - 0x0000a840, 0x0000a873, 0x0000a882, 0x0000a8b3, - 0x0000a8f2, 0x0000a8f7, 0x0000a8fb, 0x0000a8fb, - 0x0000a8fd, 0x0000a8fe, 0x0000a90a, 0x0000a925, - 0x0000a930, 0x0000a946, 0x0000a960, 0x0000a97c, - 0x0000a984, 0x0000a9b2, 0x0000a9e0, 0x0000a9e4, - 0x0000a9e7, 0x0000a9ef, 0x0000a9fa, 0x0000a9fe, - 0x0000aa00, 0x0000aa28, 0x0000aa40, 0x0000aa42, - 0x0000aa44, 0x0000aa4b, 0x0000aa60, 0x0000aa6f, - 0x0000aa71, 0x0000aa76, 0x0000aa7a, 0x0000aa7a, - 0x0000aa7e, 0x0000aaaf, 0x0000aab1, 0x0000aab1, - 0x0000aab5, 0x0000aab6, 0x0000aab9, 0x0000aabd, - 0x0000aac0, 0x0000aac0, 0x0000aac2, 0x0000aac2, - 0x0000aadb, 0x0000aadc, 0x0000aae0, 0x0000aaea, - 0x0000aaf2, 0x0000aaf2, 0x0000ab01, 0x0000ab06, - 0x0000ab09, 0x0000ab0e, 0x0000ab11, 0x0000ab16, - 0x0000ab20, 0x0000ab26, 0x0000ab28, 0x0000ab2e, - 0x0000abc0, 0x0000abe2, 0x0000ac00, 0x0000d7a3, - 0x0000d7b0, 0x0000d7c6, 0x0000d7cb, 0x0000d7fb, - 0x0000f900, 0x0000fa6d, 0x0000fa70, 0x0000fad9, - 0x0000fb1d, 0x0000fb1d, 0x0000fb1f, 0x0000fb28, - 0x0000fb2a, 0x0000fb36, 0x0000fb38, 0x0000fb3c, - 0x0000fb3e, 0x0000fb3e, 0x0000fb40, 0x0000fb41, - 0x0000fb43, 0x0000fb44, 0x0000fb46, 0x0000fbb1, - 0x0000fbd3, 0x0000fd3d, 0x0000fd50, 0x0000fd8f, - 0x0000fd92, 0x0000fdc7, 0x0000fdf0, 0x0000fdfb, - 0x0000fe70, 0x0000fe74, 0x0000fe76, 0x0000fefc, - 0x0000ff66, 0x0000ff6f, 0x0000ff71, 0x0000ff9d, - 0x0000ffa0, 0x0000ffbe, 0x0000ffc2, 0x0000ffc7, - 0x0000ffca, 0x0000ffcf, 0x0000ffd2, 0x0000ffd7, - 0x0000ffda, 0x0000ffdc, 0x00010000, 0x0001000b, - 0x0001000d, 0x00010026, 0x00010028, 0x0001003a, - 0x0001003c, 0x0001003d, 0x0001003f, 0x0001004d, - 0x00010050, 0x0001005d, 0x00010080, 0x000100fa, - 0x00010280, 0x0001029c, 0x000102a0, 0x000102d0, - 0x00010300, 0x0001031f, 0x0001032d, 0x00010340, - 0x00010342, 0x00010349, 0x00010350, 0x00010375, - 0x00010380, 0x0001039d, 0x000103a0, 0x000103c3, - 0x000103c8, 0x000103cf, 0x00010450, 0x0001049d, - 0x00010500, 0x00010527, 0x00010530, 0x00010563, - 0x00010600, 0x00010736, 0x00010740, 0x00010755, - 0x00010760, 0x00010767, 0x00010800, 0x00010805, - 0x00010808, 0x00010808, 0x0001080a, 0x00010835, - 0x00010837, 0x00010838, 0x0001083c, 0x0001083c, - 0x0001083f, 0x00010855, 0x00010860, 0x00010876, - 0x00010880, 0x0001089e, 0x000108e0, 0x000108f2, - 0x000108f4, 0x000108f5, 0x00010900, 0x00010915, - 0x00010920, 0x00010939, 0x00010980, 0x000109b7, - 0x000109be, 0x000109bf, 0x00010a00, 0x00010a00, - 0x00010a10, 0x00010a13, 0x00010a15, 0x00010a17, - 0x00010a19, 0x00010a35, 0x00010a60, 0x00010a7c, - 0x00010a80, 0x00010a9c, 0x00010ac0, 0x00010ac7, - 0x00010ac9, 0x00010ae4, 0x00010b00, 0x00010b35, - 0x00010b40, 0x00010b55, 0x00010b60, 0x00010b72, - 0x00010b80, 0x00010b91, 0x00010c00, 0x00010c48, - 0x00010d00, 0x00010d23, 0x00010f00, 0x00010f1c, - 0x00010f27, 0x00010f27, 0x00010f30, 0x00010f45, - 0x00011003, 0x00011037, 0x00011083, 0x000110af, - 0x000110d0, 0x000110e8, 0x00011103, 0x00011126, - 0x00011144, 0x00011144, 0x00011150, 0x00011172, + 0x00001ce9, 0x00001cec, 0x00001cee, 0x00001cf3, + 0x00001cf5, 0x00001cf6, 0x00001cfa, 0x00001cfa, + 0x00002135, 0x00002138, 0x00002d30, 0x00002d67, + 0x00002d80, 0x00002d96, 0x00002da0, 0x00002da6, + 0x00002da8, 0x00002dae, 0x00002db0, 0x00002db6, + 0x00002db8, 0x00002dbe, 0x00002dc0, 0x00002dc6, + 0x00002dc8, 0x00002dce, 0x00002dd0, 0x00002dd6, + 0x00002dd8, 0x00002dde, 0x00003006, 0x00003006, + 0x0000303c, 0x0000303c, 0x00003041, 0x00003096, + 0x0000309f, 0x0000309f, 0x000030a1, 0x000030fa, + 0x000030ff, 0x000030ff, 0x00003105, 0x0000312f, + 0x00003131, 0x0000318e, 0x000031a0, 0x000031bf, + 0x000031f0, 0x000031ff, 0x00003400, 0x00004dbf, + 0x00004e00, 0x00009ffc, 0x0000a000, 0x0000a014, + 0x0000a016, 0x0000a48c, 0x0000a4d0, 0x0000a4f7, + 0x0000a500, 0x0000a60b, 0x0000a610, 0x0000a61f, + 0x0000a62a, 0x0000a62b, 0x0000a66e, 0x0000a66e, + 0x0000a6a0, 0x0000a6e5, 0x0000a78f, 0x0000a78f, + 0x0000a7f7, 0x0000a7f7, 0x0000a7fb, 0x0000a801, + 0x0000a803, 0x0000a805, 0x0000a807, 0x0000a80a, + 0x0000a80c, 0x0000a822, 0x0000a840, 0x0000a873, + 0x0000a882, 0x0000a8b3, 0x0000a8f2, 0x0000a8f7, + 0x0000a8fb, 0x0000a8fb, 0x0000a8fd, 0x0000a8fe, + 0x0000a90a, 0x0000a925, 0x0000a930, 0x0000a946, + 0x0000a960, 0x0000a97c, 0x0000a984, 0x0000a9b2, + 0x0000a9e0, 0x0000a9e4, 0x0000a9e7, 0x0000a9ef, + 0x0000a9fa, 0x0000a9fe, 0x0000aa00, 0x0000aa28, + 0x0000aa40, 0x0000aa42, 0x0000aa44, 0x0000aa4b, + 0x0000aa60, 0x0000aa6f, 0x0000aa71, 0x0000aa76, + 0x0000aa7a, 0x0000aa7a, 0x0000aa7e, 0x0000aaaf, + 0x0000aab1, 0x0000aab1, 0x0000aab5, 0x0000aab6, + 0x0000aab9, 0x0000aabd, 0x0000aac0, 0x0000aac0, + 0x0000aac2, 0x0000aac2, 0x0000aadb, 0x0000aadc, + 0x0000aae0, 0x0000aaea, 0x0000aaf2, 0x0000aaf2, + 0x0000ab01, 0x0000ab06, 0x0000ab09, 0x0000ab0e, + 0x0000ab11, 0x0000ab16, 0x0000ab20, 0x0000ab26, + 0x0000ab28, 0x0000ab2e, 0x0000abc0, 0x0000abe2, + 0x0000ac00, 0x0000d7a3, 0x0000d7b0, 0x0000d7c6, + 0x0000d7cb, 0x0000d7fb, 0x0000f900, 0x0000fa6d, + 0x0000fa70, 0x0000fad9, 0x0000fb1d, 0x0000fb1d, + 0x0000fb1f, 0x0000fb28, 0x0000fb2a, 0x0000fb36, + 0x0000fb38, 0x0000fb3c, 0x0000fb3e, 0x0000fb3e, + 0x0000fb40, 0x0000fb41, 0x0000fb43, 0x0000fb44, + 0x0000fb46, 0x0000fbb1, 0x0000fbd3, 0x0000fd3d, + 0x0000fd50, 0x0000fd8f, 0x0000fd92, 0x0000fdc7, + 0x0000fdf0, 0x0000fdfb, 0x0000fe70, 0x0000fe74, + 0x0000fe76, 0x0000fefc, 0x0000ff66, 0x0000ff6f, + 0x0000ff71, 0x0000ff9d, 0x0000ffa0, 0x0000ffbe, + 0x0000ffc2, 0x0000ffc7, 0x0000ffca, 0x0000ffcf, + 0x0000ffd2, 0x0000ffd7, 0x0000ffda, 0x0000ffdc, + 0x00010000, 0x0001000b, 0x0001000d, 0x00010026, + 0x00010028, 0x0001003a, 0x0001003c, 0x0001003d, + 0x0001003f, 0x0001004d, 0x00010050, 0x0001005d, + 0x00010080, 0x000100fa, 0x00010280, 0x0001029c, + 0x000102a0, 0x000102d0, 0x00010300, 0x0001031f, + 0x0001032d, 0x00010340, 0x00010342, 0x00010349, + 0x00010350, 0x00010375, 0x00010380, 0x0001039d, + 0x000103a0, 0x000103c3, 0x000103c8, 0x000103cf, + 0x00010450, 0x0001049d, 0x00010500, 0x00010527, + 0x00010530, 0x00010563, 0x00010600, 0x00010736, + 0x00010740, 0x00010755, 0x00010760, 0x00010767, + 0x00010800, 0x00010805, 0x00010808, 0x00010808, + 0x0001080a, 0x00010835, 0x00010837, 0x00010838, + 0x0001083c, 0x0001083c, 0x0001083f, 0x00010855, + 0x00010860, 0x00010876, 0x00010880, 0x0001089e, + 0x000108e0, 0x000108f2, 0x000108f4, 0x000108f5, + 0x00010900, 0x00010915, 0x00010920, 0x00010939, + 0x00010980, 0x000109b7, 0x000109be, 0x000109bf, + 0x00010a00, 0x00010a00, 0x00010a10, 0x00010a13, + 0x00010a15, 0x00010a17, 0x00010a19, 0x00010a35, + 0x00010a60, 0x00010a7c, 0x00010a80, 0x00010a9c, + 0x00010ac0, 0x00010ac7, 0x00010ac9, 0x00010ae4, + 0x00010b00, 0x00010b35, 0x00010b40, 0x00010b55, + 0x00010b60, 0x00010b72, 0x00010b80, 0x00010b91, + 0x00010c00, 0x00010c48, 0x00010d00, 0x00010d23, + 0x00010e80, 0x00010ea9, 0x00010eb0, 0x00010eb1, + 0x00010f00, 0x00010f1c, 0x00010f27, 0x00010f27, + 0x00010f30, 0x00010f45, 0x00010fb0, 0x00010fc4, + 0x00010fe0, 0x00010ff6, 0x00011003, 0x00011037, + 0x00011083, 0x000110af, 0x000110d0, 0x000110e8, + 0x00011103, 0x00011126, 0x00011144, 0x00011144, + 0x00011147, 0x00011147, 0x00011150, 0x00011172, 0x00011176, 0x00011176, 0x00011183, 0x000111b2, 0x000111c1, 0x000111c4, 0x000111da, 0x000111da, 0x000111dc, 0x000111dc, 0x00011200, 0x00011211, @@ -1206,32 +1231,41 @@ static const unsigned int _ucprop_ranges[] = { 0x00011335, 0x00011339, 0x0001133d, 0x0001133d, 0x00011350, 0x00011350, 0x0001135d, 0x00011361, 0x00011400, 0x00011434, 0x00011447, 0x0001144a, - 0x00011480, 0x000114af, 0x000114c4, 0x000114c5, - 0x000114c7, 0x000114c7, 0x00011580, 0x000115ae, - 0x000115d8, 0x000115db, 0x00011600, 0x0001162f, - 0x00011644, 0x00011644, 0x00011680, 0x000116aa, + 0x0001145f, 0x00011461, 0x00011480, 0x000114af, + 0x000114c4, 0x000114c5, 0x000114c7, 0x000114c7, + 0x00011580, 0x000115ae, 0x000115d8, 0x000115db, + 0x00011600, 0x0001162f, 0x00011644, 0x00011644, + 0x00011680, 0x000116aa, 0x000116b8, 0x000116b8, 0x00011700, 0x0001171a, 0x00011800, 0x0001182b, - 0x000118ff, 0x000118ff, 0x00011a00, 0x00011a00, + 0x000118ff, 0x00011906, 0x00011909, 0x00011909, + 0x0001190c, 0x00011913, 0x00011915, 0x00011916, + 0x00011918, 0x0001192f, 0x0001193f, 0x0001193f, + 0x00011941, 0x00011941, 0x000119a0, 0x000119a7, + 0x000119aa, 0x000119d0, 0x000119e1, 0x000119e1, + 0x000119e3, 0x000119e3, 0x00011a00, 0x00011a00, 0x00011a0b, 0x00011a32, 0x00011a3a, 0x00011a3a, - 0x00011a50, 0x00011a50, 0x00011a5c, 0x00011a83, - 0x00011a86, 0x00011a89, 0x00011a9d, 0x00011a9d, - 0x00011ac0, 0x00011af8, 0x00011c00, 0x00011c08, - 0x00011c0a, 0x00011c2e, 0x00011c40, 0x00011c40, - 0x00011c72, 0x00011c8f, 0x00011d00, 0x00011d06, - 0x00011d08, 0x00011d09, 0x00011d0b, 0x00011d30, - 0x00011d46, 0x00011d46, 0x00011d60, 0x00011d65, - 0x00011d67, 0x00011d68, 0x00011d6a, 0x00011d89, - 0x00011d98, 0x00011d98, 0x00011ee0, 0x00011ef2, + 0x00011a50, 0x00011a50, 0x00011a5c, 0x00011a89, + 0x00011a9d, 0x00011a9d, 0x00011ac0, 0x00011af8, + 0x00011c00, 0x00011c08, 0x00011c0a, 0x00011c2e, + 0x00011c40, 0x00011c40, 0x00011c72, 0x00011c8f, + 0x00011d00, 0x00011d06, 0x00011d08, 0x00011d09, + 0x00011d0b, 0x00011d30, 0x00011d46, 0x00011d46, + 0x00011d60, 0x00011d65, 0x00011d67, 0x00011d68, + 0x00011d6a, 0x00011d89, 0x00011d98, 0x00011d98, + 0x00011ee0, 0x00011ef2, 0x00011fb0, 0x00011fb0, 0x00012000, 0x00012399, 0x00012480, 0x00012543, 0x00013000, 0x0001342e, 0x00014400, 0x00014646, 0x00016800, 0x00016a38, 0x00016a40, 0x00016a5e, 0x00016ad0, 0x00016aed, 0x00016b00, 0x00016b2f, 0x00016b63, 0x00016b77, 0x00016b7d, 0x00016b8f, - 0x00016f00, 0x00016f44, 0x00016f50, 0x00016f50, - 0x00017000, 0x000187f1, 0x00018800, 0x00018af2, - 0x0001b000, 0x0001b11e, 0x0001b170, 0x0001b2fb, - 0x0001bc00, 0x0001bc6a, 0x0001bc70, 0x0001bc7c, - 0x0001bc80, 0x0001bc88, 0x0001bc90, 0x0001bc99, + 0x00016f00, 0x00016f4a, 0x00016f50, 0x00016f50, + 0x00017000, 0x000187f7, 0x00018800, 0x00018cd5, + 0x00018d00, 0x00018d08, 0x0001b000, 0x0001b11e, + 0x0001b150, 0x0001b152, 0x0001b164, 0x0001b167, + 0x0001b170, 0x0001b2fb, 0x0001bc00, 0x0001bc6a, + 0x0001bc70, 0x0001bc7c, 0x0001bc80, 0x0001bc88, + 0x0001bc90, 0x0001bc99, 0x0001e100, 0x0001e12c, + 0x0001e14e, 0x0001e14e, 0x0001e2c0, 0x0001e2eb, 0x0001e800, 0x0001e8c4, 0x0001ee00, 0x0001ee03, 0x0001ee05, 0x0001ee1f, 0x0001ee21, 0x0001ee22, 0x0001ee24, 0x0001ee24, 0x0001ee27, 0x0001ee27, @@ -1249,21 +1283,22 @@ static const unsigned int _ucprop_ranges[] = { 0x0001ee7e, 0x0001ee7e, 0x0001ee80, 0x0001ee89, 0x0001ee8b, 0x0001ee9b, 0x0001eea1, 0x0001eea3, 0x0001eea5, 0x0001eea9, 0x0001eeab, 0x0001eebb, - 0x00020000, 0x0002a6d6, 0x0002a700, 0x0002b734, + 0x00020000, 0x0002a6dd, 0x0002a700, 0x0002b734, 0x0002b740, 0x0002b81d, 0x0002b820, 0x0002cea1, 0x0002ceb0, 0x0002ebe0, 0x0002f800, 0x0002fa1d, - 0x0000005f, 0x0000005f, 0x0000203f, 0x00002040, - 0x00002054, 0x00002054, 0x0000fe33, 0x0000fe34, - 0x0000fe4d, 0x0000fe4f, 0x0000ff3f, 0x0000ff3f, - 0x0000002d, 0x0000002d, 0x0000058a, 0x0000058a, - 0x000005be, 0x000005be, 0x00001400, 0x00001400, - 0x00001806, 0x00001806, 0x00002010, 0x00002015, - 0x00002e17, 0x00002e17, 0x00002e1a, 0x00002e1a, - 0x00002e3a, 0x00002e3b, 0x00002e40, 0x00002e40, - 0x0000301c, 0x0000301c, 0x00003030, 0x00003030, - 0x000030a0, 0x000030a0, 0x0000fe31, 0x0000fe32, - 0x0000fe58, 0x0000fe58, 0x0000fe63, 0x0000fe63, - 0x0000ff0d, 0x0000ff0d, 0x00000028, 0x00000028, + 0x00030000, 0x0003134a, 0x0000005f, 0x0000005f, + 0x0000203f, 0x00002040, 0x00002054, 0x00002054, + 0x0000fe33, 0x0000fe34, 0x0000fe4d, 0x0000fe4f, + 0x0000ff3f, 0x0000ff3f, 0x0000002d, 0x0000002d, + 0x0000058a, 0x0000058a, 0x000005be, 0x000005be, + 0x00001400, 0x00001400, 0x00001806, 0x00001806, + 0x00002010, 0x00002015, 0x00002e17, 0x00002e17, + 0x00002e1a, 0x00002e1a, 0x00002e3a, 0x00002e3b, + 0x00002e40, 0x00002e40, 0x0000301c, 0x0000301c, + 0x00003030, 0x00003030, 0x000030a0, 0x000030a0, + 0x0000fe31, 0x0000fe32, 0x0000fe58, 0x0000fe58, + 0x0000fe63, 0x0000fe63, 0x0000ff0d, 0x0000ff0d, + 0x00010ead, 0x00010ead, 0x00000028, 0x00000028, 0x0000005b, 0x0000005b, 0x0000007b, 0x0000007b, 0x00000f3a, 0x00000f3a, 0x00000f3c, 0x00000f3c, 0x0000169b, 0x0000169b, 0x0000201a, 0x0000201a, @@ -1354,33 +1389,34 @@ static const unsigned int _ucprop_ranges[] = { 0x00000830, 0x0000083e, 0x0000085e, 0x0000085e, 0x00000964, 0x00000965, 0x00000970, 0x00000970, 0x000009fd, 0x000009fd, 0x00000a76, 0x00000a76, - 0x00000af0, 0x00000af0, 0x00000c84, 0x00000c84, - 0x00000df4, 0x00000df4, 0x00000e4f, 0x00000e4f, - 0x00000e5a, 0x00000e5b, 0x00000f04, 0x00000f12, - 0x00000f14, 0x00000f14, 0x00000f85, 0x00000f85, - 0x00000fd0, 0x00000fd4, 0x00000fd9, 0x00000fda, - 0x0000104a, 0x0000104f, 0x000010fb, 0x000010fb, - 0x00001360, 0x00001368, 0x0000166d, 0x0000166e, - 0x000016eb, 0x000016ed, 0x00001735, 0x00001736, - 0x000017d4, 0x000017d6, 0x000017d8, 0x000017da, - 0x00001800, 0x00001805, 0x00001807, 0x0000180a, - 0x00001944, 0x00001945, 0x00001a1e, 0x00001a1f, - 0x00001aa0, 0x00001aa6, 0x00001aa8, 0x00001aad, - 0x00001b5a, 0x00001b60, 0x00001bfc, 0x00001bff, - 0x00001c3b, 0x00001c3f, 0x00001c7e, 0x00001c7f, - 0x00001cc0, 0x00001cc7, 0x00001cd3, 0x00001cd3, - 0x00002016, 0x00002017, 0x00002020, 0x00002027, - 0x00002030, 0x00002038, 0x0000203b, 0x0000203e, - 0x00002041, 0x00002043, 0x00002047, 0x00002051, - 0x00002053, 0x00002053, 0x00002055, 0x0000205e, - 0x00002cf9, 0x00002cfc, 0x00002cfe, 0x00002cff, - 0x00002d70, 0x00002d70, 0x00002e00, 0x00002e01, - 0x00002e06, 0x00002e08, 0x00002e0b, 0x00002e0b, - 0x00002e0e, 0x00002e16, 0x00002e18, 0x00002e19, - 0x00002e1b, 0x00002e1b, 0x00002e1e, 0x00002e1f, - 0x00002e2a, 0x00002e2e, 0x00002e30, 0x00002e39, - 0x00002e3c, 0x00002e3f, 0x00002e41, 0x00002e41, - 0x00002e43, 0x00002e4e, 0x00003001, 0x00003003, + 0x00000af0, 0x00000af0, 0x00000c77, 0x00000c77, + 0x00000c84, 0x00000c84, 0x00000df4, 0x00000df4, + 0x00000e4f, 0x00000e4f, 0x00000e5a, 0x00000e5b, + 0x00000f04, 0x00000f12, 0x00000f14, 0x00000f14, + 0x00000f85, 0x00000f85, 0x00000fd0, 0x00000fd4, + 0x00000fd9, 0x00000fda, 0x0000104a, 0x0000104f, + 0x000010fb, 0x000010fb, 0x00001360, 0x00001368, + 0x0000166e, 0x0000166e, 0x000016eb, 0x000016ed, + 0x00001735, 0x00001736, 0x000017d4, 0x000017d6, + 0x000017d8, 0x000017da, 0x00001800, 0x00001805, + 0x00001807, 0x0000180a, 0x00001944, 0x00001945, + 0x00001a1e, 0x00001a1f, 0x00001aa0, 0x00001aa6, + 0x00001aa8, 0x00001aad, 0x00001b5a, 0x00001b60, + 0x00001bfc, 0x00001bff, 0x00001c3b, 0x00001c3f, + 0x00001c7e, 0x00001c7f, 0x00001cc0, 0x00001cc7, + 0x00001cd3, 0x00001cd3, 0x00002016, 0x00002017, + 0x00002020, 0x00002027, 0x00002030, 0x00002038, + 0x0000203b, 0x0000203e, 0x00002041, 0x00002043, + 0x00002047, 0x00002051, 0x00002053, 0x00002053, + 0x00002055, 0x0000205e, 0x00002cf9, 0x00002cfc, + 0x00002cfe, 0x00002cff, 0x00002d70, 0x00002d70, + 0x00002e00, 0x00002e01, 0x00002e06, 0x00002e08, + 0x00002e0b, 0x00002e0b, 0x00002e0e, 0x00002e16, + 0x00002e18, 0x00002e19, 0x00002e1b, 0x00002e1b, + 0x00002e1e, 0x00002e1f, 0x00002e2a, 0x00002e2e, + 0x00002e30, 0x00002e39, 0x00002e3c, 0x00002e3f, + 0x00002e41, 0x00002e41, 0x00002e43, 0x00002e4f, + 0x00002e52, 0x00002e52, 0x00003001, 0x00003003, 0x0000303d, 0x0000303d, 0x000030fb, 0x000030fb, 0x0000a4fe, 0x0000a4ff, 0x0000a60d, 0x0000a60f, 0x0000a673, 0x0000a673, 0x0000a67e, 0x0000a67e, @@ -1413,16 +1449,18 @@ static const unsigned int _ucprop_ranges[] = { 0x000111cd, 0x000111cd, 0x000111db, 0x000111db, 0x000111dd, 0x000111df, 0x00011238, 0x0001123d, 0x000112a9, 0x000112a9, 0x0001144b, 0x0001144f, - 0x0001145b, 0x0001145b, 0x0001145d, 0x0001145d, + 0x0001145a, 0x0001145b, 0x0001145d, 0x0001145d, 0x000114c6, 0x000114c6, 0x000115c1, 0x000115d7, 0x00011641, 0x00011643, 0x00011660, 0x0001166c, 0x0001173c, 0x0001173e, 0x0001183b, 0x0001183b, + 0x00011944, 0x00011946, 0x000119e2, 0x000119e2, 0x00011a3f, 0x00011a46, 0x00011a9a, 0x00011a9c, 0x00011a9e, 0x00011aa2, 0x00011c41, 0x00011c45, 0x00011c70, 0x00011c71, 0x00011ef7, 0x00011ef8, - 0x00012470, 0x00012474, 0x00016a6e, 0x00016a6f, - 0x00016af5, 0x00016af5, 0x00016b37, 0x00016b3b, - 0x00016b44, 0x00016b44, 0x00016e97, 0x00016e9a, + 0x00011fff, 0x00011fff, 0x00012470, 0x00012474, + 0x00016a6e, 0x00016a6f, 0x00016af5, 0x00016af5, + 0x00016b37, 0x00016b3b, 0x00016b44, 0x00016b44, + 0x00016e97, 0x00016e9a, 0x00016fe2, 0x00016fe2, 0x0001bc9f, 0x0001bc9f, 0x0001da87, 0x0001da8b, 0x0001e95e, 0x0001e95f, 0x0000002b, 0x0000002b, 0x0000003c, 0x0000003e, 0x0000007c, 0x0000007c, @@ -1465,7 +1503,8 @@ static const unsigned int _ucprop_ranges[] = { 0x000020a0, 0x000020bf, 0x0000a838, 0x0000a838, 0x0000fdfc, 0x0000fdfc, 0x0000fe69, 0x0000fe69, 0x0000ff04, 0x0000ff04, 0x0000ffe0, 0x0000ffe1, - 0x0000ffe5, 0x0000ffe6, 0x0001ecb0, 0x0001ecb0, + 0x0000ffe5, 0x0000ffe6, 0x00011fdd, 0x00011fe0, + 0x0001e2ff, 0x0001e2ff, 0x0001ecb0, 0x0001ecb0, 0x0000005e, 0x0000005e, 0x00000060, 0x00000060, 0x000000a8, 0x000000a8, 0x000000af, 0x000000af, 0x000000b4, 0x000000b4, 0x000000b8, 0x000000b8, @@ -1478,24 +1517,25 @@ static const unsigned int _ucprop_ranges[] = { 0x00001ffd, 0x00001ffe, 0x0000309b, 0x0000309c, 0x0000a700, 0x0000a716, 0x0000a720, 0x0000a721, 0x0000a789, 0x0000a78a, 0x0000ab5b, 0x0000ab5b, - 0x0000fbb2, 0x0000fbc1, 0x0000ff3e, 0x0000ff3e, - 0x0000ff40, 0x0000ff40, 0x0000ffe3, 0x0000ffe3, - 0x0001f3fb, 0x0001f3ff, 0x000000a6, 0x000000a6, - 0x000000a9, 0x000000a9, 0x000000ae, 0x000000ae, - 0x000000b0, 0x000000b0, 0x00000482, 0x00000482, - 0x0000058d, 0x0000058e, 0x0000060e, 0x0000060f, - 0x000006de, 0x000006de, 0x000006e9, 0x000006e9, - 0x000006fd, 0x000006fe, 0x000007f6, 0x000007f6, - 0x000009fa, 0x000009fa, 0x00000b70, 0x00000b70, - 0x00000bf3, 0x00000bf8, 0x00000bfa, 0x00000bfa, - 0x00000c7f, 0x00000c7f, 0x00000d4f, 0x00000d4f, - 0x00000d79, 0x00000d79, 0x00000f01, 0x00000f03, - 0x00000f13, 0x00000f13, 0x00000f15, 0x00000f17, - 0x00000f1a, 0x00000f1f, 0x00000f34, 0x00000f34, - 0x00000f36, 0x00000f36, 0x00000f38, 0x00000f38, - 0x00000fbe, 0x00000fc5, 0x00000fc7, 0x00000fcc, - 0x00000fce, 0x00000fcf, 0x00000fd5, 0x00000fd8, - 0x0000109e, 0x0000109f, 0x00001390, 0x00001399, + 0x0000ab6a, 0x0000ab6b, 0x0000fbb2, 0x0000fbc1, + 0x0000ff3e, 0x0000ff3e, 0x0000ff40, 0x0000ff40, + 0x0000ffe3, 0x0000ffe3, 0x0001f3fb, 0x0001f3ff, + 0x000000a6, 0x000000a6, 0x000000a9, 0x000000a9, + 0x000000ae, 0x000000ae, 0x000000b0, 0x000000b0, + 0x00000482, 0x00000482, 0x0000058d, 0x0000058e, + 0x0000060e, 0x0000060f, 0x000006de, 0x000006de, + 0x000006e9, 0x000006e9, 0x000006fd, 0x000006fe, + 0x000007f6, 0x000007f6, 0x000009fa, 0x000009fa, + 0x00000b70, 0x00000b70, 0x00000bf3, 0x00000bf8, + 0x00000bfa, 0x00000bfa, 0x00000c7f, 0x00000c7f, + 0x00000d4f, 0x00000d4f, 0x00000d79, 0x00000d79, + 0x00000f01, 0x00000f03, 0x00000f13, 0x00000f13, + 0x00000f15, 0x00000f17, 0x00000f1a, 0x00000f1f, + 0x00000f34, 0x00000f34, 0x00000f36, 0x00000f36, + 0x00000f38, 0x00000f38, 0x00000fbe, 0x00000fc5, + 0x00000fc7, 0x00000fcc, 0x00000fce, 0x00000fcf, + 0x00000fd5, 0x00000fd8, 0x0000109e, 0x0000109f, + 0x00001390, 0x00001399, 0x0000166d, 0x0000166d, 0x00001940, 0x00001940, 0x000019de, 0x000019ff, 0x00001b61, 0x00001b6a, 0x00001b74, 0x00001b7c, 0x00002100, 0x00002101, 0x00002103, 0x00002106, @@ -1520,8 +1560,8 @@ static const unsigned int _ucprop_ranges[] = { 0x00002794, 0x000027bf, 0x00002800, 0x000028ff, 0x00002b00, 0x00002b2f, 0x00002b45, 0x00002b46, 0x00002b4d, 0x00002b73, 0x00002b76, 0x00002b95, - 0x00002b98, 0x00002bc8, 0x00002bca, 0x00002bfe, - 0x00002ce5, 0x00002cea, 0x00002e80, 0x00002e99, + 0x00002b97, 0x00002bff, 0x00002ce5, 0x00002cea, + 0x00002e50, 0x00002e51, 0x00002e80, 0x00002e99, 0x00002e9b, 0x00002ef3, 0x00002f00, 0x00002fd5, 0x00002ff0, 0x00002ffb, 0x00003004, 0x00003004, 0x00003012, 0x00003013, 0x00003020, 0x00003020, @@ -1530,103 +1570,107 @@ static const unsigned int _ucprop_ranges[] = { 0x000031c0, 0x000031e3, 0x00003200, 0x0000321e, 0x0000322a, 0x00003247, 0x00003250, 0x00003250, 0x00003260, 0x0000327f, 0x0000328a, 0x000032b0, - 0x000032c0, 0x000032fe, 0x00003300, 0x000033ff, - 0x00004dc0, 0x00004dff, 0x0000a490, 0x0000a4c6, - 0x0000a828, 0x0000a82b, 0x0000a836, 0x0000a837, - 0x0000a839, 0x0000a839, 0x0000aa77, 0x0000aa79, - 0x0000fdfd, 0x0000fdfd, 0x0000ffe4, 0x0000ffe4, - 0x0000ffe8, 0x0000ffe8, 0x0000ffed, 0x0000ffee, - 0x0000fffc, 0x0000fffd, 0x00010137, 0x0001013f, - 0x00010179, 0x00010189, 0x0001018c, 0x0001018e, - 0x00010190, 0x0001019b, 0x000101a0, 0x000101a0, - 0x000101d0, 0x000101fc, 0x00010877, 0x00010878, - 0x00010ac8, 0x00010ac8, 0x0001173f, 0x0001173f, - 0x00016b3c, 0x00016b3f, 0x00016b45, 0x00016b45, - 0x0001bc9c, 0x0001bc9c, 0x0001d000, 0x0001d0f5, - 0x0001d100, 0x0001d126, 0x0001d129, 0x0001d164, - 0x0001d16a, 0x0001d16c, 0x0001d183, 0x0001d184, - 0x0001d18c, 0x0001d1a9, 0x0001d1ae, 0x0001d1e8, - 0x0001d200, 0x0001d241, 0x0001d245, 0x0001d245, - 0x0001d300, 0x0001d356, 0x0001d800, 0x0001d9ff, - 0x0001da37, 0x0001da3a, 0x0001da6d, 0x0001da74, - 0x0001da76, 0x0001da83, 0x0001da85, 0x0001da86, - 0x0001ecac, 0x0001ecac, 0x0001f000, 0x0001f02b, - 0x0001f030, 0x0001f093, 0x0001f0a0, 0x0001f0ae, - 0x0001f0b1, 0x0001f0bf, 0x0001f0c1, 0x0001f0cf, - 0x0001f0d1, 0x0001f0f5, 0x0001f110, 0x0001f16b, - 0x0001f170, 0x0001f1ac, 0x0001f1e6, 0x0001f202, + 0x000032c0, 0x000033ff, 0x00004dc0, 0x00004dff, + 0x0000a490, 0x0000a4c6, 0x0000a828, 0x0000a82b, + 0x0000a836, 0x0000a837, 0x0000a839, 0x0000a839, + 0x0000aa77, 0x0000aa79, 0x0000fdfd, 0x0000fdfd, + 0x0000ffe4, 0x0000ffe4, 0x0000ffe8, 0x0000ffe8, + 0x0000ffed, 0x0000ffee, 0x0000fffc, 0x0000fffd, + 0x00010137, 0x0001013f, 0x00010179, 0x00010189, + 0x0001018c, 0x0001018e, 0x00010190, 0x0001019c, + 0x000101a0, 0x000101a0, 0x000101d0, 0x000101fc, + 0x00010877, 0x00010878, 0x00010ac8, 0x00010ac8, + 0x0001173f, 0x0001173f, 0x00011fd5, 0x00011fdc, + 0x00011fe1, 0x00011ff1, 0x00016b3c, 0x00016b3f, + 0x00016b45, 0x00016b45, 0x0001bc9c, 0x0001bc9c, + 0x0001d000, 0x0001d0f5, 0x0001d100, 0x0001d126, + 0x0001d129, 0x0001d164, 0x0001d16a, 0x0001d16c, + 0x0001d183, 0x0001d184, 0x0001d18c, 0x0001d1a9, + 0x0001d1ae, 0x0001d1e8, 0x0001d200, 0x0001d241, + 0x0001d245, 0x0001d245, 0x0001d300, 0x0001d356, + 0x0001d800, 0x0001d9ff, 0x0001da37, 0x0001da3a, + 0x0001da6d, 0x0001da74, 0x0001da76, 0x0001da83, + 0x0001da85, 0x0001da86, 0x0001e14f, 0x0001e14f, + 0x0001ecac, 0x0001ecac, 0x0001ed2e, 0x0001ed2e, + 0x0001f000, 0x0001f02b, 0x0001f030, 0x0001f093, + 0x0001f0a0, 0x0001f0ae, 0x0001f0b1, 0x0001f0bf, + 0x0001f0c1, 0x0001f0cf, 0x0001f0d1, 0x0001f0f5, + 0x0001f10d, 0x0001f1ad, 0x0001f1e6, 0x0001f202, 0x0001f210, 0x0001f23b, 0x0001f240, 0x0001f248, 0x0001f250, 0x0001f251, 0x0001f260, 0x0001f265, - 0x0001f300, 0x0001f3fa, 0x0001f400, 0x0001f6d4, - 0x0001f6e0, 0x0001f6ec, 0x0001f6f0, 0x0001f6f9, + 0x0001f300, 0x0001f3fa, 0x0001f400, 0x0001f6d7, + 0x0001f6e0, 0x0001f6ec, 0x0001f6f0, 0x0001f6fc, 0x0001f700, 0x0001f773, 0x0001f780, 0x0001f7d8, - 0x0001f800, 0x0001f80b, 0x0001f810, 0x0001f847, - 0x0001f850, 0x0001f859, 0x0001f860, 0x0001f887, - 0x0001f890, 0x0001f8ad, 0x0001f900, 0x0001f90b, - 0x0001f910, 0x0001f93e, 0x0001f940, 0x0001f970, - 0x0001f973, 0x0001f976, 0x0001f97a, 0x0001f97a, - 0x0001f97c, 0x0001f9a2, 0x0001f9b0, 0x0001f9b9, - 0x0001f9c0, 0x0001f9c2, 0x0001f9d0, 0x0001f9ff, - 0x0001fa60, 0x0001fa6d, 0x00000041, 0x0000005a, - 0x00000061, 0x0000007a, 0x000000aa, 0x000000aa, - 0x000000b5, 0x000000b5, 0x000000ba, 0x000000ba, - 0x000000c0, 0x000000d6, 0x000000d8, 0x000000f6, - 0x000000f8, 0x000002b8, 0x000002bb, 0x000002c1, - 0x000002d0, 0x000002d1, 0x000002e0, 0x000002e4, - 0x000002ee, 0x000002ee, 0x00000370, 0x00000373, - 0x00000376, 0x00000377, 0x0000037a, 0x0000037d, - 0x0000037f, 0x0000037f, 0x00000386, 0x00000386, - 0x00000388, 0x0000038a, 0x0000038c, 0x0000038c, - 0x0000038e, 0x000003a1, 0x000003a3, 0x000003f5, - 0x000003f7, 0x00000482, 0x0000048a, 0x0000052f, - 0x00000531, 0x00000556, 0x00000559, 0x00000589, - 0x00000903, 0x00000939, 0x0000093b, 0x0000093b, - 0x0000093d, 0x00000940, 0x00000949, 0x0000094c, - 0x0000094e, 0x00000950, 0x00000958, 0x00000961, - 0x00000964, 0x00000980, 0x00000982, 0x00000983, - 0x00000985, 0x0000098c, 0x0000098f, 0x00000990, - 0x00000993, 0x000009a8, 0x000009aa, 0x000009b0, - 0x000009b2, 0x000009b2, 0x000009b6, 0x000009b9, - 0x000009bd, 0x000009c0, 0x000009c7, 0x000009c8, - 0x000009cb, 0x000009cc, 0x000009ce, 0x000009ce, - 0x000009d7, 0x000009d7, 0x000009dc, 0x000009dd, - 0x000009df, 0x000009e1, 0x000009e6, 0x000009f1, - 0x000009f4, 0x000009fa, 0x000009fc, 0x000009fd, - 0x00000a03, 0x00000a03, 0x00000a05, 0x00000a0a, - 0x00000a0f, 0x00000a10, 0x00000a13, 0x00000a28, - 0x00000a2a, 0x00000a30, 0x00000a32, 0x00000a33, - 0x00000a35, 0x00000a36, 0x00000a38, 0x00000a39, - 0x00000a3e, 0x00000a40, 0x00000a59, 0x00000a5c, - 0x00000a5e, 0x00000a5e, 0x00000a66, 0x00000a6f, - 0x00000a72, 0x00000a74, 0x00000a76, 0x00000a76, - 0x00000a83, 0x00000a83, 0x00000a85, 0x00000a8d, - 0x00000a8f, 0x00000a91, 0x00000a93, 0x00000aa8, - 0x00000aaa, 0x00000ab0, 0x00000ab2, 0x00000ab3, - 0x00000ab5, 0x00000ab9, 0x00000abd, 0x00000ac0, - 0x00000ac9, 0x00000ac9, 0x00000acb, 0x00000acc, - 0x00000ad0, 0x00000ad0, 0x00000ae0, 0x00000ae1, - 0x00000ae6, 0x00000af0, 0x00000af9, 0x00000af9, - 0x00000b02, 0x00000b03, 0x00000b05, 0x00000b0c, - 0x00000b0f, 0x00000b10, 0x00000b13, 0x00000b28, - 0x00000b2a, 0x00000b30, 0x00000b32, 0x00000b33, - 0x00000b35, 0x00000b39, 0x00000b3d, 0x00000b3e, - 0x00000b40, 0x00000b40, 0x00000b47, 0x00000b48, - 0x00000b4b, 0x00000b4c, 0x00000b57, 0x00000b57, - 0x00000b5c, 0x00000b5d, 0x00000b5f, 0x00000b61, - 0x00000b66, 0x00000b77, 0x00000b83, 0x00000b83, - 0x00000b85, 0x00000b8a, 0x00000b8e, 0x00000b90, - 0x00000b92, 0x00000b95, 0x00000b99, 0x00000b9a, - 0x00000b9c, 0x00000b9c, 0x00000b9e, 0x00000b9f, - 0x00000ba3, 0x00000ba4, 0x00000ba8, 0x00000baa, - 0x00000bae, 0x00000bb9, 0x00000bbe, 0x00000bbf, - 0x00000bc1, 0x00000bc2, 0x00000bc6, 0x00000bc8, - 0x00000bca, 0x00000bcc, 0x00000bd0, 0x00000bd0, - 0x00000bd7, 0x00000bd7, 0x00000be6, 0x00000bf2, - 0x00000c01, 0x00000c03, 0x00000c05, 0x00000c0c, - 0x00000c0e, 0x00000c10, 0x00000c12, 0x00000c28, - 0x00000c2a, 0x00000c39, 0x00000c3d, 0x00000c3d, - 0x00000c41, 0x00000c44, 0x00000c58, 0x00000c5a, - 0x00000c60, 0x00000c61, 0x00000c66, 0x00000c6f, + 0x0001f7e0, 0x0001f7eb, 0x0001f800, 0x0001f80b, + 0x0001f810, 0x0001f847, 0x0001f850, 0x0001f859, + 0x0001f860, 0x0001f887, 0x0001f890, 0x0001f8ad, + 0x0001f8b0, 0x0001f8b1, 0x0001f900, 0x0001f978, + 0x0001f97a, 0x0001f9cb, 0x0001f9cd, 0x0001fa53, + 0x0001fa60, 0x0001fa6d, 0x0001fa70, 0x0001fa74, + 0x0001fa78, 0x0001fa7a, 0x0001fa80, 0x0001fa86, + 0x0001fa90, 0x0001faa8, 0x0001fab0, 0x0001fab6, + 0x0001fac0, 0x0001fac2, 0x0001fad0, 0x0001fad6, + 0x0001fb00, 0x0001fb92, 0x0001fb94, 0x0001fbca, + 0x00000041, 0x0000005a, 0x00000061, 0x0000007a, + 0x000000aa, 0x000000aa, 0x000000b5, 0x000000b5, + 0x000000ba, 0x000000ba, 0x000000c0, 0x000000d6, + 0x000000d8, 0x000000f6, 0x000000f8, 0x000002b8, + 0x000002bb, 0x000002c1, 0x000002d0, 0x000002d1, + 0x000002e0, 0x000002e4, 0x000002ee, 0x000002ee, + 0x00000370, 0x00000373, 0x00000376, 0x00000377, + 0x0000037a, 0x0000037d, 0x0000037f, 0x0000037f, + 0x00000386, 0x00000386, 0x00000388, 0x0000038a, + 0x0000038c, 0x0000038c, 0x0000038e, 0x000003a1, + 0x000003a3, 0x000003f5, 0x000003f7, 0x00000482, + 0x0000048a, 0x0000052f, 0x00000531, 0x00000556, + 0x00000559, 0x00000589, 0x00000903, 0x00000939, + 0x0000093b, 0x0000093b, 0x0000093d, 0x00000940, + 0x00000949, 0x0000094c, 0x0000094e, 0x00000950, + 0x00000958, 0x00000961, 0x00000964, 0x00000980, + 0x00000982, 0x00000983, 0x00000985, 0x0000098c, + 0x0000098f, 0x00000990, 0x00000993, 0x000009a8, + 0x000009aa, 0x000009b0, 0x000009b2, 0x000009b2, + 0x000009b6, 0x000009b9, 0x000009bd, 0x000009c0, + 0x000009c7, 0x000009c8, 0x000009cb, 0x000009cc, + 0x000009ce, 0x000009ce, 0x000009d7, 0x000009d7, + 0x000009dc, 0x000009dd, 0x000009df, 0x000009e1, + 0x000009e6, 0x000009f1, 0x000009f4, 0x000009fa, + 0x000009fc, 0x000009fd, 0x00000a03, 0x00000a03, + 0x00000a05, 0x00000a0a, 0x00000a0f, 0x00000a10, + 0x00000a13, 0x00000a28, 0x00000a2a, 0x00000a30, + 0x00000a32, 0x00000a33, 0x00000a35, 0x00000a36, + 0x00000a38, 0x00000a39, 0x00000a3e, 0x00000a40, + 0x00000a59, 0x00000a5c, 0x00000a5e, 0x00000a5e, + 0x00000a66, 0x00000a6f, 0x00000a72, 0x00000a74, + 0x00000a76, 0x00000a76, 0x00000a83, 0x00000a83, + 0x00000a85, 0x00000a8d, 0x00000a8f, 0x00000a91, + 0x00000a93, 0x00000aa8, 0x00000aaa, 0x00000ab0, + 0x00000ab2, 0x00000ab3, 0x00000ab5, 0x00000ab9, + 0x00000abd, 0x00000ac0, 0x00000ac9, 0x00000ac9, + 0x00000acb, 0x00000acc, 0x00000ad0, 0x00000ad0, + 0x00000ae0, 0x00000ae1, 0x00000ae6, 0x00000af0, + 0x00000af9, 0x00000af9, 0x00000b02, 0x00000b03, + 0x00000b05, 0x00000b0c, 0x00000b0f, 0x00000b10, + 0x00000b13, 0x00000b28, 0x00000b2a, 0x00000b30, + 0x00000b32, 0x00000b33, 0x00000b35, 0x00000b39, + 0x00000b3d, 0x00000b3e, 0x00000b40, 0x00000b40, + 0x00000b47, 0x00000b48, 0x00000b4b, 0x00000b4c, + 0x00000b57, 0x00000b57, 0x00000b5c, 0x00000b5d, + 0x00000b5f, 0x00000b61, 0x00000b66, 0x00000b77, + 0x00000b83, 0x00000b83, 0x00000b85, 0x00000b8a, + 0x00000b8e, 0x00000b90, 0x00000b92, 0x00000b95, + 0x00000b99, 0x00000b9a, 0x00000b9c, 0x00000b9c, + 0x00000b9e, 0x00000b9f, 0x00000ba3, 0x00000ba4, + 0x00000ba8, 0x00000baa, 0x00000bae, 0x00000bb9, + 0x00000bbe, 0x00000bbf, 0x00000bc1, 0x00000bc2, + 0x00000bc6, 0x00000bc8, 0x00000bca, 0x00000bcc, + 0x00000bd0, 0x00000bd0, 0x00000bd7, 0x00000bd7, + 0x00000be6, 0x00000bf2, 0x00000c01, 0x00000c03, + 0x00000c05, 0x00000c0c, 0x00000c0e, 0x00000c10, + 0x00000c12, 0x00000c28, 0x00000c2a, 0x00000c39, + 0x00000c3d, 0x00000c3d, 0x00000c41, 0x00000c44, + 0x00000c58, 0x00000c5a, 0x00000c60, 0x00000c61, + 0x00000c66, 0x00000c6f, 0x00000c77, 0x00000c77, 0x00000c7f, 0x00000c80, 0x00000c82, 0x00000c8c, 0x00000c8e, 0x00000c90, 0x00000c92, 0x00000ca8, 0x00000caa, 0x00000cb3, 0x00000cb5, 0x00000cb9, @@ -1634,85 +1678,82 @@ static const unsigned int _ucprop_ranges[] = { 0x00000cca, 0x00000ccb, 0x00000cd5, 0x00000cd6, 0x00000cde, 0x00000cde, 0x00000ce0, 0x00000ce1, 0x00000ce6, 0x00000cef, 0x00000cf1, 0x00000cf2, - 0x00000d02, 0x00000d03, 0x00000d05, 0x00000d0c, - 0x00000d0e, 0x00000d10, 0x00000d12, 0x00000d3a, - 0x00000d3d, 0x00000d40, 0x00000d46, 0x00000d48, - 0x00000d4a, 0x00000d4c, 0x00000d4e, 0x00000d4f, - 0x00000d54, 0x00000d61, 0x00000d66, 0x00000d7f, - 0x00000d82, 0x00000d83, 0x00000d85, 0x00000d96, - 0x00000d9a, 0x00000db1, 0x00000db3, 0x00000dbb, - 0x00000dbd, 0x00000dbd, 0x00000dc0, 0x00000dc6, - 0x00000dcf, 0x00000dd1, 0x00000dd8, 0x00000ddf, - 0x00000de6, 0x00000def, 0x00000df2, 0x00000df4, - 0x00000e01, 0x00000e30, 0x00000e32, 0x00000e33, - 0x00000e40, 0x00000e46, 0x00000e4f, 0x00000e5b, - 0x00000e81, 0x00000e82, 0x00000e84, 0x00000e84, - 0x00000e87, 0x00000e88, 0x00000e8a, 0x00000e8a, - 0x00000e8d, 0x00000e8d, 0x00000e94, 0x00000e97, - 0x00000e99, 0x00000e9f, 0x00000ea1, 0x00000ea3, - 0x00000ea5, 0x00000ea5, 0x00000ea7, 0x00000ea7, - 0x00000eaa, 0x00000eab, 0x00000ead, 0x00000eb0, - 0x00000eb2, 0x00000eb3, 0x00000ebd, 0x00000ebd, - 0x00000ec0, 0x00000ec4, 0x00000ec6, 0x00000ec6, - 0x00000ed0, 0x00000ed9, 0x00000edc, 0x00000edf, - 0x00000f00, 0x00000f17, 0x00000f1a, 0x00000f34, - 0x00000f36, 0x00000f36, 0x00000f38, 0x00000f38, - 0x00000f3e, 0x00000f47, 0x00000f49, 0x00000f6c, - 0x00000f7f, 0x00000f7f, 0x00000f85, 0x00000f85, - 0x00000f88, 0x00000f8c, 0x00000fbe, 0x00000fc5, - 0x00000fc7, 0x00000fcc, 0x00000fce, 0x00000fda, - 0x00001000, 0x0000102c, 0x00001031, 0x00001031, - 0x00001038, 0x00001038, 0x0000103b, 0x0000103c, - 0x0000103f, 0x00001057, 0x0000105a, 0x0000105d, - 0x00001061, 0x00001070, 0x00001075, 0x00001081, - 0x00001083, 0x00001084, 0x00001087, 0x0000108c, - 0x0000108e, 0x0000109c, 0x0000109e, 0x000010c5, - 0x000010c7, 0x000010c7, 0x000010cd, 0x000010cd, - 0x000010d0, 0x00001248, 0x0000124a, 0x0000124d, - 0x00001250, 0x00001256, 0x00001258, 0x00001258, - 0x0000125a, 0x0000125d, 0x00001260, 0x00001288, - 0x0000128a, 0x0000128d, 0x00001290, 0x000012b0, - 0x000012b2, 0x000012b5, 0x000012b8, 0x000012be, - 0x000012c0, 0x000012c0, 0x000012c2, 0x000012c5, - 0x000012c8, 0x000012d6, 0x000012d8, 0x00001310, - 0x00001312, 0x00001315, 0x00001318, 0x0000135a, - 0x00001360, 0x0000137c, 0x00001380, 0x0000138f, - 0x000013a0, 0x000013f5, 0x000013f8, 0x000013fd, - 0x00001401, 0x0000167f, 0x00001681, 0x0000169a, - 0x000016a0, 0x000016f8, 0x00001700, 0x0000170c, - 0x0000170e, 0x00001711, 0x00001720, 0x00001731, - 0x00001735, 0x00001736, 0x00001740, 0x00001751, - 0x00001760, 0x0000176c, 0x0000176e, 0x00001770, - 0x00001780, 0x000017b3, 0x000017b6, 0x000017b6, - 0x000017be, 0x000017c5, 0x000017c7, 0x000017c8, - 0x000017d4, 0x000017da, 0x000017dc, 0x000017dc, - 0x000017e0, 0x000017e9, 0x00001810, 0x00001819, - 0x00001820, 0x00001878, 0x00001880, 0x00001884, - 0x00001887, 0x000018a8, 0x000018aa, 0x000018aa, - 0x000018b0, 0x000018f5, 0x00001900, 0x0000191e, - 0x00001923, 0x00001926, 0x00001929, 0x0000192b, - 0x00001930, 0x00001931, 0x00001933, 0x00001938, - 0x00001946, 0x0000196d, 0x00001970, 0x00001974, - 0x00001980, 0x000019ab, 0x000019b0, 0x000019c9, - 0x000019d0, 0x000019da, 0x00001a00, 0x00001a16, - 0x00001a19, 0x00001a1a, 0x00001a1e, 0x00001a55, - 0x00001a57, 0x00001a57, 0x00001a61, 0x00001a61, - 0x00001a63, 0x00001a64, 0x00001a6d, 0x00001a72, - 0x00001a80, 0x00001a89, 0x00001a90, 0x00001a99, - 0x00001aa0, 0x00001aad, 0x00001b04, 0x00001b33, - 0x00001b35, 0x00001b35, 0x00001b3b, 0x00001b3b, - 0x00001b3d, 0x00001b41, 0x00001b43, 0x00001b4b, - 0x00001b50, 0x00001b6a, 0x00001b74, 0x00001b7c, - 0x00001b82, 0x00001ba1, 0x00001ba6, 0x00001ba7, - 0x00001baa, 0x00001baa, 0x00001bae, 0x00001be5, - 0x00001be7, 0x00001be7, 0x00001bea, 0x00001bec, - 0x00001bee, 0x00001bee, 0x00001bf2, 0x00001bf3, - 0x00001bfc, 0x00001c2b, 0x00001c34, 0x00001c35, - 0x00001c3b, 0x00001c49, 0x00001c4d, 0x00001c88, - 0x00001c90, 0x00001cba, 0x00001cbd, 0x00001cc7, - 0x00001cd3, 0x00001cd3, 0x00001ce1, 0x00001ce1, - 0x00001ce9, 0x00001cec, 0x00001cee, 0x00001cf3, - 0x00001cf5, 0x00001cf7, 0x00001d00, 0x00001dbf, + 0x00000d02, 0x00000d0c, 0x00000d0e, 0x00000d10, + 0x00000d12, 0x00000d3a, 0x00000d3d, 0x00000d40, + 0x00000d46, 0x00000d48, 0x00000d4a, 0x00000d4c, + 0x00000d4e, 0x00000d4f, 0x00000d54, 0x00000d61, + 0x00000d66, 0x00000d7f, 0x00000d82, 0x00000d83, + 0x00000d85, 0x00000d96, 0x00000d9a, 0x00000db1, + 0x00000db3, 0x00000dbb, 0x00000dbd, 0x00000dbd, + 0x00000dc0, 0x00000dc6, 0x00000dcf, 0x00000dd1, + 0x00000dd8, 0x00000ddf, 0x00000de6, 0x00000def, + 0x00000df2, 0x00000df4, 0x00000e01, 0x00000e30, + 0x00000e32, 0x00000e33, 0x00000e40, 0x00000e46, + 0x00000e4f, 0x00000e5b, 0x00000e81, 0x00000e82, + 0x00000e84, 0x00000e84, 0x00000e86, 0x00000e8a, + 0x00000e8c, 0x00000ea3, 0x00000ea5, 0x00000ea5, + 0x00000ea7, 0x00000eb0, 0x00000eb2, 0x00000eb3, + 0x00000ebd, 0x00000ebd, 0x00000ec0, 0x00000ec4, + 0x00000ec6, 0x00000ec6, 0x00000ed0, 0x00000ed9, + 0x00000edc, 0x00000edf, 0x00000f00, 0x00000f17, + 0x00000f1a, 0x00000f34, 0x00000f36, 0x00000f36, + 0x00000f38, 0x00000f38, 0x00000f3e, 0x00000f47, + 0x00000f49, 0x00000f6c, 0x00000f7f, 0x00000f7f, + 0x00000f85, 0x00000f85, 0x00000f88, 0x00000f8c, + 0x00000fbe, 0x00000fc5, 0x00000fc7, 0x00000fcc, + 0x00000fce, 0x00000fda, 0x00001000, 0x0000102c, + 0x00001031, 0x00001031, 0x00001038, 0x00001038, + 0x0000103b, 0x0000103c, 0x0000103f, 0x00001057, + 0x0000105a, 0x0000105d, 0x00001061, 0x00001070, + 0x00001075, 0x00001081, 0x00001083, 0x00001084, + 0x00001087, 0x0000108c, 0x0000108e, 0x0000109c, + 0x0000109e, 0x000010c5, 0x000010c7, 0x000010c7, + 0x000010cd, 0x000010cd, 0x000010d0, 0x00001248, + 0x0000124a, 0x0000124d, 0x00001250, 0x00001256, + 0x00001258, 0x00001258, 0x0000125a, 0x0000125d, + 0x00001260, 0x00001288, 0x0000128a, 0x0000128d, + 0x00001290, 0x000012b0, 0x000012b2, 0x000012b5, + 0x000012b8, 0x000012be, 0x000012c0, 0x000012c0, + 0x000012c2, 0x000012c5, 0x000012c8, 0x000012d6, + 0x000012d8, 0x00001310, 0x00001312, 0x00001315, + 0x00001318, 0x0000135a, 0x00001360, 0x0000137c, + 0x00001380, 0x0000138f, 0x000013a0, 0x000013f5, + 0x000013f8, 0x000013fd, 0x00001401, 0x0000167f, + 0x00001681, 0x0000169a, 0x000016a0, 0x000016f8, + 0x00001700, 0x0000170c, 0x0000170e, 0x00001711, + 0x00001720, 0x00001731, 0x00001735, 0x00001736, + 0x00001740, 0x00001751, 0x00001760, 0x0000176c, + 0x0000176e, 0x00001770, 0x00001780, 0x000017b3, + 0x000017b6, 0x000017b6, 0x000017be, 0x000017c5, + 0x000017c7, 0x000017c8, 0x000017d4, 0x000017da, + 0x000017dc, 0x000017dc, 0x000017e0, 0x000017e9, + 0x00001810, 0x00001819, 0x00001820, 0x00001878, + 0x00001880, 0x00001884, 0x00001887, 0x000018a8, + 0x000018aa, 0x000018aa, 0x000018b0, 0x000018f5, + 0x00001900, 0x0000191e, 0x00001923, 0x00001926, + 0x00001929, 0x0000192b, 0x00001930, 0x00001931, + 0x00001933, 0x00001938, 0x00001946, 0x0000196d, + 0x00001970, 0x00001974, 0x00001980, 0x000019ab, + 0x000019b0, 0x000019c9, 0x000019d0, 0x000019da, + 0x00001a00, 0x00001a16, 0x00001a19, 0x00001a1a, + 0x00001a1e, 0x00001a55, 0x00001a57, 0x00001a57, + 0x00001a61, 0x00001a61, 0x00001a63, 0x00001a64, + 0x00001a6d, 0x00001a72, 0x00001a80, 0x00001a89, + 0x00001a90, 0x00001a99, 0x00001aa0, 0x00001aad, + 0x00001b04, 0x00001b33, 0x00001b35, 0x00001b35, + 0x00001b3b, 0x00001b3b, 0x00001b3d, 0x00001b41, + 0x00001b43, 0x00001b4b, 0x00001b50, 0x00001b6a, + 0x00001b74, 0x00001b7c, 0x00001b82, 0x00001ba1, + 0x00001ba6, 0x00001ba7, 0x00001baa, 0x00001baa, + 0x00001bae, 0x00001be5, 0x00001be7, 0x00001be7, + 0x00001bea, 0x00001bec, 0x00001bee, 0x00001bee, + 0x00001bf2, 0x00001bf3, 0x00001bfc, 0x00001c2b, + 0x00001c34, 0x00001c35, 0x00001c3b, 0x00001c49, + 0x00001c4d, 0x00001c88, 0x00001c90, 0x00001cba, + 0x00001cbd, 0x00001cc7, 0x00001cd3, 0x00001cd3, + 0x00001ce1, 0x00001ce1, 0x00001ce9, 0x00001cec, + 0x00001cee, 0x00001cf3, 0x00001cf5, 0x00001cf7, + 0x00001cfa, 0x00001cfa, 0x00001d00, 0x00001dbf, 0x00001e00, 0x00001f15, 0x00001f18, 0x00001f1d, 0x00001f20, 0x00001f45, 0x00001f48, 0x00001f4d, 0x00001f50, 0x00001f57, 0x00001f59, 0x00001f59, @@ -1749,17 +1790,17 @@ static const unsigned int _ucprop_ranges[] = { 0x00003041, 0x00003096, 0x0000309d, 0x0000309f, 0x000030a1, 0x000030fa, 0x000030fc, 0x000030ff, 0x00003105, 0x0000312f, 0x00003131, 0x0000318e, - 0x00003190, 0x000031ba, 0x000031f0, 0x0000321c, + 0x00003190, 0x000031bf, 0x000031f0, 0x0000321c, 0x00003220, 0x0000324f, 0x00003260, 0x0000327b, 0x0000327f, 0x000032b0, 0x000032c0, 0x000032cb, - 0x000032d0, 0x000032fe, 0x00003300, 0x00003376, - 0x0000337b, 0x000033dd, 0x000033e0, 0x000033fe, - 0x00003400, 0x00004db5, 0x00004e00, 0x00009fef, - 0x0000a000, 0x0000a48c, 0x0000a4d0, 0x0000a60c, - 0x0000a610, 0x0000a62b, 0x0000a640, 0x0000a66e, - 0x0000a680, 0x0000a69d, 0x0000a6a0, 0x0000a6ef, - 0x0000a6f2, 0x0000a6f7, 0x0000a722, 0x0000a787, - 0x0000a789, 0x0000a7b9, 0x0000a7f7, 0x0000a801, + 0x000032d0, 0x00003376, 0x0000337b, 0x000033dd, + 0x000033e0, 0x000033fe, 0x00003400, 0x00004dbf, + 0x00004e00, 0x00009ffc, 0x0000a000, 0x0000a48c, + 0x0000a4d0, 0x0000a60c, 0x0000a610, 0x0000a62b, + 0x0000a640, 0x0000a66e, 0x0000a680, 0x0000a69d, + 0x0000a6a0, 0x0000a6ef, 0x0000a6f2, 0x0000a6f7, + 0x0000a722, 0x0000a787, 0x0000a789, 0x0000a7bf, + 0x0000a7c2, 0x0000a7ca, 0x0000a7f5, 0x0000a801, 0x0000a803, 0x0000a805, 0x0000a807, 0x0000a80a, 0x0000a80c, 0x0000a824, 0x0000a827, 0x0000a827, 0x0000a830, 0x0000a837, 0x0000a840, 0x0000a873, @@ -1768,7 +1809,7 @@ static const unsigned int _ucprop_ranges[] = { 0x0000a92e, 0x0000a946, 0x0000a952, 0x0000a953, 0x0000a95f, 0x0000a97c, 0x0000a983, 0x0000a9b2, 0x0000a9b4, 0x0000a9b5, 0x0000a9ba, 0x0000a9bb, - 0x0000a9bd, 0x0000a9cd, 0x0000a9cf, 0x0000a9d9, + 0x0000a9be, 0x0000a9cd, 0x0000a9cf, 0x0000a9d9, 0x0000a9de, 0x0000a9e4, 0x0000a9e6, 0x0000a9fe, 0x0000aa00, 0x0000aa28, 0x0000aa2f, 0x0000aa30, 0x0000aa33, 0x0000aa34, 0x0000aa40, 0x0000aa42, @@ -1780,7 +1821,7 @@ static const unsigned int _ucprop_ranges[] = { 0x0000aadb, 0x0000aaeb, 0x0000aaee, 0x0000aaf5, 0x0000ab01, 0x0000ab06, 0x0000ab09, 0x0000ab0e, 0x0000ab11, 0x0000ab16, 0x0000ab20, 0x0000ab26, - 0x0000ab28, 0x0000ab2e, 0x0000ab30, 0x0000ab65, + 0x0000ab28, 0x0000ab2e, 0x0000ab30, 0x0000ab69, 0x0000ab70, 0x0000abe4, 0x0000abe6, 0x0000abe7, 0x0000abe9, 0x0000abec, 0x0000abf0, 0x0000abf9, 0x0000ac00, 0x0000d7a3, 0x0000d7b0, 0x0000d7c6, @@ -1811,10 +1852,10 @@ static const unsigned int _ucprop_ranges[] = { 0x000110b7, 0x000110b8, 0x000110bb, 0x000110c1, 0x000110cd, 0x000110cd, 0x000110d0, 0x000110e8, 0x000110f0, 0x000110f9, 0x00011103, 0x00011126, - 0x0001112c, 0x0001112c, 0x00011136, 0x00011146, + 0x0001112c, 0x0001112c, 0x00011136, 0x00011147, 0x00011150, 0x00011172, 0x00011174, 0x00011176, 0x00011182, 0x000111b5, 0x000111bf, 0x000111c8, - 0x000111cd, 0x000111cd, 0x000111d0, 0x000111df, + 0x000111cd, 0x000111ce, 0x000111d0, 0x000111df, 0x000111e1, 0x000111f4, 0x00011200, 0x00011211, 0x00011213, 0x0001122e, 0x00011232, 0x00011233, 0x00011235, 0x00011235, 0x00011238, 0x0001123d, @@ -1830,8 +1871,8 @@ static const unsigned int _ucprop_ranges[] = { 0x0001134b, 0x0001134d, 0x00011350, 0x00011350, 0x00011357, 0x00011357, 0x0001135d, 0x00011363, 0x00011400, 0x00011437, 0x00011440, 0x00011441, - 0x00011445, 0x00011445, 0x00011447, 0x00011459, - 0x0001145b, 0x0001145b, 0x0001145d, 0x0001145d, + 0x00011445, 0x00011445, 0x00011447, 0x0001145b, + 0x0001145d, 0x0001145d, 0x0001145f, 0x00011461, 0x00011480, 0x000114b2, 0x000114b9, 0x000114b9, 0x000114bb, 0x000114be, 0x000114c1, 0x000114c1, 0x000114c4, 0x000114c7, 0x000114d0, 0x000114d9, @@ -1841,31 +1882,39 @@ static const unsigned int _ucprop_ranges[] = { 0x0001163e, 0x0001163e, 0x00011641, 0x00011644, 0x00011650, 0x00011659, 0x00011680, 0x000116aa, 0x000116ac, 0x000116ac, 0x000116ae, 0x000116af, - 0x000116b6, 0x000116b6, 0x000116c0, 0x000116c9, - 0x00011700, 0x0001171a, 0x00011720, 0x00011721, - 0x00011726, 0x00011726, 0x00011730, 0x0001173f, - 0x00011800, 0x0001182e, 0x00011838, 0x00011838, - 0x0001183b, 0x0001183b, 0x000118a0, 0x000118f2, - 0x000118ff, 0x000118ff, 0x00011a00, 0x00011a00, + 0x000116b6, 0x000116b6, 0x000116b8, 0x000116b8, + 0x000116c0, 0x000116c9, 0x00011700, 0x0001171a, + 0x00011720, 0x00011721, 0x00011726, 0x00011726, + 0x00011730, 0x0001173f, 0x00011800, 0x0001182e, + 0x00011838, 0x00011838, 0x0001183b, 0x0001183b, + 0x000118a0, 0x000118f2, 0x000118ff, 0x00011906, + 0x00011909, 0x00011909, 0x0001190c, 0x00011913, + 0x00011915, 0x00011916, 0x00011918, 0x00011935, + 0x00011937, 0x00011938, 0x0001193d, 0x0001193d, + 0x0001193f, 0x00011942, 0x00011944, 0x00011946, + 0x00011950, 0x00011959, 0x000119a0, 0x000119a7, + 0x000119aa, 0x000119d3, 0x000119dc, 0x000119df, + 0x000119e1, 0x000119e4, 0x00011a00, 0x00011a00, 0x00011a07, 0x00011a08, 0x00011a0b, 0x00011a32, 0x00011a39, 0x00011a3a, 0x00011a3f, 0x00011a46, 0x00011a50, 0x00011a50, 0x00011a57, 0x00011a58, - 0x00011a5c, 0x00011a83, 0x00011a86, 0x00011a89, - 0x00011a97, 0x00011a97, 0x00011a9a, 0x00011aa2, - 0x00011ac0, 0x00011af8, 0x00011c00, 0x00011c08, - 0x00011c0a, 0x00011c2f, 0x00011c3e, 0x00011c45, - 0x00011c50, 0x00011c6c, 0x00011c70, 0x00011c8f, - 0x00011ca9, 0x00011ca9, 0x00011cb1, 0x00011cb1, - 0x00011cb4, 0x00011cb4, 0x00011d00, 0x00011d06, - 0x00011d08, 0x00011d09, 0x00011d0b, 0x00011d30, - 0x00011d46, 0x00011d46, 0x00011d50, 0x00011d59, - 0x00011d60, 0x00011d65, 0x00011d67, 0x00011d68, - 0x00011d6a, 0x00011d8e, 0x00011d93, 0x00011d94, - 0x00011d96, 0x00011d96, 0x00011d98, 0x00011d98, - 0x00011da0, 0x00011da9, 0x00011ee0, 0x00011ef2, - 0x00011ef5, 0x00011ef8, 0x00012000, 0x00012399, - 0x00012400, 0x0001246e, 0x00012470, 0x00012474, - 0x00012480, 0x00012543, 0x00013000, 0x0001342e, + 0x00011a5c, 0x00011a89, 0x00011a97, 0x00011a97, + 0x00011a9a, 0x00011aa2, 0x00011ac0, 0x00011af8, + 0x00011c00, 0x00011c08, 0x00011c0a, 0x00011c2f, + 0x00011c3e, 0x00011c45, 0x00011c50, 0x00011c6c, + 0x00011c70, 0x00011c8f, 0x00011ca9, 0x00011ca9, + 0x00011cb1, 0x00011cb1, 0x00011cb4, 0x00011cb4, + 0x00011d00, 0x00011d06, 0x00011d08, 0x00011d09, + 0x00011d0b, 0x00011d30, 0x00011d46, 0x00011d46, + 0x00011d50, 0x00011d59, 0x00011d60, 0x00011d65, + 0x00011d67, 0x00011d68, 0x00011d6a, 0x00011d8e, + 0x00011d93, 0x00011d94, 0x00011d96, 0x00011d96, + 0x00011d98, 0x00011d98, 0x00011da0, 0x00011da9, + 0x00011ee0, 0x00011ef2, 0x00011ef5, 0x00011ef8, + 0x00011fb0, 0x00011fb0, 0x00011fc0, 0x00011fd4, + 0x00011fff, 0x00012399, 0x00012400, 0x0001246e, + 0x00012470, 0x00012474, 0x00012480, 0x00012543, + 0x00013000, 0x0001342e, 0x00013430, 0x00013438, 0x00014400, 0x00014646, 0x00016800, 0x00016a38, 0x00016a40, 0x00016a5e, 0x00016a60, 0x00016a69, 0x00016a6e, 0x00016a6f, 0x00016ad0, 0x00016aed, @@ -1873,39 +1922,45 @@ static const unsigned int _ucprop_ranges[] = { 0x00016b37, 0x00016b45, 0x00016b50, 0x00016b59, 0x00016b5b, 0x00016b61, 0x00016b63, 0x00016b77, 0x00016b7d, 0x00016b8f, 0x00016e40, 0x00016e9a, - 0x00016f00, 0x00016f44, 0x00016f50, 0x00016f7e, + 0x00016f00, 0x00016f4a, 0x00016f50, 0x00016f87, 0x00016f93, 0x00016f9f, 0x00016fe0, 0x00016fe1, - 0x00017000, 0x000187f1, 0x00018800, 0x00018af2, - 0x0001b000, 0x0001b11e, 0x0001b170, 0x0001b2fb, - 0x0001bc00, 0x0001bc6a, 0x0001bc70, 0x0001bc7c, - 0x0001bc80, 0x0001bc88, 0x0001bc90, 0x0001bc99, - 0x0001bc9c, 0x0001bc9c, 0x0001bc9f, 0x0001bc9f, - 0x0001d000, 0x0001d0f5, 0x0001d100, 0x0001d126, - 0x0001d129, 0x0001d166, 0x0001d16a, 0x0001d172, - 0x0001d183, 0x0001d184, 0x0001d18c, 0x0001d1a9, - 0x0001d1ae, 0x0001d1e8, 0x0001d2e0, 0x0001d2f3, - 0x0001d360, 0x0001d378, 0x0001d400, 0x0001d454, - 0x0001d456, 0x0001d49c, 0x0001d49e, 0x0001d49f, - 0x0001d4a2, 0x0001d4a2, 0x0001d4a5, 0x0001d4a6, - 0x0001d4a9, 0x0001d4ac, 0x0001d4ae, 0x0001d4b9, - 0x0001d4bb, 0x0001d4bb, 0x0001d4bd, 0x0001d4c3, - 0x0001d4c5, 0x0001d505, 0x0001d507, 0x0001d50a, - 0x0001d50d, 0x0001d514, 0x0001d516, 0x0001d51c, - 0x0001d51e, 0x0001d539, 0x0001d53b, 0x0001d53e, - 0x0001d540, 0x0001d544, 0x0001d546, 0x0001d546, - 0x0001d54a, 0x0001d550, 0x0001d552, 0x0001d6a5, - 0x0001d6a8, 0x0001d6da, 0x0001d6dc, 0x0001d714, - 0x0001d716, 0x0001d74e, 0x0001d750, 0x0001d788, - 0x0001d78a, 0x0001d7c2, 0x0001d7c4, 0x0001d7cb, - 0x0001d800, 0x0001d9ff, 0x0001da37, 0x0001da3a, - 0x0001da6d, 0x0001da74, 0x0001da76, 0x0001da83, - 0x0001da85, 0x0001da8b, 0x0001f110, 0x0001f12e, - 0x0001f130, 0x0001f169, 0x0001f170, 0x0001f1ac, - 0x0001f1e6, 0x0001f202, 0x0001f210, 0x0001f23b, - 0x0001f240, 0x0001f248, 0x0001f250, 0x0001f251, - 0x00020000, 0x0002a6d6, 0x0002a700, 0x0002b734, - 0x0002b740, 0x0002b81d, 0x0002b820, 0x0002cea1, - 0x0002ceb0, 0x0002ebe0, 0x0002f800, 0x0002fa1d, + 0x00016fe3, 0x00016fe3, 0x00016ff0, 0x00016ff1, + 0x00017000, 0x000187f7, 0x00018800, 0x00018cd5, + 0x00018d00, 0x00018d08, 0x0001b000, 0x0001b11e, + 0x0001b150, 0x0001b152, 0x0001b164, 0x0001b167, + 0x0001b170, 0x0001b2fb, 0x0001bc00, 0x0001bc6a, + 0x0001bc70, 0x0001bc7c, 0x0001bc80, 0x0001bc88, + 0x0001bc90, 0x0001bc99, 0x0001bc9c, 0x0001bc9c, + 0x0001bc9f, 0x0001bc9f, 0x0001d000, 0x0001d0f5, + 0x0001d100, 0x0001d126, 0x0001d129, 0x0001d166, + 0x0001d16a, 0x0001d172, 0x0001d183, 0x0001d184, + 0x0001d18c, 0x0001d1a9, 0x0001d1ae, 0x0001d1e8, + 0x0001d2e0, 0x0001d2f3, 0x0001d360, 0x0001d378, + 0x0001d400, 0x0001d454, 0x0001d456, 0x0001d49c, + 0x0001d49e, 0x0001d49f, 0x0001d4a2, 0x0001d4a2, + 0x0001d4a5, 0x0001d4a6, 0x0001d4a9, 0x0001d4ac, + 0x0001d4ae, 0x0001d4b9, 0x0001d4bb, 0x0001d4bb, + 0x0001d4bd, 0x0001d4c3, 0x0001d4c5, 0x0001d505, + 0x0001d507, 0x0001d50a, 0x0001d50d, 0x0001d514, + 0x0001d516, 0x0001d51c, 0x0001d51e, 0x0001d539, + 0x0001d53b, 0x0001d53e, 0x0001d540, 0x0001d544, + 0x0001d546, 0x0001d546, 0x0001d54a, 0x0001d550, + 0x0001d552, 0x0001d6a5, 0x0001d6a8, 0x0001d6da, + 0x0001d6dc, 0x0001d714, 0x0001d716, 0x0001d74e, + 0x0001d750, 0x0001d788, 0x0001d78a, 0x0001d7c2, + 0x0001d7c4, 0x0001d7cb, 0x0001d800, 0x0001d9ff, + 0x0001da37, 0x0001da3a, 0x0001da6d, 0x0001da74, + 0x0001da76, 0x0001da83, 0x0001da85, 0x0001da8b, + 0x0001e100, 0x0001e12c, 0x0001e137, 0x0001e13d, + 0x0001e140, 0x0001e149, 0x0001e14e, 0x0001e14f, + 0x0001e2c0, 0x0001e2eb, 0x0001e2f0, 0x0001e2f9, + 0x0001f110, 0x0001f12e, 0x0001f130, 0x0001f169, + 0x0001f170, 0x0001f1ac, 0x0001f1e6, 0x0001f202, + 0x0001f210, 0x0001f23b, 0x0001f240, 0x0001f248, + 0x0001f250, 0x0001f251, 0x00020000, 0x0002a6dd, + 0x0002a700, 0x0002b734, 0x0002b740, 0x0002b81d, + 0x0002b820, 0x0002cea1, 0x0002ceb0, 0x0002ebe0, + 0x0002f800, 0x0002fa1d, 0x00030000, 0x0003134a, 0x000f0000, 0x000ffffd, 0x00100000, 0x0010fffd, 0x000005be, 0x000005be, 0x000005c0, 0x000005c0, 0x000005c3, 0x000005c3, 0x000005c6, 0x000005c6, @@ -1936,172 +1991,176 @@ static const unsigned int _ucprop_ranges[] = { 0x00010b78, 0x00010b91, 0x00010b99, 0x00010b9c, 0x00010ba9, 0x00010baf, 0x00010c00, 0x00010c48, 0x00010c80, 0x00010cb2, 0x00010cc0, 0x00010cf2, - 0x00010cfa, 0x00010cff, 0x00010f00, 0x00010f27, - 0x0001e800, 0x0001e8c4, 0x0001e8c7, 0x0001e8cf, - 0x0001e900, 0x0001e943, 0x0001e950, 0x0001e959, + 0x00010cfa, 0x00010cff, 0x00010e80, 0x00010ea9, + 0x00010ead, 0x00010ead, 0x00010eb0, 0x00010eb1, + 0x00010f00, 0x00010f27, 0x00010fb0, 0x00010fcb, + 0x00010fe0, 0x00010ff6, 0x0001e800, 0x0001e8c4, + 0x0001e8c7, 0x0001e8cf, 0x0001e900, 0x0001e943, + 0x0001e94b, 0x0001e94b, 0x0001e950, 0x0001e959, 0x0001e95e, 0x0001e95f, 0x00000030, 0x00000039, 0x000000b2, 0x000000b3, 0x000000b9, 0x000000b9, 0x000006f0, 0x000006f9, 0x00002070, 0x00002070, 0x00002074, 0x00002079, 0x00002080, 0x00002089, 0x00002488, 0x0000249b, 0x0000ff10, 0x0000ff19, 0x000102e1, 0x000102fb, 0x0001d7ce, 0x0001d7ff, - 0x0001f100, 0x0001f10a, 0x0000002b, 0x0000002b, - 0x0000002d, 0x0000002d, 0x0000207a, 0x0000207b, - 0x0000208a, 0x0000208b, 0x00002212, 0x00002212, - 0x0000fb29, 0x0000fb29, 0x0000fe62, 0x0000fe63, - 0x0000ff0b, 0x0000ff0b, 0x0000ff0d, 0x0000ff0d, - 0x00000023, 0x00000025, 0x000000a2, 0x000000a5, - 0x000000b0, 0x000000b1, 0x0000058f, 0x0000058f, - 0x00000609, 0x0000060a, 0x0000066a, 0x0000066a, - 0x000009f2, 0x000009f3, 0x000009fb, 0x000009fb, - 0x00000af1, 0x00000af1, 0x00000bf9, 0x00000bf9, - 0x00000e3f, 0x00000e3f, 0x000017db, 0x000017db, - 0x00002030, 0x00002034, 0x000020a0, 0x000020bf, - 0x0000212e, 0x0000212e, 0x00002213, 0x00002213, - 0x0000a838, 0x0000a839, 0x0000fe5f, 0x0000fe5f, - 0x0000fe69, 0x0000fe6a, 0x0000ff03, 0x0000ff05, - 0x0000ffe0, 0x0000ffe1, 0x0000ffe5, 0x0000ffe6, - 0x00000600, 0x00000605, 0x00000660, 0x00000669, - 0x0000066b, 0x0000066c, 0x000006dd, 0x000006dd, - 0x000008e2, 0x000008e2, 0x00010d30, 0x00010d39, - 0x00010e60, 0x00010e7e, 0x0000002c, 0x0000002c, - 0x0000002e, 0x0000002f, 0x0000003a, 0x0000003a, - 0x000000a0, 0x000000a0, 0x0000060c, 0x0000060c, - 0x0000202f, 0x0000202f, 0x00002044, 0x00002044, - 0x0000fe50, 0x0000fe50, 0x0000fe52, 0x0000fe52, - 0x0000fe55, 0x0000fe55, 0x0000ff0c, 0x0000ff0c, - 0x0000ff0e, 0x0000ff0f, 0x0000ff1a, 0x0000ff1a, - 0x0000000a, 0x0000000a, 0x0000000d, 0x0000000d, - 0x0000001c, 0x0000001e, 0x00000085, 0x00000085, - 0x00002029, 0x00002029, 0x00000009, 0x00000009, - 0x0000000b, 0x0000000b, 0x0000001f, 0x0000001f, - 0x0000000c, 0x0000000c, 0x00000020, 0x00000020, - 0x00001680, 0x00001680, 0x00002000, 0x0000200a, - 0x00002028, 0x00002028, 0x0000205f, 0x0000205f, - 0x00003000, 0x00003000, 0x00000000, 0x00000008, - 0x0000000e, 0x0000001b, 0x00000021, 0x00000022, - 0x00000026, 0x0000002a, 0x0000003b, 0x00000040, - 0x0000005b, 0x00000060, 0x0000007b, 0x00000084, - 0x00000086, 0x0000009f, 0x000000a1, 0x000000a1, - 0x000000a6, 0x000000a9, 0x000000ab, 0x000000af, - 0x000000b4, 0x000000b4, 0x000000b6, 0x000000b8, - 0x000000bb, 0x000000bf, 0x000000d7, 0x000000d7, - 0x000000f7, 0x000000f7, 0x000002b9, 0x000002ba, - 0x000002c2, 0x000002cf, 0x000002d2, 0x000002df, - 0x000002e5, 0x000002ed, 0x000002ef, 0x0000036f, - 0x00000374, 0x00000375, 0x0000037e, 0x0000037e, - 0x00000384, 0x00000385, 0x00000387, 0x00000387, - 0x000003f6, 0x000003f6, 0x00000483, 0x00000489, - 0x0000058a, 0x0000058a, 0x0000058d, 0x0000058e, - 0x00000591, 0x000005bd, 0x000005bf, 0x000005bf, - 0x000005c1, 0x000005c2, 0x000005c4, 0x000005c5, - 0x000005c7, 0x000005c7, 0x00000606, 0x00000607, - 0x0000060e, 0x0000061a, 0x0000064b, 0x0000065f, - 0x00000670, 0x00000670, 0x000006d6, 0x000006dc, - 0x000006de, 0x000006e4, 0x000006e7, 0x000006ed, - 0x00000711, 0x00000711, 0x00000730, 0x0000074a, - 0x000007a6, 0x000007b0, 0x000007eb, 0x000007f3, - 0x000007f6, 0x000007f9, 0x000007fd, 0x000007fd, - 0x00000816, 0x00000819, 0x0000081b, 0x00000823, - 0x00000825, 0x00000827, 0x00000829, 0x0000082d, - 0x00000859, 0x0000085b, 0x000008d3, 0x000008e1, - 0x000008e3, 0x00000902, 0x0000093a, 0x0000093a, - 0x0000093c, 0x0000093c, 0x00000941, 0x00000948, - 0x0000094d, 0x0000094d, 0x00000951, 0x00000957, - 0x00000962, 0x00000963, 0x00000981, 0x00000981, - 0x000009bc, 0x000009bc, 0x000009c1, 0x000009c4, - 0x000009cd, 0x000009cd, 0x000009e2, 0x000009e3, - 0x000009fe, 0x000009fe, 0x00000a01, 0x00000a02, - 0x00000a3c, 0x00000a3c, 0x00000a41, 0x00000a42, - 0x00000a47, 0x00000a48, 0x00000a4b, 0x00000a4d, - 0x00000a51, 0x00000a51, 0x00000a70, 0x00000a71, - 0x00000a75, 0x00000a75, 0x00000a81, 0x00000a82, - 0x00000abc, 0x00000abc, 0x00000ac1, 0x00000ac5, - 0x00000ac7, 0x00000ac8, 0x00000acd, 0x00000acd, - 0x00000ae2, 0x00000ae3, 0x00000afa, 0x00000aff, - 0x00000b01, 0x00000b01, 0x00000b3c, 0x00000b3c, - 0x00000b3f, 0x00000b3f, 0x00000b41, 0x00000b44, - 0x00000b4d, 0x00000b4d, 0x00000b56, 0x00000b56, - 0x00000b62, 0x00000b63, 0x00000b82, 0x00000b82, - 0x00000bc0, 0x00000bc0, 0x00000bcd, 0x00000bcd, - 0x00000bf3, 0x00000bf8, 0x00000bfa, 0x00000bfa, - 0x00000c00, 0x00000c00, 0x00000c04, 0x00000c04, - 0x00000c3e, 0x00000c40, 0x00000c46, 0x00000c48, - 0x00000c4a, 0x00000c4d, 0x00000c55, 0x00000c56, - 0x00000c62, 0x00000c63, 0x00000c78, 0x00000c7e, - 0x00000c81, 0x00000c81, 0x00000cbc, 0x00000cbc, - 0x00000ccc, 0x00000ccd, 0x00000ce2, 0x00000ce3, - 0x00000d00, 0x00000d01, 0x00000d3b, 0x00000d3c, - 0x00000d41, 0x00000d44, 0x00000d4d, 0x00000d4d, - 0x00000d62, 0x00000d63, 0x00000dca, 0x00000dca, + 0x0001f100, 0x0001f10a, 0x0001fbf0, 0x0001fbf9, + 0x0000002b, 0x0000002b, 0x0000002d, 0x0000002d, + 0x0000207a, 0x0000207b, 0x0000208a, 0x0000208b, + 0x00002212, 0x00002212, 0x0000fb29, 0x0000fb29, + 0x0000fe62, 0x0000fe63, 0x0000ff0b, 0x0000ff0b, + 0x0000ff0d, 0x0000ff0d, 0x00000023, 0x00000025, + 0x000000a2, 0x000000a5, 0x000000b0, 0x000000b1, + 0x0000058f, 0x0000058f, 0x00000609, 0x0000060a, + 0x0000066a, 0x0000066a, 0x000009f2, 0x000009f3, + 0x000009fb, 0x000009fb, 0x00000af1, 0x00000af1, + 0x00000bf9, 0x00000bf9, 0x00000e3f, 0x00000e3f, + 0x000017db, 0x000017db, 0x00002030, 0x00002034, + 0x000020a0, 0x000020bf, 0x0000212e, 0x0000212e, + 0x00002213, 0x00002213, 0x0000a838, 0x0000a839, + 0x0000fe5f, 0x0000fe5f, 0x0000fe69, 0x0000fe6a, + 0x0000ff03, 0x0000ff05, 0x0000ffe0, 0x0000ffe1, + 0x0000ffe5, 0x0000ffe6, 0x00011fdd, 0x00011fe0, + 0x0001e2ff, 0x0001e2ff, 0x00000600, 0x00000605, + 0x00000660, 0x00000669, 0x0000066b, 0x0000066c, + 0x000006dd, 0x000006dd, 0x000008e2, 0x000008e2, + 0x00010d30, 0x00010d39, 0x00010e60, 0x00010e7e, + 0x0000002c, 0x0000002c, 0x0000002e, 0x0000002f, + 0x0000003a, 0x0000003a, 0x000000a0, 0x000000a0, + 0x0000060c, 0x0000060c, 0x0000202f, 0x0000202f, + 0x00002044, 0x00002044, 0x0000fe50, 0x0000fe50, + 0x0000fe52, 0x0000fe52, 0x0000fe55, 0x0000fe55, + 0x0000ff0c, 0x0000ff0c, 0x0000ff0e, 0x0000ff0f, + 0x0000ff1a, 0x0000ff1a, 0x0000000a, 0x0000000a, + 0x0000000d, 0x0000000d, 0x0000001c, 0x0000001e, + 0x00000085, 0x00000085, 0x00002029, 0x00002029, + 0x00000009, 0x00000009, 0x0000000b, 0x0000000b, + 0x0000001f, 0x0000001f, 0x0000000c, 0x0000000c, + 0x00000020, 0x00000020, 0x00001680, 0x00001680, + 0x00002000, 0x0000200a, 0x00002028, 0x00002028, + 0x0000205f, 0x0000205f, 0x00003000, 0x00003000, + 0x00000000, 0x00000008, 0x0000000e, 0x0000001b, + 0x00000021, 0x00000022, 0x00000026, 0x0000002a, + 0x0000003b, 0x00000040, 0x0000005b, 0x00000060, + 0x0000007b, 0x00000084, 0x00000086, 0x0000009f, + 0x000000a1, 0x000000a1, 0x000000a6, 0x000000a9, + 0x000000ab, 0x000000af, 0x000000b4, 0x000000b4, + 0x000000b6, 0x000000b8, 0x000000bb, 0x000000bf, + 0x000000d7, 0x000000d7, 0x000000f7, 0x000000f7, + 0x000002b9, 0x000002ba, 0x000002c2, 0x000002cf, + 0x000002d2, 0x000002df, 0x000002e5, 0x000002ed, + 0x000002ef, 0x0000036f, 0x00000374, 0x00000375, + 0x0000037e, 0x0000037e, 0x00000384, 0x00000385, + 0x00000387, 0x00000387, 0x000003f6, 0x000003f6, + 0x00000483, 0x00000489, 0x0000058a, 0x0000058a, + 0x0000058d, 0x0000058e, 0x00000591, 0x000005bd, + 0x000005bf, 0x000005bf, 0x000005c1, 0x000005c2, + 0x000005c4, 0x000005c5, 0x000005c7, 0x000005c7, + 0x00000606, 0x00000607, 0x0000060e, 0x0000061a, + 0x0000064b, 0x0000065f, 0x00000670, 0x00000670, + 0x000006d6, 0x000006dc, 0x000006de, 0x000006e4, + 0x000006e7, 0x000006ed, 0x00000711, 0x00000711, + 0x00000730, 0x0000074a, 0x000007a6, 0x000007b0, + 0x000007eb, 0x000007f3, 0x000007f6, 0x000007f9, + 0x000007fd, 0x000007fd, 0x00000816, 0x00000819, + 0x0000081b, 0x00000823, 0x00000825, 0x00000827, + 0x00000829, 0x0000082d, 0x00000859, 0x0000085b, + 0x000008d3, 0x000008e1, 0x000008e3, 0x00000902, + 0x0000093a, 0x0000093a, 0x0000093c, 0x0000093c, + 0x00000941, 0x00000948, 0x0000094d, 0x0000094d, + 0x00000951, 0x00000957, 0x00000962, 0x00000963, + 0x00000981, 0x00000981, 0x000009bc, 0x000009bc, + 0x000009c1, 0x000009c4, 0x000009cd, 0x000009cd, + 0x000009e2, 0x000009e3, 0x000009fe, 0x000009fe, + 0x00000a01, 0x00000a02, 0x00000a3c, 0x00000a3c, + 0x00000a41, 0x00000a42, 0x00000a47, 0x00000a48, + 0x00000a4b, 0x00000a4d, 0x00000a51, 0x00000a51, + 0x00000a70, 0x00000a71, 0x00000a75, 0x00000a75, + 0x00000a81, 0x00000a82, 0x00000abc, 0x00000abc, + 0x00000ac1, 0x00000ac5, 0x00000ac7, 0x00000ac8, + 0x00000acd, 0x00000acd, 0x00000ae2, 0x00000ae3, + 0x00000afa, 0x00000aff, 0x00000b01, 0x00000b01, + 0x00000b3c, 0x00000b3c, 0x00000b3f, 0x00000b3f, + 0x00000b41, 0x00000b44, 0x00000b4d, 0x00000b4d, + 0x00000b55, 0x00000b56, 0x00000b62, 0x00000b63, + 0x00000b82, 0x00000b82, 0x00000bc0, 0x00000bc0, + 0x00000bcd, 0x00000bcd, 0x00000bf3, 0x00000bf8, + 0x00000bfa, 0x00000bfa, 0x00000c00, 0x00000c00, + 0x00000c04, 0x00000c04, 0x00000c3e, 0x00000c40, + 0x00000c46, 0x00000c48, 0x00000c4a, 0x00000c4d, + 0x00000c55, 0x00000c56, 0x00000c62, 0x00000c63, + 0x00000c78, 0x00000c7e, 0x00000c81, 0x00000c81, + 0x00000cbc, 0x00000cbc, 0x00000ccc, 0x00000ccd, + 0x00000ce2, 0x00000ce3, 0x00000d00, 0x00000d01, + 0x00000d3b, 0x00000d3c, 0x00000d41, 0x00000d44, + 0x00000d4d, 0x00000d4d, 0x00000d62, 0x00000d63, + 0x00000d81, 0x00000d81, 0x00000dca, 0x00000dca, 0x00000dd2, 0x00000dd4, 0x00000dd6, 0x00000dd6, 0x00000e31, 0x00000e31, 0x00000e34, 0x00000e3a, 0x00000e47, 0x00000e4e, 0x00000eb1, 0x00000eb1, - 0x00000eb4, 0x00000eb9, 0x00000ebb, 0x00000ebc, - 0x00000ec8, 0x00000ecd, 0x00000f18, 0x00000f19, - 0x00000f35, 0x00000f35, 0x00000f37, 0x00000f37, - 0x00000f39, 0x00000f3d, 0x00000f71, 0x00000f7e, - 0x00000f80, 0x00000f84, 0x00000f86, 0x00000f87, - 0x00000f8d, 0x00000f97, 0x00000f99, 0x00000fbc, - 0x00000fc6, 0x00000fc6, 0x0000102d, 0x00001030, - 0x00001032, 0x00001037, 0x00001039, 0x0000103a, - 0x0000103d, 0x0000103e, 0x00001058, 0x00001059, - 0x0000105e, 0x00001060, 0x00001071, 0x00001074, - 0x00001082, 0x00001082, 0x00001085, 0x00001086, - 0x0000108d, 0x0000108d, 0x0000109d, 0x0000109d, - 0x0000135d, 0x0000135f, 0x00001390, 0x00001399, - 0x00001400, 0x00001400, 0x0000169b, 0x0000169c, - 0x00001712, 0x00001714, 0x00001732, 0x00001734, - 0x00001752, 0x00001753, 0x00001772, 0x00001773, - 0x000017b4, 0x000017b5, 0x000017b7, 0x000017bd, - 0x000017c6, 0x000017c6, 0x000017c9, 0x000017d3, - 0x000017dd, 0x000017dd, 0x000017f0, 0x000017f9, - 0x00001800, 0x0000180e, 0x00001885, 0x00001886, - 0x000018a9, 0x000018a9, 0x00001920, 0x00001922, - 0x00001927, 0x00001928, 0x00001932, 0x00001932, - 0x00001939, 0x0000193b, 0x00001940, 0x00001940, - 0x00001944, 0x00001945, 0x000019de, 0x000019ff, - 0x00001a17, 0x00001a18, 0x00001a1b, 0x00001a1b, - 0x00001a56, 0x00001a56, 0x00001a58, 0x00001a5e, - 0x00001a60, 0x00001a60, 0x00001a62, 0x00001a62, - 0x00001a65, 0x00001a6c, 0x00001a73, 0x00001a7c, - 0x00001a7f, 0x00001a7f, 0x00001ab0, 0x00001abe, - 0x00001b00, 0x00001b03, 0x00001b34, 0x00001b34, - 0x00001b36, 0x00001b3a, 0x00001b3c, 0x00001b3c, - 0x00001b42, 0x00001b42, 0x00001b6b, 0x00001b73, - 0x00001b80, 0x00001b81, 0x00001ba2, 0x00001ba5, - 0x00001ba8, 0x00001ba9, 0x00001bab, 0x00001bad, - 0x00001be6, 0x00001be6, 0x00001be8, 0x00001be9, - 0x00001bed, 0x00001bed, 0x00001bef, 0x00001bf1, - 0x00001c2c, 0x00001c33, 0x00001c36, 0x00001c37, - 0x00001cd0, 0x00001cd2, 0x00001cd4, 0x00001ce0, - 0x00001ce2, 0x00001ce8, 0x00001ced, 0x00001ced, - 0x00001cf4, 0x00001cf4, 0x00001cf8, 0x00001cf9, - 0x00001dc0, 0x00001df9, 0x00001dfb, 0x00001dff, - 0x00001fbd, 0x00001fbd, 0x00001fbf, 0x00001fc1, - 0x00001fcd, 0x00001fcf, 0x00001fdd, 0x00001fdf, - 0x00001fed, 0x00001fef, 0x00001ffd, 0x00001ffe, - 0x0000200b, 0x0000200d, 0x00002010, 0x00002027, - 0x0000202a, 0x0000202e, 0x00002035, 0x00002043, - 0x00002045, 0x0000205e, 0x00002060, 0x00002064, - 0x00002066, 0x0000206f, 0x0000207c, 0x0000207e, - 0x0000208c, 0x0000208e, 0x000020d0, 0x000020f0, - 0x00002100, 0x00002101, 0x00002103, 0x00002106, - 0x00002108, 0x00002109, 0x00002114, 0x00002114, - 0x00002116, 0x00002118, 0x0000211e, 0x00002123, - 0x00002125, 0x00002125, 0x00002127, 0x00002127, - 0x00002129, 0x00002129, 0x0000213a, 0x0000213b, - 0x00002140, 0x00002144, 0x0000214a, 0x0000214d, - 0x00002150, 0x0000215f, 0x00002189, 0x0000218b, - 0x00002190, 0x00002211, 0x00002214, 0x00002335, - 0x0000237b, 0x00002394, 0x00002396, 0x00002426, - 0x00002440, 0x0000244a, 0x00002460, 0x00002487, - 0x000024ea, 0x000026ab, 0x000026ad, 0x000027ff, - 0x00002900, 0x00002b73, 0x00002b76, 0x00002b95, - 0x00002b98, 0x00002bc8, 0x00002bca, 0x00002bfe, + 0x00000eb4, 0x00000ebc, 0x00000ec8, 0x00000ecd, + 0x00000f18, 0x00000f19, 0x00000f35, 0x00000f35, + 0x00000f37, 0x00000f37, 0x00000f39, 0x00000f3d, + 0x00000f71, 0x00000f7e, 0x00000f80, 0x00000f84, + 0x00000f86, 0x00000f87, 0x00000f8d, 0x00000f97, + 0x00000f99, 0x00000fbc, 0x00000fc6, 0x00000fc6, + 0x0000102d, 0x00001030, 0x00001032, 0x00001037, + 0x00001039, 0x0000103a, 0x0000103d, 0x0000103e, + 0x00001058, 0x00001059, 0x0000105e, 0x00001060, + 0x00001071, 0x00001074, 0x00001082, 0x00001082, + 0x00001085, 0x00001086, 0x0000108d, 0x0000108d, + 0x0000109d, 0x0000109d, 0x0000135d, 0x0000135f, + 0x00001390, 0x00001399, 0x00001400, 0x00001400, + 0x0000169b, 0x0000169c, 0x00001712, 0x00001714, + 0x00001732, 0x00001734, 0x00001752, 0x00001753, + 0x00001772, 0x00001773, 0x000017b4, 0x000017b5, + 0x000017b7, 0x000017bd, 0x000017c6, 0x000017c6, + 0x000017c9, 0x000017d3, 0x000017dd, 0x000017dd, + 0x000017f0, 0x000017f9, 0x00001800, 0x0000180e, + 0x00001885, 0x00001886, 0x000018a9, 0x000018a9, + 0x00001920, 0x00001922, 0x00001927, 0x00001928, + 0x00001932, 0x00001932, 0x00001939, 0x0000193b, + 0x00001940, 0x00001940, 0x00001944, 0x00001945, + 0x000019de, 0x000019ff, 0x00001a17, 0x00001a18, + 0x00001a1b, 0x00001a1b, 0x00001a56, 0x00001a56, + 0x00001a58, 0x00001a5e, 0x00001a60, 0x00001a60, + 0x00001a62, 0x00001a62, 0x00001a65, 0x00001a6c, + 0x00001a73, 0x00001a7c, 0x00001a7f, 0x00001a7f, + 0x00001ab0, 0x00001ac0, 0x00001b00, 0x00001b03, + 0x00001b34, 0x00001b34, 0x00001b36, 0x00001b3a, + 0x00001b3c, 0x00001b3c, 0x00001b42, 0x00001b42, + 0x00001b6b, 0x00001b73, 0x00001b80, 0x00001b81, + 0x00001ba2, 0x00001ba5, 0x00001ba8, 0x00001ba9, + 0x00001bab, 0x00001bad, 0x00001be6, 0x00001be6, + 0x00001be8, 0x00001be9, 0x00001bed, 0x00001bed, + 0x00001bef, 0x00001bf1, 0x00001c2c, 0x00001c33, + 0x00001c36, 0x00001c37, 0x00001cd0, 0x00001cd2, + 0x00001cd4, 0x00001ce0, 0x00001ce2, 0x00001ce8, + 0x00001ced, 0x00001ced, 0x00001cf4, 0x00001cf4, + 0x00001cf8, 0x00001cf9, 0x00001dc0, 0x00001df9, + 0x00001dfb, 0x00001dff, 0x00001fbd, 0x00001fbd, + 0x00001fbf, 0x00001fc1, 0x00001fcd, 0x00001fcf, + 0x00001fdd, 0x00001fdf, 0x00001fed, 0x00001fef, + 0x00001ffd, 0x00001ffe, 0x0000200b, 0x0000200d, + 0x00002010, 0x00002027, 0x0000202a, 0x0000202e, + 0x00002035, 0x00002043, 0x00002045, 0x0000205e, + 0x00002060, 0x00002064, 0x00002066, 0x0000206f, + 0x0000207c, 0x0000207e, 0x0000208c, 0x0000208e, + 0x000020d0, 0x000020f0, 0x00002100, 0x00002101, + 0x00002103, 0x00002106, 0x00002108, 0x00002109, + 0x00002114, 0x00002114, 0x00002116, 0x00002118, + 0x0000211e, 0x00002123, 0x00002125, 0x00002125, + 0x00002127, 0x00002127, 0x00002129, 0x00002129, + 0x0000213a, 0x0000213b, 0x00002140, 0x00002144, + 0x0000214a, 0x0000214d, 0x00002150, 0x0000215f, + 0x00002189, 0x0000218b, 0x00002190, 0x00002211, + 0x00002214, 0x00002335, 0x0000237b, 0x00002394, + 0x00002396, 0x00002426, 0x00002440, 0x0000244a, + 0x00002460, 0x00002487, 0x000024ea, 0x000026ab, + 0x000026ad, 0x000027ff, 0x00002900, 0x00002b73, + 0x00002b76, 0x00002b95, 0x00002b97, 0x00002bff, 0x00002ce5, 0x00002cea, 0x00002cef, 0x00002cf1, 0x00002cf9, 0x00002cff, 0x00002d7f, 0x00002d7f, - 0x00002de0, 0x00002e4e, 0x00002e80, 0x00002e99, + 0x00002de0, 0x00002e52, 0x00002e80, 0x00002e99, 0x00002e9b, 0x00002ef3, 0x00002f00, 0x00002fd5, 0x00002ff0, 0x00002ffb, 0x00003001, 0x00003004, 0x00003008, 0x00003020, 0x0000302a, 0x0000302d, @@ -2118,12 +2177,12 @@ static const unsigned int _ucprop_ranges[] = { 0x0000a6f0, 0x0000a6f1, 0x0000a700, 0x0000a721, 0x0000a788, 0x0000a788, 0x0000a802, 0x0000a802, 0x0000a806, 0x0000a806, 0x0000a80b, 0x0000a80b, - 0x0000a825, 0x0000a826, 0x0000a828, 0x0000a82b, + 0x0000a825, 0x0000a826, 0x0000a828, 0x0000a82c, 0x0000a874, 0x0000a877, 0x0000a8c4, 0x0000a8c5, 0x0000a8e0, 0x0000a8f1, 0x0000a8ff, 0x0000a8ff, 0x0000a926, 0x0000a92d, 0x0000a947, 0x0000a951, 0x0000a980, 0x0000a982, 0x0000a9b3, 0x0000a9b3, - 0x0000a9b6, 0x0000a9b9, 0x0000a9bc, 0x0000a9bc, + 0x0000a9b6, 0x0000a9b9, 0x0000a9bc, 0x0000a9bd, 0x0000a9e5, 0x0000a9e5, 0x0000aa29, 0x0000aa2e, 0x0000aa31, 0x0000aa32, 0x0000aa35, 0x0000aa36, 0x0000aa43, 0x0000aa43, 0x0000aa4c, 0x0000aa4c, @@ -2131,26 +2190,27 @@ static const unsigned int _ucprop_ranges[] = { 0x0000aab2, 0x0000aab4, 0x0000aab7, 0x0000aab8, 0x0000aabe, 0x0000aabf, 0x0000aac1, 0x0000aac1, 0x0000aaec, 0x0000aaed, 0x0000aaf6, 0x0000aaf6, - 0x0000abe5, 0x0000abe5, 0x0000abe8, 0x0000abe8, - 0x0000abed, 0x0000abed, 0x0000fb1e, 0x0000fb1e, - 0x0000fd3e, 0x0000fd3f, 0x0000fdfd, 0x0000fdfd, - 0x0000fe00, 0x0000fe19, 0x0000fe20, 0x0000fe4f, - 0x0000fe51, 0x0000fe51, 0x0000fe54, 0x0000fe54, - 0x0000fe56, 0x0000fe5e, 0x0000fe60, 0x0000fe61, - 0x0000fe64, 0x0000fe66, 0x0000fe68, 0x0000fe68, - 0x0000fe6b, 0x0000fe6b, 0x0000feff, 0x0000feff, - 0x0000ff01, 0x0000ff02, 0x0000ff06, 0x0000ff0a, - 0x0000ff1b, 0x0000ff20, 0x0000ff3b, 0x0000ff40, - 0x0000ff5b, 0x0000ff65, 0x0000ffe2, 0x0000ffe4, - 0x0000ffe8, 0x0000ffee, 0x0000fff9, 0x0000fffd, - 0x00010101, 0x00010101, 0x00010140, 0x0001018c, - 0x00010190, 0x0001019b, 0x000101a0, 0x000101a0, - 0x000101fd, 0x000101fd, 0x000102e0, 0x000102e0, - 0x00010376, 0x0001037a, 0x0001091f, 0x0001091f, - 0x00010a01, 0x00010a03, 0x00010a05, 0x00010a06, - 0x00010a0c, 0x00010a0f, 0x00010a38, 0x00010a3a, - 0x00010a3f, 0x00010a3f, 0x00010ae5, 0x00010ae6, - 0x00010b39, 0x00010b3f, 0x00010d24, 0x00010d27, + 0x0000ab6a, 0x0000ab6b, 0x0000abe5, 0x0000abe5, + 0x0000abe8, 0x0000abe8, 0x0000abed, 0x0000abed, + 0x0000fb1e, 0x0000fb1e, 0x0000fd3e, 0x0000fd3f, + 0x0000fdfd, 0x0000fdfd, 0x0000fe00, 0x0000fe19, + 0x0000fe20, 0x0000fe4f, 0x0000fe51, 0x0000fe51, + 0x0000fe54, 0x0000fe54, 0x0000fe56, 0x0000fe5e, + 0x0000fe60, 0x0000fe61, 0x0000fe64, 0x0000fe66, + 0x0000fe68, 0x0000fe68, 0x0000fe6b, 0x0000fe6b, + 0x0000feff, 0x0000feff, 0x0000ff01, 0x0000ff02, + 0x0000ff06, 0x0000ff0a, 0x0000ff1b, 0x0000ff20, + 0x0000ff3b, 0x0000ff40, 0x0000ff5b, 0x0000ff65, + 0x0000ffe2, 0x0000ffe4, 0x0000ffe8, 0x0000ffee, + 0x0000fff9, 0x0000fffd, 0x00010101, 0x00010101, + 0x00010140, 0x0001018c, 0x00010190, 0x0001019c, + 0x000101a0, 0x000101a0, 0x000101fd, 0x000101fd, + 0x000102e0, 0x000102e0, 0x00010376, 0x0001037a, + 0x0001091f, 0x0001091f, 0x00010a01, 0x00010a03, + 0x00010a05, 0x00010a06, 0x00010a0c, 0x00010a0f, + 0x00010a38, 0x00010a3a, 0x00010a3f, 0x00010a3f, + 0x00010ae5, 0x00010ae6, 0x00010b39, 0x00010b3f, + 0x00010d24, 0x00010d27, 0x00010eab, 0x00010eac, 0x00010f46, 0x00010f50, 0x00011001, 0x00011001, 0x00011038, 0x00011046, 0x00011052, 0x00011065, 0x0001107f, 0x00011081, 0x000110b3, 0x000110b6, @@ -2158,38 +2218,44 @@ static const unsigned int _ucprop_ranges[] = { 0x00011127, 0x0001112b, 0x0001112d, 0x00011134, 0x00011173, 0x00011173, 0x00011180, 0x00011181, 0x000111b6, 0x000111be, 0x000111c9, 0x000111cc, - 0x0001122f, 0x00011231, 0x00011234, 0x00011234, - 0x00011236, 0x00011237, 0x0001123e, 0x0001123e, - 0x000112df, 0x000112df, 0x000112e3, 0x000112ea, - 0x00011300, 0x00011301, 0x0001133b, 0x0001133c, - 0x00011340, 0x00011340, 0x00011366, 0x0001136c, - 0x00011370, 0x00011374, 0x00011438, 0x0001143f, - 0x00011442, 0x00011444, 0x00011446, 0x00011446, - 0x0001145e, 0x0001145e, 0x000114b3, 0x000114b8, - 0x000114ba, 0x000114ba, 0x000114bf, 0x000114c0, - 0x000114c2, 0x000114c3, 0x000115b2, 0x000115b5, - 0x000115bc, 0x000115bd, 0x000115bf, 0x000115c0, - 0x000115dc, 0x000115dd, 0x00011633, 0x0001163a, - 0x0001163d, 0x0001163d, 0x0001163f, 0x00011640, - 0x00011660, 0x0001166c, 0x000116ab, 0x000116ab, - 0x000116ad, 0x000116ad, 0x000116b0, 0x000116b5, - 0x000116b7, 0x000116b7, 0x0001171d, 0x0001171f, - 0x00011722, 0x00011725, 0x00011727, 0x0001172b, - 0x0001182f, 0x00011837, 0x00011839, 0x0001183a, - 0x00011a01, 0x00011a06, 0x00011a09, 0x00011a0a, - 0x00011a33, 0x00011a38, 0x00011a3b, 0x00011a3e, - 0x00011a47, 0x00011a47, 0x00011a51, 0x00011a56, - 0x00011a59, 0x00011a5b, 0x00011a8a, 0x00011a96, - 0x00011a98, 0x00011a99, 0x00011c30, 0x00011c36, - 0x00011c38, 0x00011c3d, 0x00011c92, 0x00011ca7, - 0x00011caa, 0x00011cb0, 0x00011cb2, 0x00011cb3, - 0x00011cb5, 0x00011cb6, 0x00011d31, 0x00011d36, - 0x00011d3a, 0x00011d3a, 0x00011d3c, 0x00011d3d, - 0x00011d3f, 0x00011d45, 0x00011d47, 0x00011d47, - 0x00011d90, 0x00011d91, 0x00011d95, 0x00011d95, - 0x00011d97, 0x00011d97, 0x00011ef3, 0x00011ef4, - 0x00016af0, 0x00016af4, 0x00016b30, 0x00016b36, - 0x00016f8f, 0x00016f92, 0x0001bc9d, 0x0001bc9e, + 0x000111cf, 0x000111cf, 0x0001122f, 0x00011231, + 0x00011234, 0x00011234, 0x00011236, 0x00011237, + 0x0001123e, 0x0001123e, 0x000112df, 0x000112df, + 0x000112e3, 0x000112ea, 0x00011300, 0x00011301, + 0x0001133b, 0x0001133c, 0x00011340, 0x00011340, + 0x00011366, 0x0001136c, 0x00011370, 0x00011374, + 0x00011438, 0x0001143f, 0x00011442, 0x00011444, + 0x00011446, 0x00011446, 0x0001145e, 0x0001145e, + 0x000114b3, 0x000114b8, 0x000114ba, 0x000114ba, + 0x000114bf, 0x000114c0, 0x000114c2, 0x000114c3, + 0x000115b2, 0x000115b5, 0x000115bc, 0x000115bd, + 0x000115bf, 0x000115c0, 0x000115dc, 0x000115dd, + 0x00011633, 0x0001163a, 0x0001163d, 0x0001163d, + 0x0001163f, 0x00011640, 0x00011660, 0x0001166c, + 0x000116ab, 0x000116ab, 0x000116ad, 0x000116ad, + 0x000116b0, 0x000116b5, 0x000116b7, 0x000116b7, + 0x0001171d, 0x0001171f, 0x00011722, 0x00011725, + 0x00011727, 0x0001172b, 0x0001182f, 0x00011837, + 0x00011839, 0x0001183a, 0x0001193b, 0x0001193c, + 0x0001193e, 0x0001193e, 0x00011943, 0x00011943, + 0x000119d4, 0x000119d7, 0x000119da, 0x000119db, + 0x000119e0, 0x000119e0, 0x00011a01, 0x00011a06, + 0x00011a09, 0x00011a0a, 0x00011a33, 0x00011a38, + 0x00011a3b, 0x00011a3e, 0x00011a47, 0x00011a47, + 0x00011a51, 0x00011a56, 0x00011a59, 0x00011a5b, + 0x00011a8a, 0x00011a96, 0x00011a98, 0x00011a99, + 0x00011c30, 0x00011c36, 0x00011c38, 0x00011c3d, + 0x00011c92, 0x00011ca7, 0x00011caa, 0x00011cb0, + 0x00011cb2, 0x00011cb3, 0x00011cb5, 0x00011cb6, + 0x00011d31, 0x00011d36, 0x00011d3a, 0x00011d3a, + 0x00011d3c, 0x00011d3d, 0x00011d3f, 0x00011d45, + 0x00011d47, 0x00011d47, 0x00011d90, 0x00011d91, + 0x00011d95, 0x00011d95, 0x00011d97, 0x00011d97, + 0x00011ef3, 0x00011ef4, 0x00011fd5, 0x00011fdc, + 0x00011fe1, 0x00011ff1, 0x00016af0, 0x00016af4, + 0x00016b30, 0x00016b36, 0x00016f4f, 0x00016f4f, + 0x00016f8f, 0x00016f92, 0x00016fe2, 0x00016fe2, + 0x00016fe4, 0x00016fe4, 0x0001bc9d, 0x0001bc9e, 0x0001bca0, 0x0001bca3, 0x0001d167, 0x0001d169, 0x0001d173, 0x0001d182, 0x0001d185, 0x0001d18b, 0x0001d1aa, 0x0001d1ad, 0x0001d200, 0x0001d245, @@ -2201,23 +2267,27 @@ static const unsigned int _ucprop_ranges[] = { 0x0001da9b, 0x0001da9f, 0x0001daa1, 0x0001daaf, 0x0001e000, 0x0001e006, 0x0001e008, 0x0001e018, 0x0001e01b, 0x0001e021, 0x0001e023, 0x0001e024, - 0x0001e026, 0x0001e02a, 0x0001e8d0, 0x0001e8d6, + 0x0001e026, 0x0001e02a, 0x0001e130, 0x0001e136, + 0x0001e2ec, 0x0001e2ef, 0x0001e8d0, 0x0001e8d6, 0x0001e944, 0x0001e94a, 0x0001eef0, 0x0001eef1, 0x0001f000, 0x0001f02b, 0x0001f030, 0x0001f093, 0x0001f0a0, 0x0001f0ae, 0x0001f0b1, 0x0001f0bf, 0x0001f0c1, 0x0001f0cf, 0x0001f0d1, 0x0001f0f5, - 0x0001f10b, 0x0001f10c, 0x0001f12f, 0x0001f12f, - 0x0001f16a, 0x0001f16b, 0x0001f260, 0x0001f265, - 0x0001f300, 0x0001f6d4, 0x0001f6e0, 0x0001f6ec, - 0x0001f6f0, 0x0001f6f9, 0x0001f700, 0x0001f773, - 0x0001f780, 0x0001f7d8, 0x0001f800, 0x0001f80b, + 0x0001f10b, 0x0001f10f, 0x0001f12f, 0x0001f12f, + 0x0001f16a, 0x0001f16f, 0x0001f1ad, 0x0001f1ad, + 0x0001f260, 0x0001f265, 0x0001f300, 0x0001f6d7, + 0x0001f6e0, 0x0001f6ec, 0x0001f6f0, 0x0001f6fc, + 0x0001f700, 0x0001f773, 0x0001f780, 0x0001f7d8, + 0x0001f7e0, 0x0001f7eb, 0x0001f800, 0x0001f80b, 0x0001f810, 0x0001f847, 0x0001f850, 0x0001f859, 0x0001f860, 0x0001f887, 0x0001f890, 0x0001f8ad, - 0x0001f900, 0x0001f90b, 0x0001f910, 0x0001f93e, - 0x0001f940, 0x0001f970, 0x0001f973, 0x0001f976, - 0x0001f97a, 0x0001f97a, 0x0001f97c, 0x0001f9a2, - 0x0001f9b0, 0x0001f9b9, 0x0001f9c0, 0x0001f9c2, - 0x0001f9d0, 0x0001f9ff, 0x0001fa60, 0x0001fa6d, + 0x0001f8b0, 0x0001f8b1, 0x0001f900, 0x0001f978, + 0x0001f97a, 0x0001f9cb, 0x0001f9cd, 0x0001fa53, + 0x0001fa60, 0x0001fa6d, 0x0001fa70, 0x0001fa74, + 0x0001fa78, 0x0001fa7a, 0x0001fa80, 0x0001fa86, + 0x0001fa90, 0x0001faa8, 0x0001fab0, 0x0001fab6, + 0x0001fac0, 0x0001fac2, 0x0001fad0, 0x0001fad6, + 0x0001fb00, 0x0001fb92, 0x0001fb94, 0x0001fbca, 0x000e0001, 0x000e0001, 0x000e0020, 0x000e007f, 0x000e0100, 0x000e01ef, 0x000000ab, 0x000000ab, 0x00002018, 0x00002018, 0x0000201b, 0x0000201c, @@ -2238,107 +2308,109 @@ static const unsigned int _ucprop_ranges[] = { 0x0000070f, 0x00000710, 0x00000712, 0x0000072f, 0x0000074d, 0x000007a5, 0x000007b1, 0x000007b1, 0x00000860, 0x0000086a, 0x000008a0, 0x000008b4, - 0x000008b6, 0x000008bd, 0x0000fb50, 0x0000fbc1, + 0x000008b6, 0x000008c7, 0x0000fb50, 0x0000fbc1, 0x0000fbd3, 0x0000fd3d, 0x0000fd50, 0x0000fd8f, 0x0000fd92, 0x0000fdc7, 0x0000fdf0, 0x0000fdfc, 0x0000fe70, 0x0000fe74, 0x0000fe76, 0x0000fefc, 0x00010d00, 0x00010d23, 0x00010f30, 0x00010f45, 0x00010f51, 0x00010f59, 0x0001ec71, 0x0001ecb4, - 0x0001ee00, 0x0001ee03, 0x0001ee05, 0x0001ee1f, - 0x0001ee21, 0x0001ee22, 0x0001ee24, 0x0001ee24, - 0x0001ee27, 0x0001ee27, 0x0001ee29, 0x0001ee32, - 0x0001ee34, 0x0001ee37, 0x0001ee39, 0x0001ee39, - 0x0001ee3b, 0x0001ee3b, 0x0001ee42, 0x0001ee42, - 0x0001ee47, 0x0001ee47, 0x0001ee49, 0x0001ee49, - 0x0001ee4b, 0x0001ee4b, 0x0001ee4d, 0x0001ee4f, - 0x0001ee51, 0x0001ee52, 0x0001ee54, 0x0001ee54, - 0x0001ee57, 0x0001ee57, 0x0001ee59, 0x0001ee59, - 0x0001ee5b, 0x0001ee5b, 0x0001ee5d, 0x0001ee5d, - 0x0001ee5f, 0x0001ee5f, 0x0001ee61, 0x0001ee62, - 0x0001ee64, 0x0001ee64, 0x0001ee67, 0x0001ee6a, - 0x0001ee6c, 0x0001ee72, 0x0001ee74, 0x0001ee77, - 0x0001ee79, 0x0001ee7c, 0x0001ee7e, 0x0001ee7e, - 0x0001ee80, 0x0001ee89, 0x0001ee8b, 0x0001ee9b, - 0x0001eea1, 0x0001eea3, 0x0001eea5, 0x0001eea9, - 0x0001eeab, 0x0001eebb, 0x00000041, 0x0000005a, - 0x00000061, 0x0000007a, 0x000000aa, 0x000000aa, - 0x000000b5, 0x000000b5, 0x000000ba, 0x000000ba, - 0x000000c0, 0x000000d6, 0x000000d8, 0x000000f6, - 0x000000f8, 0x000001ba, 0x000001bc, 0x000001bf, - 0x000001c4, 0x00000293, 0x00000295, 0x000002b8, - 0x000002c0, 0x000002c1, 0x000002e0, 0x000002e4, - 0x00000345, 0x00000345, 0x00000370, 0x00000373, - 0x00000376, 0x00000377, 0x0000037a, 0x0000037d, - 0x0000037f, 0x0000037f, 0x00000386, 0x00000386, - 0x00000388, 0x0000038a, 0x0000038c, 0x0000038c, - 0x0000038e, 0x000003a1, 0x000003a3, 0x000003f5, - 0x000003f7, 0x00000481, 0x0000048a, 0x0000052f, - 0x00000531, 0x00000556, 0x00000560, 0x00000588, - 0x000010a0, 0x000010c5, 0x000010c7, 0x000010c7, - 0x000010cd, 0x000010cd, 0x000010d0, 0x000010fa, - 0x000010fd, 0x000010ff, 0x000013a0, 0x000013f5, - 0x000013f8, 0x000013fd, 0x00001c80, 0x00001c88, - 0x00001c90, 0x00001cba, 0x00001cbd, 0x00001cbf, - 0x00001d00, 0x00001dbf, 0x00001e00, 0x00001f15, - 0x00001f18, 0x00001f1d, 0x00001f20, 0x00001f45, - 0x00001f48, 0x00001f4d, 0x00001f50, 0x00001f57, - 0x00001f59, 0x00001f59, 0x00001f5b, 0x00001f5b, - 0x00001f5d, 0x00001f5d, 0x00001f5f, 0x00001f7d, - 0x00001f80, 0x00001fb4, 0x00001fb6, 0x00001fbc, - 0x00001fbe, 0x00001fbe, 0x00001fc2, 0x00001fc4, - 0x00001fc6, 0x00001fcc, 0x00001fd0, 0x00001fd3, - 0x00001fd6, 0x00001fdb, 0x00001fe0, 0x00001fec, - 0x00001ff2, 0x00001ff4, 0x00001ff6, 0x00001ffc, - 0x00002071, 0x00002071, 0x0000207f, 0x0000207f, - 0x00002090, 0x0000209c, 0x00002102, 0x00002102, - 0x00002107, 0x00002107, 0x0000210a, 0x00002113, - 0x00002115, 0x00002115, 0x00002119, 0x0000211d, - 0x00002124, 0x00002124, 0x00002126, 0x00002126, - 0x00002128, 0x00002128, 0x0000212a, 0x0000212d, - 0x0000212f, 0x00002134, 0x00002139, 0x00002139, - 0x0000213c, 0x0000213f, 0x00002145, 0x00002149, - 0x0000214e, 0x0000214e, 0x00002160, 0x0000217f, - 0x00002183, 0x00002184, 0x000024b6, 0x000024e9, - 0x00002c00, 0x00002c2e, 0x00002c30, 0x00002c5e, - 0x00002c60, 0x00002ce4, 0x00002ceb, 0x00002cee, - 0x00002cf2, 0x00002cf3, 0x00002d00, 0x00002d25, - 0x00002d27, 0x00002d27, 0x00002d2d, 0x00002d2d, - 0x0000a640, 0x0000a66d, 0x0000a680, 0x0000a69d, - 0x0000a722, 0x0000a787, 0x0000a78b, 0x0000a78e, - 0x0000a790, 0x0000a7b9, 0x0000a7f8, 0x0000a7fa, - 0x0000ab30, 0x0000ab5a, 0x0000ab5c, 0x0000ab65, - 0x0000ab70, 0x0000abbf, 0x0000fb00, 0x0000fb06, - 0x0000fb13, 0x0000fb17, 0x0000ff21, 0x0000ff3a, - 0x0000ff41, 0x0000ff5a, 0x00010400, 0x0001044f, - 0x000104b0, 0x000104d3, 0x000104d8, 0x000104fb, - 0x00010c80, 0x00010cb2, 0x00010cc0, 0x00010cf2, - 0x000118a0, 0x000118df, 0x00016e40, 0x00016e7f, - 0x0001d400, 0x0001d454, 0x0001d456, 0x0001d49c, - 0x0001d49e, 0x0001d49f, 0x0001d4a2, 0x0001d4a2, - 0x0001d4a5, 0x0001d4a6, 0x0001d4a9, 0x0001d4ac, - 0x0001d4ae, 0x0001d4b9, 0x0001d4bb, 0x0001d4bb, - 0x0001d4bd, 0x0001d4c3, 0x0001d4c5, 0x0001d505, - 0x0001d507, 0x0001d50a, 0x0001d50d, 0x0001d514, - 0x0001d516, 0x0001d51c, 0x0001d51e, 0x0001d539, - 0x0001d53b, 0x0001d53e, 0x0001d540, 0x0001d544, - 0x0001d546, 0x0001d546, 0x0001d54a, 0x0001d550, - 0x0001d552, 0x0001d6a5, 0x0001d6a8, 0x0001d6c0, - 0x0001d6c2, 0x0001d6da, 0x0001d6dc, 0x0001d6fa, - 0x0001d6fc, 0x0001d714, 0x0001d716, 0x0001d734, - 0x0001d736, 0x0001d74e, 0x0001d750, 0x0001d76e, - 0x0001d770, 0x0001d788, 0x0001d78a, 0x0001d7a8, - 0x0001d7aa, 0x0001d7c2, 0x0001d7c4, 0x0001d7cb, - 0x0001e900, 0x0001e943, 0x0001f130, 0x0001f149, - 0x0001f150, 0x0001f169, 0x0001f170, 0x0001f189, - 0x00000027, 0x00000027, 0x0000002e, 0x0000002e, - 0x0000003a, 0x0000003a, 0x0000005e, 0x0000005e, - 0x00000060, 0x00000060, 0x000000a8, 0x000000a8, - 0x000000ad, 0x000000ad, 0x000000af, 0x000000af, - 0x000000b4, 0x000000b4, 0x000000b7, 0x000000b8, - 0x000002b0, 0x0000036f, 0x00000374, 0x00000375, - 0x0000037a, 0x0000037a, 0x00000384, 0x00000385, - 0x00000387, 0x00000387, 0x00000483, 0x00000489, - 0x00000559, 0x00000559, 0x00000591, 0x000005bd, + 0x0001ed01, 0x0001ed3d, 0x0001ee00, 0x0001ee03, + 0x0001ee05, 0x0001ee1f, 0x0001ee21, 0x0001ee22, + 0x0001ee24, 0x0001ee24, 0x0001ee27, 0x0001ee27, + 0x0001ee29, 0x0001ee32, 0x0001ee34, 0x0001ee37, + 0x0001ee39, 0x0001ee39, 0x0001ee3b, 0x0001ee3b, + 0x0001ee42, 0x0001ee42, 0x0001ee47, 0x0001ee47, + 0x0001ee49, 0x0001ee49, 0x0001ee4b, 0x0001ee4b, + 0x0001ee4d, 0x0001ee4f, 0x0001ee51, 0x0001ee52, + 0x0001ee54, 0x0001ee54, 0x0001ee57, 0x0001ee57, + 0x0001ee59, 0x0001ee59, 0x0001ee5b, 0x0001ee5b, + 0x0001ee5d, 0x0001ee5d, 0x0001ee5f, 0x0001ee5f, + 0x0001ee61, 0x0001ee62, 0x0001ee64, 0x0001ee64, + 0x0001ee67, 0x0001ee6a, 0x0001ee6c, 0x0001ee72, + 0x0001ee74, 0x0001ee77, 0x0001ee79, 0x0001ee7c, + 0x0001ee7e, 0x0001ee7e, 0x0001ee80, 0x0001ee89, + 0x0001ee8b, 0x0001ee9b, 0x0001eea1, 0x0001eea3, + 0x0001eea5, 0x0001eea9, 0x0001eeab, 0x0001eebb, + 0x00000041, 0x0000005a, 0x00000061, 0x0000007a, + 0x000000aa, 0x000000aa, 0x000000b5, 0x000000b5, + 0x000000ba, 0x000000ba, 0x000000c0, 0x000000d6, + 0x000000d8, 0x000000f6, 0x000000f8, 0x000001ba, + 0x000001bc, 0x000001bf, 0x000001c4, 0x00000293, + 0x00000295, 0x000002b8, 0x000002c0, 0x000002c1, + 0x000002e0, 0x000002e4, 0x00000345, 0x00000345, + 0x00000370, 0x00000373, 0x00000376, 0x00000377, + 0x0000037a, 0x0000037d, 0x0000037f, 0x0000037f, + 0x00000386, 0x00000386, 0x00000388, 0x0000038a, + 0x0000038c, 0x0000038c, 0x0000038e, 0x000003a1, + 0x000003a3, 0x000003f5, 0x000003f7, 0x00000481, + 0x0000048a, 0x0000052f, 0x00000531, 0x00000556, + 0x00000560, 0x00000588, 0x000010a0, 0x000010c5, + 0x000010c7, 0x000010c7, 0x000010cd, 0x000010cd, + 0x000010d0, 0x000010fa, 0x000010fd, 0x000010ff, + 0x000013a0, 0x000013f5, 0x000013f8, 0x000013fd, + 0x00001c80, 0x00001c88, 0x00001c90, 0x00001cba, + 0x00001cbd, 0x00001cbf, 0x00001d00, 0x00001dbf, + 0x00001e00, 0x00001f15, 0x00001f18, 0x00001f1d, + 0x00001f20, 0x00001f45, 0x00001f48, 0x00001f4d, + 0x00001f50, 0x00001f57, 0x00001f59, 0x00001f59, + 0x00001f5b, 0x00001f5b, 0x00001f5d, 0x00001f5d, + 0x00001f5f, 0x00001f7d, 0x00001f80, 0x00001fb4, + 0x00001fb6, 0x00001fbc, 0x00001fbe, 0x00001fbe, + 0x00001fc2, 0x00001fc4, 0x00001fc6, 0x00001fcc, + 0x00001fd0, 0x00001fd3, 0x00001fd6, 0x00001fdb, + 0x00001fe0, 0x00001fec, 0x00001ff2, 0x00001ff4, + 0x00001ff6, 0x00001ffc, 0x00002071, 0x00002071, + 0x0000207f, 0x0000207f, 0x00002090, 0x0000209c, + 0x00002102, 0x00002102, 0x00002107, 0x00002107, + 0x0000210a, 0x00002113, 0x00002115, 0x00002115, + 0x00002119, 0x0000211d, 0x00002124, 0x00002124, + 0x00002126, 0x00002126, 0x00002128, 0x00002128, + 0x0000212a, 0x0000212d, 0x0000212f, 0x00002134, + 0x00002139, 0x00002139, 0x0000213c, 0x0000213f, + 0x00002145, 0x00002149, 0x0000214e, 0x0000214e, + 0x00002160, 0x0000217f, 0x00002183, 0x00002184, + 0x000024b6, 0x000024e9, 0x00002c00, 0x00002c2e, + 0x00002c30, 0x00002c5e, 0x00002c60, 0x00002ce4, + 0x00002ceb, 0x00002cee, 0x00002cf2, 0x00002cf3, + 0x00002d00, 0x00002d25, 0x00002d27, 0x00002d27, + 0x00002d2d, 0x00002d2d, 0x0000a640, 0x0000a66d, + 0x0000a680, 0x0000a69d, 0x0000a722, 0x0000a787, + 0x0000a78b, 0x0000a78e, 0x0000a790, 0x0000a7bf, + 0x0000a7c2, 0x0000a7ca, 0x0000a7f5, 0x0000a7f6, + 0x0000a7f8, 0x0000a7fa, 0x0000ab30, 0x0000ab5a, + 0x0000ab5c, 0x0000ab68, 0x0000ab70, 0x0000abbf, + 0x0000fb00, 0x0000fb06, 0x0000fb13, 0x0000fb17, + 0x0000ff21, 0x0000ff3a, 0x0000ff41, 0x0000ff5a, + 0x00010400, 0x0001044f, 0x000104b0, 0x000104d3, + 0x000104d8, 0x000104fb, 0x00010c80, 0x00010cb2, + 0x00010cc0, 0x00010cf2, 0x000118a0, 0x000118df, + 0x00016e40, 0x00016e7f, 0x0001d400, 0x0001d454, + 0x0001d456, 0x0001d49c, 0x0001d49e, 0x0001d49f, + 0x0001d4a2, 0x0001d4a2, 0x0001d4a5, 0x0001d4a6, + 0x0001d4a9, 0x0001d4ac, 0x0001d4ae, 0x0001d4b9, + 0x0001d4bb, 0x0001d4bb, 0x0001d4bd, 0x0001d4c3, + 0x0001d4c5, 0x0001d505, 0x0001d507, 0x0001d50a, + 0x0001d50d, 0x0001d514, 0x0001d516, 0x0001d51c, + 0x0001d51e, 0x0001d539, 0x0001d53b, 0x0001d53e, + 0x0001d540, 0x0001d544, 0x0001d546, 0x0001d546, + 0x0001d54a, 0x0001d550, 0x0001d552, 0x0001d6a5, + 0x0001d6a8, 0x0001d6c0, 0x0001d6c2, 0x0001d6da, + 0x0001d6dc, 0x0001d6fa, 0x0001d6fc, 0x0001d714, + 0x0001d716, 0x0001d734, 0x0001d736, 0x0001d74e, + 0x0001d750, 0x0001d76e, 0x0001d770, 0x0001d788, + 0x0001d78a, 0x0001d7a8, 0x0001d7aa, 0x0001d7c2, + 0x0001d7c4, 0x0001d7cb, 0x0001e900, 0x0001e943, + 0x0001f130, 0x0001f149, 0x0001f150, 0x0001f169, + 0x0001f170, 0x0001f189, 0x00000027, 0x00000027, + 0x0000002e, 0x0000002e, 0x0000003a, 0x0000003a, + 0x0000005e, 0x0000005e, 0x00000060, 0x00000060, + 0x000000a8, 0x000000a8, 0x000000ad, 0x000000ad, + 0x000000af, 0x000000af, 0x000000b4, 0x000000b4, + 0x000000b7, 0x000000b8, 0x000002b0, 0x0000036f, + 0x00000374, 0x00000375, 0x0000037a, 0x0000037a, + 0x00000384, 0x00000385, 0x00000387, 0x00000387, + 0x00000483, 0x00000489, 0x00000559, 0x00000559, + 0x0000055f, 0x0000055f, 0x00000591, 0x000005bd, 0x000005bf, 0x000005bf, 0x000005c1, 0x000005c2, 0x000005c4, 0x000005c5, 0x000005c7, 0x000005c7, 0x000005f4, 0x000005f4, 0x00000600, 0x00000605, @@ -2367,7 +2439,7 @@ static const unsigned int _ucprop_ranges[] = { 0x00000ae2, 0x00000ae3, 0x00000afa, 0x00000aff, 0x00000b01, 0x00000b01, 0x00000b3c, 0x00000b3c, 0x00000b3f, 0x00000b3f, 0x00000b41, 0x00000b44, - 0x00000b4d, 0x00000b4d, 0x00000b56, 0x00000b56, + 0x00000b4d, 0x00000b4d, 0x00000b55, 0x00000b56, 0x00000b62, 0x00000b63, 0x00000b82, 0x00000b82, 0x00000bc0, 0x00000bc0, 0x00000bcd, 0x00000bcd, 0x00000c00, 0x00000c00, 0x00000c04, 0x00000c04, @@ -2379,11 +2451,11 @@ static const unsigned int _ucprop_ranges[] = { 0x00000ce2, 0x00000ce3, 0x00000d00, 0x00000d01, 0x00000d3b, 0x00000d3c, 0x00000d41, 0x00000d44, 0x00000d4d, 0x00000d4d, 0x00000d62, 0x00000d63, - 0x00000dca, 0x00000dca, 0x00000dd2, 0x00000dd4, - 0x00000dd6, 0x00000dd6, 0x00000e31, 0x00000e31, - 0x00000e34, 0x00000e3a, 0x00000e46, 0x00000e4e, - 0x00000eb1, 0x00000eb1, 0x00000eb4, 0x00000eb9, - 0x00000ebb, 0x00000ebc, 0x00000ec6, 0x00000ec6, + 0x00000d81, 0x00000d81, 0x00000dca, 0x00000dca, + 0x00000dd2, 0x00000dd4, 0x00000dd6, 0x00000dd6, + 0x00000e31, 0x00000e31, 0x00000e34, 0x00000e3a, + 0x00000e46, 0x00000e4e, 0x00000eb1, 0x00000eb1, + 0x00000eb4, 0x00000ebc, 0x00000ec6, 0x00000ec6, 0x00000ec8, 0x00000ecd, 0x00000f18, 0x00000f19, 0x00000f35, 0x00000f35, 0x00000f37, 0x00000f37, 0x00000f39, 0x00000f39, 0x00000f71, 0x00000f7e, @@ -2410,7 +2482,7 @@ static const unsigned int _ucprop_ranges[] = { 0x00001a60, 0x00001a60, 0x00001a62, 0x00001a62, 0x00001a65, 0x00001a6c, 0x00001a73, 0x00001a7c, 0x00001a7f, 0x00001a7f, 0x00001aa7, 0x00001aa7, - 0x00001ab0, 0x00001abe, 0x00001b00, 0x00001b03, + 0x00001ab0, 0x00001ac0, 0x00001b00, 0x00001b03, 0x00001b34, 0x00001b34, 0x00001b36, 0x00001b3a, 0x00001b3c, 0x00001b3c, 0x00001b42, 0x00001b42, 0x00001b6b, 0x00001b73, 0x00001b80, 0x00001b81, @@ -2446,21 +2518,22 @@ static const unsigned int _ucprop_ranges[] = { 0x0000a770, 0x0000a770, 0x0000a788, 0x0000a78a, 0x0000a7f8, 0x0000a7f9, 0x0000a802, 0x0000a802, 0x0000a806, 0x0000a806, 0x0000a80b, 0x0000a80b, - 0x0000a825, 0x0000a826, 0x0000a8c4, 0x0000a8c5, - 0x0000a8e0, 0x0000a8f1, 0x0000a8ff, 0x0000a8ff, - 0x0000a926, 0x0000a92d, 0x0000a947, 0x0000a951, - 0x0000a980, 0x0000a982, 0x0000a9b3, 0x0000a9b3, - 0x0000a9b6, 0x0000a9b9, 0x0000a9bc, 0x0000a9bc, - 0x0000a9cf, 0x0000a9cf, 0x0000a9e5, 0x0000a9e6, - 0x0000aa29, 0x0000aa2e, 0x0000aa31, 0x0000aa32, - 0x0000aa35, 0x0000aa36, 0x0000aa43, 0x0000aa43, - 0x0000aa4c, 0x0000aa4c, 0x0000aa70, 0x0000aa70, - 0x0000aa7c, 0x0000aa7c, 0x0000aab0, 0x0000aab0, - 0x0000aab2, 0x0000aab4, 0x0000aab7, 0x0000aab8, - 0x0000aabe, 0x0000aabf, 0x0000aac1, 0x0000aac1, - 0x0000aadd, 0x0000aadd, 0x0000aaec, 0x0000aaed, - 0x0000aaf3, 0x0000aaf4, 0x0000aaf6, 0x0000aaf6, - 0x0000ab5b, 0x0000ab5f, 0x0000abe5, 0x0000abe5, + 0x0000a825, 0x0000a826, 0x0000a82c, 0x0000a82c, + 0x0000a8c4, 0x0000a8c5, 0x0000a8e0, 0x0000a8f1, + 0x0000a8ff, 0x0000a8ff, 0x0000a926, 0x0000a92d, + 0x0000a947, 0x0000a951, 0x0000a980, 0x0000a982, + 0x0000a9b3, 0x0000a9b3, 0x0000a9b6, 0x0000a9b9, + 0x0000a9bc, 0x0000a9bd, 0x0000a9cf, 0x0000a9cf, + 0x0000a9e5, 0x0000a9e6, 0x0000aa29, 0x0000aa2e, + 0x0000aa31, 0x0000aa32, 0x0000aa35, 0x0000aa36, + 0x0000aa43, 0x0000aa43, 0x0000aa4c, 0x0000aa4c, + 0x0000aa70, 0x0000aa70, 0x0000aa7c, 0x0000aa7c, + 0x0000aab0, 0x0000aab0, 0x0000aab2, 0x0000aab4, + 0x0000aab7, 0x0000aab8, 0x0000aabe, 0x0000aabf, + 0x0000aac1, 0x0000aac1, 0x0000aadd, 0x0000aadd, + 0x0000aaec, 0x0000aaed, 0x0000aaf3, 0x0000aaf4, + 0x0000aaf6, 0x0000aaf6, 0x0000ab5b, 0x0000ab5f, + 0x0000ab69, 0x0000ab6b, 0x0000abe5, 0x0000abe5, 0x0000abe8, 0x0000abe8, 0x0000abed, 0x0000abed, 0x0000fb1e, 0x0000fb1e, 0x0000fbb2, 0x0000fbc1, 0x0000fe00, 0x0000fe0f, 0x0000fe13, 0x0000fe13, @@ -2475,14 +2548,15 @@ static const unsigned int _ucprop_ranges[] = { 0x00010a01, 0x00010a03, 0x00010a05, 0x00010a06, 0x00010a0c, 0x00010a0f, 0x00010a38, 0x00010a3a, 0x00010a3f, 0x00010a3f, 0x00010ae5, 0x00010ae6, - 0x00010d24, 0x00010d27, 0x00010f46, 0x00010f50, - 0x00011001, 0x00011001, 0x00011038, 0x00011046, - 0x0001107f, 0x00011081, 0x000110b3, 0x000110b6, - 0x000110b9, 0x000110ba, 0x000110bd, 0x000110bd, - 0x000110cd, 0x000110cd, 0x00011100, 0x00011102, - 0x00011127, 0x0001112b, 0x0001112d, 0x00011134, - 0x00011173, 0x00011173, 0x00011180, 0x00011181, - 0x000111b6, 0x000111be, 0x000111c9, 0x000111cc, + 0x00010d24, 0x00010d27, 0x00010eab, 0x00010eac, + 0x00010f46, 0x00010f50, 0x00011001, 0x00011001, + 0x00011038, 0x00011046, 0x0001107f, 0x00011081, + 0x000110b3, 0x000110b6, 0x000110b9, 0x000110ba, + 0x000110bd, 0x000110bd, 0x000110cd, 0x000110cd, + 0x00011100, 0x00011102, 0x00011127, 0x0001112b, + 0x0001112d, 0x00011134, 0x00011173, 0x00011173, + 0x00011180, 0x00011181, 0x000111b6, 0x000111be, + 0x000111c9, 0x000111cc, 0x000111cf, 0x000111cf, 0x0001122f, 0x00011231, 0x00011234, 0x00011234, 0x00011236, 0x00011237, 0x0001123e, 0x0001123e, 0x000112df, 0x000112df, 0x000112e3, 0x000112ea, @@ -2500,7 +2574,10 @@ static const unsigned int _ucprop_ranges[] = { 0x000116b0, 0x000116b5, 0x000116b7, 0x000116b7, 0x0001171d, 0x0001171f, 0x00011722, 0x00011725, 0x00011727, 0x0001172b, 0x0001182f, 0x00011837, - 0x00011839, 0x0001183a, 0x00011a01, 0x00011a0a, + 0x00011839, 0x0001183a, 0x0001193b, 0x0001193c, + 0x0001193e, 0x0001193e, 0x00011943, 0x00011943, + 0x000119d4, 0x000119d7, 0x000119da, 0x000119db, + 0x000119e0, 0x000119e0, 0x00011a01, 0x00011a0a, 0x00011a33, 0x00011a38, 0x00011a3b, 0x00011a3e, 0x00011a47, 0x00011a47, 0x00011a51, 0x00011a56, 0x00011a59, 0x00011a5b, 0x00011a8a, 0x00011a96, @@ -2512,1531 +2589,1543 @@ static const unsigned int _ucprop_ranges[] = { 0x00011d3c, 0x00011d3d, 0x00011d3f, 0x00011d45, 0x00011d47, 0x00011d47, 0x00011d90, 0x00011d91, 0x00011d95, 0x00011d95, 0x00011d97, 0x00011d97, - 0x00011ef3, 0x00011ef4, 0x00016af0, 0x00016af4, - 0x00016b30, 0x00016b36, 0x00016b40, 0x00016b43, + 0x00011ef3, 0x00011ef4, 0x00013430, 0x00013438, + 0x00016af0, 0x00016af4, 0x00016b30, 0x00016b36, + 0x00016b40, 0x00016b43, 0x00016f4f, 0x00016f4f, 0x00016f8f, 0x00016f9f, 0x00016fe0, 0x00016fe1, - 0x0001bc9d, 0x0001bc9e, 0x0001bca0, 0x0001bca3, - 0x0001d167, 0x0001d169, 0x0001d173, 0x0001d182, - 0x0001d185, 0x0001d18b, 0x0001d1aa, 0x0001d1ad, - 0x0001d242, 0x0001d244, 0x0001da00, 0x0001da36, - 0x0001da3b, 0x0001da6c, 0x0001da75, 0x0001da75, - 0x0001da84, 0x0001da84, 0x0001da9b, 0x0001da9f, - 0x0001daa1, 0x0001daaf, 0x0001e000, 0x0001e006, - 0x0001e008, 0x0001e018, 0x0001e01b, 0x0001e021, - 0x0001e023, 0x0001e024, 0x0001e026, 0x0001e02a, - 0x0001e8d0, 0x0001e8d6, 0x0001e944, 0x0001e94a, - 0x0001f3fb, 0x0001f3ff, 0x000e0001, 0x000e0001, - 0x000e0020, 0x000e007f, 0x000e0100, 0x000e01ef + 0x00016fe3, 0x00016fe4, 0x0001bc9d, 0x0001bc9e, + 0x0001bca0, 0x0001bca3, 0x0001d167, 0x0001d169, + 0x0001d173, 0x0001d182, 0x0001d185, 0x0001d18b, + 0x0001d1aa, 0x0001d1ad, 0x0001d242, 0x0001d244, + 0x0001da00, 0x0001da36, 0x0001da3b, 0x0001da6c, + 0x0001da75, 0x0001da75, 0x0001da84, 0x0001da84, + 0x0001da9b, 0x0001da9f, 0x0001daa1, 0x0001daaf, + 0x0001e000, 0x0001e006, 0x0001e008, 0x0001e018, + 0x0001e01b, 0x0001e021, 0x0001e023, 0x0001e024, + 0x0001e026, 0x0001e02a, 0x0001e130, 0x0001e13d, + 0x0001e2ec, 0x0001e2ef, 0x0001e8d0, 0x0001e8d6, + 0x0001e944, 0x0001e94b, 0x0001f3fb, 0x0001f3ff, + 0x000e0001, 0x000e0001, 0x000e0020, 0x000e007f, + 0x000e0100, 0x000e01ef }; -static const unsigned _uccase_upper_g_size = 275; +static const unsigned _uccase_upper_g_size = 272; static const short _uccase_upper_g[] = { - 335, 2234, 8785, 768, 672, 77, 540, 3, - -29, 103, -1410, 520, 21, 8786, 8, 102, - 713, 129, 3090, 128, 2080, 256, 514, 7202, - 734, 9584, 4406, 616, 845, 112, 534, 40, - 14, 1034, 91, 199, 1143, 1070, 4097, 371, - 19, 1977, 71, 579, 260, 2073, 322, 61, - 106, 2198, 13184, 453, 1429, 4461, 47, 388, - 140, 66, 1493, 263, -796, 2992, -611, -1322, - 41, 18, 16, 163, -1319, 131, 15543, 3, - 20, 296, 3727, 4978, 8670, 58, 5, 615, - 515, 32, 62, -1, 268, 32767, 10729, -780, - -1362, 11, 180, 5454, 3, -233, 13, 307, - 220, 23, 352, 2268, 3718, 568, 451, 107, - 1252, 70, 54, 17, -167, 199, -1113, 2855, - -315, 48, 114, 38, 2870, 148, -812, 204, - 4, 347, 8, 1923, 166, 2466, 1793, 13, - 4865, 1434, 177, 121, 75, -177, 514, 32767, - 686, -334, 314, 3068, 64, 2035, 131, -264, - 820, 405, 241, 76, 617, 53, 231, 145, - 388, 158, 2, 26, 9, 1128, 1086, 289, - -1158, 365, -386, 5891, 1489, 74, 160, 192, - 563, 151, 1814, 267, 512, 33, 104, 1757, - 15, 2734, 4203, 16, 147, 330, 706, 373, - 268, -1175, 12817, -528, 3753, 10605, 128, 715, - 65, 3721, 57, 684, 256, 520, 562, 2, - 2063, 591, 1030, 277, 1957, 520, 203, 8470, - 3796, 305, 32767, 332, -733, 721, 244, 111, - 341, 69, -1184, 53, 35, 256, 512, 166, - 52, 2154, 522, 12, 2938, 4790, 256, 1, - 2804, -149, 209, 32767, 3264, -792, 623, 56, - 134, 1769, 3, -1285, 274, 2053, 384, 583, - 2960, 2, 319, 14002, 635, 233, 24227, 277, - 1433, 2361, -123, 514, 32767, 20, 391, 409, - 9, 17, 24, 192, 3076, 162, 2, 257, - 8, 347, 25 + 701, 54, 11458, 6742, 32767, 719, 160, 17, + 16001, 11704, 10413, 579, 573, 32767, 4673, 2, + 5106, 792, -1416, 1234, 1097, 209, 2617, 22197, + 660, 533, 9514, 32767, 3253, 4, 2429, 15735, + -439, 4400, 518, 67, 7396, 452, 1295, 5, + 5912, 1530, 32767, 9, 4007, 998, 4127, 3300, + 537, 1, 1180, 11224, 1837, 38, 148, 5891, + 32767, 1130, 477, 332, 849, 1201, 2461, 65, + 944, 2219, 19523, 100, 64, 137, 32767, 1221, + 1238, 104, -1168, -471, -853, 50, 619, 86, + 3836, 286, 1791, 1, 19879, -1351, 640, 189, + 214, -785, 32767, 20, 70, 2357, 1122, 2659, + 6206, 578, 12733, 32767, 5506, 615, 5955, 3080, + 32767, 299, 264, 30, 4532, 19256, 1928, 69, + 1203, 32767, 3557, 28, 5112, 1426, 32767, 7796, + 1149, 68, 7502, 2260, 606, 28, 9933, 2501, + 224, 1, 3435, 5773, -747, 25773, 1102, 4, + 2897, 24325, 7454, 4, 1040, 9351, 32767, 883, + 2730, 1, 4127, 1104, 1170, 83, 2785, 1059, + 18394, 1123, 4865, 515, 32767, 1109, 1007, 2629, + 2393, 993, 984, 7, 554, 853, 1619, 107, + 928, 8, 2747, 4488, 1754, 35, -1039, -763, + 32767, 20, 373, 1614, 1088, 1337, 2775, 578, + 3501, 32767, 386, 74, 14365, 6256, 32767, 271, + 10, 690, 11178, 13600, 1461, 1349, 3283, 32767, + 4621, 1, 3973, 903, -168, 595, 914, 17, + 1685, 3335, 574, 518, 2640, 235, 2623, 2, + 14727, 14572, -619, 3046, 1164, 26, 524, 834, + 2132, 12, 2375, 13217, 32767, 944, 519, 688, + 9020, 2593, 2128, 2, 6926, 2403, 1115, 134, + 1084, 1334, 32767, 1203, 2567, 850, 2169, -37, + 412, 20, 1090, 680, 2376, 1, 5011, 12, + 32767, 217, 2598, 1189, 3474, -162, -645, 5, + 549, 305, 1123, 850, 1411, 575, 18451, -918 }; -static const unsigned _uccase_upper_table_size = 1475; +static const unsigned _uccase_upper_table_size = 1485; static const unsigned _uccase_upper_table[] = { - 0x000004d1, 0x000004d0, 0x0000a68f, 0x0000a68e, - 0x000118d8, 0x000118b8, 0x0000a7b9, 0x0000a7b8, - 0x000004fb, 0x000004fa, 0x0000abb0, 0x000013e0, - 0x00001ff7, 0x0300013e, 0x000001fb, 0x000001fa, - 0x000013fc, 0x000013f4, 0x00010cd9, 0x00010c99, - 0x00001ee9, 0x00001ee8, 0x000000f5, 0x000000d5, - 0x00010cf0, 0x00010cb0, 0x000010da, 0x00001c9a, - 0x0000a761, 0x0000a760, 0x00000247, 0x00000246, - 0x00000078, 0x00000058, 0x000010f2, 0x00001cb2, - 0x00002d13, 0x000010b3, 0x000024df, 0x000024c5, - 0x00001fa8, 0x02000103, 0x00016e69, 0x00016e49, - 0x00002ca7, 0x00002ca6, 0x0001043e, 0x00010416, - 0x00002d20, 0x000010c0, 0x00002c4e, 0x00002c1e, - 0x00002cc5, 0x00002cc4, 0x00001fb1, 0x00001fb9, - 0x000003fb, 0x000003fa, 0x0000a689, 0x0000a688, - 0x0000aba2, 0x000013d2, 0x00000461, 0x00000460, - 0x00001e8d, 0x00001e8c, 0x00001f7a, 0x00001fea, - 0x00002cb7, 0x00002cb6, 0x0001043b, 0x00010413, - 0x0000020f, 0x0000020e, 0x00010cec, 0x00010cac, - 0x00002179, 0x00002169, 0x00002174, 0x00002164, - 0x00010438, 0x00010410, 0x0000a7a7, 0x0000a7a6, - 0x0000abbc, 0x000013ec, 0x00000521, 0x00000520, - 0x00001f03, 0x00001f0b, 0x00001fb3, 0x02000048, - 0x00001c81, 0x00000414, 0x000004f5, 0x000004f4, - 0x00000283, 0x000001a9, 0x00001e2f, 0x00001e2e, - 0x000004ca, 0x000004c9, 0x00000584, 0x00000554, - 0x00010436, 0x0001040e, 0x00001e69, 0x00001e68, - 0x00001ee3, 0x00001ee2, 0x0000ab97, 0x000013c7, - 0x00001f77, 0x00001fdb, 0x0000021b, 0x0000021a, - 0x00001e87, 0x00001e86, 0x00010cc3, 0x00010c83, - 0x000003af, 0x0000038a, 0x000000ed, 0x000000cd, - 0x00001e96, 0x0200008b, 0x0000ab7b, 0x000013ab, - 0x000003b5, 0x00000395, 0x0001e93b, 0x0001e919, - 0x000004d5, 0x000004d4, 0x000118cd, 0x000118ad, - 0x000004a1, 0x000004a0, 0x0001042e, 0x00010406, - 0x00001eb3, 0x00001eb2, 0x0000aba4, 0x000013d4, - 0x00000433, 0x00000413, 0x00001f10, 0x00001f18, - 0x00000073, 0x00000053, 0x000004bf, 0x000004be, - 0x00002173, 0x00002163, 0x00001f13, 0x00001f1b, - 0x000003f1, 0x000003a1, 0x00002c47, 0x00002c17, - 0x00010ce0, 0x00010ca0, 0x000104f3, 0x000104cb, - 0x000024de, 0x000024c4, 0x00000469, 0x00000468, - 0x000010f3, 0x00001cb3, 0x0000a745, 0x0000a744, - 0x00001e81, 0x00001e80, 0x000010ff, 0x00001cbf, - 0x0000ab90, 0x000013c0, 0x0000fb16, 0x02000077, - 0x0001e932, 0x0001e910, 0x00016e79, 0x00016e59, - 0x00010cde, 0x00010c9e, 0x00000509, 0x00000508, - 0x00001f15, 0x00001f1d, 0x000004e1, 0x000004e0, - 0x00010cf1, 0x00010cb1, 0x00000440, 0x00000420, - 0x00001f05, 0x00001f0d, 0x00000192, 0x00000191, - 0x0000056c, 0x0000053c, 0x00001ebf, 0x00001ebe, - 0x000104e2, 0x000104ba, 0x00001e53, 0x00001e52, - 0x00000441, 0x00000421, 0x00010cd7, 0x00010c97, - 0x00001f84, 0x0200000c, 0x00001fe2, 0x030000be, - 0x000001b6, 0x000001b5, 0x000010df, 0x00001c9f, - 0x000003e3, 0x000003e2, 0x0000ff56, 0x0000ff36, - 0x000010f4, 0x00001cb4, 0x00010cdd, 0x00010c9d, - 0x0000a665, 0x0000a664, 0x00001f00, 0x00001f08, - 0x00016e64, 0x00016e44, 0x0000aba6, 0x000013d6, - 0x00002cbd, 0x00002cbc, 0x000003c7, 0x000003a7, - 0x00002d0e, 0x000010ae, 0x00002d17, 0x000010b7, - 0x000001ed, 0x000001ec, 0x0000a687, 0x0000a686, - 0x0000a79d, 0x0000a79c, 0x00002d0c, 0x000010ac, - 0x0000ab96, 0x000013c6, 0x0001044c, 0x00010424, - 0x00000513, 0x00000512, 0x000000f6, 0x000000d6, - 0x00010cca, 0x00010c8a, 0x0000ff49, 0x0000ff29, - 0x00001fd7, 0x030000ba, 0x00000475, 0x00000474, - 0x00001fd0, 0x00001fd8, 0x00002c31, 0x00002c01, - 0x00001f9c, 0x020000f7, 0x00000211, 0x00000210, - 0x0000ab89, 0x000013b9, 0x000003d0, 0x00000392, - 0x00001f20, 0x00001f28, 0x00000109, 0x00000108, - 0x00000573, 0x00000543, 0x000003d7, 0x000003cf, - 0x00001e45, 0x00001e44, 0x00002d03, 0x000010a3, - 0x00001e27, 0x00001e26, 0x00000456, 0x00000406, - 0x00001fe3, 0x030000c2, 0x0000a69b, 0x0000a69a, - 0x000004cc, 0x000004cb, 0x0000ab93, 0x000013c3, - 0x0001e942, 0x0001e920, 0x00001f44, 0x00001f4c, - 0x000000eb, 0x000000cb, 0x00010cc1, 0x00010c81, - 0x0000007a, 0x0000005a, 0x00000066, 0x00000046, - 0x00002c35, 0x00002c05, 0x000010d2, 0x00001c92, - 0x00000142, 0x00000141, 0x00001ef5, 0x00001ef4, - 0x00001e63, 0x00001e62, 0x0000ab8d, 0x000013bd, - 0x000003c5, 0x000003a5, 0x000104dc, 0x000104b4, - 0x000118c8, 0x000118a8, 0x0000a691, 0x0000a690, - 0x00002d1f, 0x000010bf, 0x000024d4, 0x000024ba, - 0x000000df, 0x02000051, 0x0000a661, 0x0000a660, - 0x000004a5, 0x000004a4, 0x00001f02, 0x00001f0a, - 0x0000016d, 0x0000016c, 0x00016e6b, 0x00016e4b, - 0x00002c9d, 0x00002c9c, 0x0000a693, 0x0000a692, - 0x00000167, 0x00000166, 0x0000a72f, 0x0000a72e, - 0x00001faf, 0x02000118, 0x00000473, 0x00000472, - 0x000024e4, 0x000024ca, 0x00000240, 0x00002c7f, - 0x00000517, 0x00000516, 0x00002ca5, 0x00002ca4, - 0x00001eff, 0x00001efe, 0x0000050d, 0x0000050c, - 0x0000ab82, 0x000013b2, 0x0000010b, 0x0000010a, - 0x000024e5, 0x000024cb, 0x00001fc2, 0x0200012a, - 0x000010dc, 0x00001c9c, 0x00000165, 0x00000164, - 0x00000280, 0x000001a6, 0x0000a76f, 0x0000a76e, - 0x00000079, 0x00000059, 0x00002c4b, 0x00002c1b, - 0x0001e92d, 0x0001e90b, 0x0000a787, 0x0000a786, - 0x0000006e, 0x0000004e, 0x00000077, 0x00000057, - 0x0001042c, 0x00010404, 0x000001fd, 0x000001fc, - 0x000000fc, 0x000000dc, 0x00002184, 0x00002183, - 0x00001ffc, 0x02000121, 0x0000028b, 0x000001b2, - 0x0000045f, 0x0000040f, 0x0000abbe, 0x000013ee, - 0x00001f82, 0x02000006, 0x00000288, 0x000001ae, - 0x00001c88, 0x0000a64a, 0x0000057d, 0x0000054d, - 0x00001e51, 0x00001e50, 0x00010432, 0x0001040a, - 0x00016e7c, 0x00016e5c, 0x00001e9b, 0x00001e60, - 0x00001e49, 0x00001e48, 0x00010429, 0x00010401, - 0x00002d19, 0x000010b9, 0x0000a757, 0x0000a756, - 0x00002c40, 0x00002c10, 0x00001f94, 0x02000024, - 0x000001d6, 0x000001d5, 0x00000063, 0x00000043, - 0x00002ca9, 0x00002ca8, 0x0001044b, 0x00010423, - 0x000013fd, 0x000013f5, 0x00002c3c, 0x00002c0c, - 0x00010cea, 0x00010caa, 0x0001e943, 0x0001e921, - 0x000118dc, 0x000118bc, 0x000003f5, 0x00000395, - 0x0000fb04, 0x03000061, 0x00002c8f, 0x00002c8e, - 0x0000011d, 0x0000011c, 0x00002cb1, 0x00002cb0, - 0x00010cc5, 0x00010c85, 0x0000fb14, 0x02000071, - 0x00000275, 0x0000019f, 0x00016e73, 0x00016e53, - 0x0000ab7d, 0x000013ad, 0x00002c3a, 0x00002c0a, - 0x00010428, 0x00010400, 0x00001f9d, 0x020000fa, - 0x00002d0d, 0x000010ad, 0x00000458, 0x00000408, - 0x000003bc, 0x0000039c, 0x00001e3d, 0x00001e3c, - 0x0000ab73, 0x000013a3, 0x00000163, 0x00000162, - 0x000003d5, 0x000003a6, 0x00000195, 0x000001f6, - 0x000004f3, 0x000004f2, 0x000004a3, 0x000004a2, - 0x00001fe6, 0x020000c9, 0x00001eb5, 0x00001eb4, - 0x00000451, 0x00000401, 0x00010ce3, 0x00010ca3, - 0x0000a749, 0x0000a748, 0x00000256, 0x00000189, - 0x00000201, 0x00000200, 0x00000567, 0x00000537, - 0x00002c32, 0x00002c02, 0x0000a651, 0x0000a650, - 0x00001fac, 0x0200010f, 0x00010cc8, 0x00010c88, - 0x00002d06, 0x000010a6, 0x000003ae, 0x00000389, - 0x000000ff, 0x00000178, 0x0000ab84, 0x000013b4, - 0x0000044d, 0x0000042d, 0x0001044d, 0x00010425, - 0x0000017c, 0x0000017b, 0x00002cc3, 0x00002cc2, - 0x0000044b, 0x0000042b, 0x00001fe5, 0x00001fec, - 0x000024e8, 0x000024ce, 0x00001d79, 0x0000a77d, - 0x00002caf, 0x00002cae, 0x000104db, 0x000104b3, - 0x00001e6d, 0x00001e6c, 0x00000446, 0x00000426, - 0x0000046b, 0x0000046a, 0x0000a75b, 0x0000a75a, - 0x00001f88, 0x020000d3, 0x000001ad, 0x000001ac, - 0x00001e13, 0x00001e12, 0x00000223, 0x00000222, - 0x0001e92e, 0x0001e90c, 0x000004a7, 0x000004a6, - 0x00002d05, 0x000010a5, 0x00000121, 0x00000120, - 0x00010434, 0x0001040c, 0x00000169, 0x00000168, - 0x00000495, 0x00000494, 0x00002c66, 0x0000023e, - 0x00001f07, 0x00001f0f, 0x00000171, 0x00000170, - 0x00000571, 0x00000541, 0x00000515, 0x00000514, - 0x0001e939, 0x0001e917, 0x00001e77, 0x00001e76, - 0x0000a643, 0x0000a642, 0x000004b9, 0x000004b8, - 0x00000225, 0x00000224, 0x00001e2d, 0x00001e2c, - 0x0000043b, 0x0000041b, 0x000010d9, 0x00001c99, - 0x0000014d, 0x0000014c, 0x00001e43, 0x00001e42, - 0x00016e60, 0x00016e40, 0x00010cdb, 0x00010c9b, - 0x0000014b, 0x0000014a, 0x000000e9, 0x000000c9, - 0x00001f8a, 0x020000d9, 0x00000505, 0x00000504, - 0x000004df, 0x000004de, 0x000024e6, 0x000024cc, - 0x00001e6b, 0x00001e6a, 0x0000a739, 0x0000a738, - 0x0000046f, 0x0000046e, 0x0000026f, 0x0000019c, - 0x000118cc, 0x000118ac, 0x00001e0f, 0x00001e0e, - 0x00000581, 0x00000551, 0x00001f8e, 0x020000e5, - 0x000000ef, 0x000000cf, 0x00000064, 0x00000044, - 0x00001fa4, 0x0200003c, 0x0000023f, 0x00002c7e, - 0x00001e57, 0x00001e56, 0x00000430, 0x00000410, - 0x000000e0, 0x000000c0, 0x000003ad, 0x00000388, - 0x00000269, 0x00000196, 0x00002cb5, 0x00002cb4, - 0x000104f0, 0x000104c8, 0x0000037c, 0x000003fe, - 0x000024db, 0x000024c1, 0x000000e1, 0x000000c1, - 0x000010db, 0x00001c9b, 0x000104f5, 0x000104cd, - 0x000104f7, 0x000104cf, 0x0000a747, 0x0000a746, - 0x000104ee, 0x000104c6, 0x00002c50, 0x00002c20, - 0x00001ff4, 0x02000133, 0x000118c3, 0x000118a3, - 0x0000ab75, 0x000013a5, 0x0000217e, 0x0000216e, - 0x00001fa9, 0x02000106, 0x000000fa, 0x000000da, - 0x00002c4a, 0x00002c1a, 0x00001ed5, 0x00001ed4, - 0x00001fc4, 0x0200012d, 0x000024d3, 0x000024b9, - 0x0000a729, 0x0000a728, 0x000001c5, 0x000001c4, - 0x0000a669, 0x0000a668, 0x00001e59, 0x00001e58, - 0x000010fd, 0x00001cbd, 0x00000570, 0x00000540, - 0x000003c2, 0x000003a3, 0x000024d1, 0x000024b7, - 0x0000217a, 0x0000216a, 0x00002d1b, 0x000010bb, - 0x000004d3, 0x000004d2, 0x00001f21, 0x00001f29, - 0x000001d2, 0x000001d1, 0x0000fb17, 0x0200007a, - 0x00002c45, 0x00002c15, 0x00010431, 0x00010409, - 0x0000046d, 0x0000046c, 0x0000056d, 0x0000053d, - 0x0000aba5, 0x000013d5, 0x00001f43, 0x00001f4b, - 0x00001f7b, 0x00001feb, 0x00002c3f, 0x00002c0f, - 0x0000abb7, 0x000013e7, 0x00001fd1, 0x00001fd9, - 0x000003f2, 0x000003f9, 0x00000455, 0x00000405, - 0x00010cc7, 0x00010c87, 0x000003b6, 0x00000396, - 0x000000e2, 0x000000c2, 0x0000a753, 0x0000a752, - 0x00002c9f, 0x00002c9e, 0x000003c9, 0x000003a9, - 0x000024dc, 0x000024c2, 0x0000013a, 0x00000139, - 0x00001e85, 0x00001e84, 0x00002cec, 0x00002ceb, - 0x000013fa, 0x000013f2, 0x00001fb7, 0x03000136, - 0x0000ab8e, 0x000013be, 0x00002c56, 0x00002c26, - 0x000104f4, 0x000104cc, 0x00001e33, 0x00001e32, - 0x00000575, 0x00000545, 0x0000ab9a, 0x000013ca, - 0x00001fe1, 0x00001fe9, 0x00001fcc, 0x0200011e, - 0x00001e4f, 0x00001e4e, 0x0000052b, 0x0000052a, - 0x00001fae, 0x02000115, 0x00002c85, 0x00002c84, - 0x0000044a, 0x0000042a, 0x0000ab80, 0x000013b0, - 0x000118db, 0x000118bb, 0x0000027d, 0x00002c64, - 0x00000129, 0x00000128, 0x000010e5, 0x00001ca5, - 0x0000a7a5, 0x0000a7a4, 0x00001f11, 0x00001f19, - 0x0000048b, 0x0000048a, 0x000010f1, 0x00001cb1, - 0x00002c37, 0x00002c07, 0x0001e937, 0x0001e915, - 0x0000a75d, 0x0000a75c, 0x00002cad, 0x00002cac, - 0x0000abbd, 0x000013ed, 0x0001e92c, 0x0001e90a, - 0x0000a649, 0x0000a648, 0x000004e7, 0x000004e6, - 0x00000074, 0x00000054, 0x000104e9, 0x000104c1, - 0x00001e09, 0x00001e08, 0x00000467, 0x00000466, - 0x000010ec, 0x00001cac, 0x0000022d, 0x0000022c, - 0x00000511, 0x00000510, 0x0000043f, 0x0000041f, - 0x00010ccd, 0x00010c8d, 0x0000015d, 0x0000015c, - 0x00000272, 0x0000019d, 0x00016e7d, 0x00016e5d, - 0x0000ab8a, 0x000013ba, 0x000003c3, 0x000003a3, - 0x00001d7d, 0x00002c63, 0x0000016b, 0x0000016a, - 0x00002cdf, 0x00002cde, 0x00001e83, 0x00001e82, - 0x0001042b, 0x00010403, 0x00001fa1, 0x02000033, - 0x00000471, 0x00000470, 0x0000abb2, 0x000013e2, - 0x0001043d, 0x00010415, 0x0000a793, 0x0000a792, - 0x00010449, 0x00010421, 0x00002ccf, 0x00002cce, - 0x00001f30, 0x00001f38, 0x00001e05, 0x00001e04, - 0x00010cf2, 0x00010cb2, 0x000010e1, 0x00001ca1, - 0x0000ff4a, 0x0000ff2a, 0x00001e95, 0x00001e94, - 0x00000434, 0x00000414, 0x00010ce6, 0x00010ca6, - 0x0000ff59, 0x0000ff39, 0x0000a68b, 0x0000a68a, - 0x00016e70, 0x00016e50, 0x0000ab78, 0x000013a8, - 0x000003cd, 0x0000038e, 0x0000026a, 0x0000a7ae, - 0x00002cc7, 0x00002cc6, 0x000104fb, 0x000104d3, - 0x00002c46, 0x00002c16, 0x00001f32, 0x00001f3a, - 0x0000017f, 0x00000053, 0x000004a9, 0x000004a8, - 0x000004bb, 0x000004ba, 0x00001edd, 0x00001edc, - 0x00001fd3, 0x030000b3, 0x00002cf3, 0x00002cf2, - 0x00000447, 0x00000427, 0x00010446, 0x0001041e, - 0x0000a7b7, 0x0000a7b6, 0x0000a727, 0x0000a726, - 0x000010d6, 0x00001c96, 0x000003bf, 0x0000039f, - 0x0000020b, 0x0000020a, 0x00002c55, 0x00002c25, - 0x00010ce1, 0x00010ca1, 0x0000ff4e, 0x0000ff2e, - 0x0000025c, 0x0000a7ab, 0x00016e63, 0x00016e43, - 0x000004b1, 0x000004b0, 0x0000ff4c, 0x0000ff2c, - 0x000024d0, 0x000024b6, 0x00016e7b, 0x00016e5b, - 0x00010cdf, 0x00010c9f, 0x000004b7, 0x000004b6, - 0x00001f92, 0x0200001e, 0x00002d1a, 0x000010ba, - 0x0000045b, 0x0000040b, 0x0000fb00, 0x02000054, - 0x00000263, 0x00000194, 0x00001e07, 0x00001e06, - 0x00001eb7, 0x00001eb6, 0x00000452, 0x00000402, - 0x000001eb, 0x000001ea, 0x0000a697, 0x0000a696, - 0x00000151, 0x00000150, 0x00000583, 0x00000553, - 0x000003b4, 0x00000394, 0x00002ca1, 0x00002ca0, - 0x00001e65, 0x00001e64, 0x000104e3, 0x000104bb, - 0x000024e2, 0x000024c8, 0x00000251, 0x00002c6d, - 0x0000a737, 0x0000a736, 0x000010ee, 0x00001cae, - 0x0000fb05, 0x02000065, 0x00010433, 0x0001040b, - 0x00016e6e, 0x00016e4e, 0x0000057f, 0x0000054f, - 0x00001e5f, 0x00001e5e, 0x000104eb, 0x000104c3, - 0x00002d0f, 0x000010af, 0x0000a741, 0x0000a740, - 0x00000242, 0x00000241, 0x0000006c, 0x0000004c, - 0x00001e37, 0x00001e36, 0x00016e62, 0x00016e42, - 0x000003ed, 0x000003ec, 0x000104f8, 0x000104d0, - 0x000000e4, 0x000000c4, 0x0000a765, 0x0000a764, - 0x0000abb4, 0x000013e4, 0x00000135, 0x00000134, - 0x00001ef1, 0x00001ef0, 0x0000a73d, 0x0000a73c, - 0x00010ccb, 0x00010c8b, 0x0000ff58, 0x0000ff38, - 0x00000250, 0x00002c6f, 0x00000155, 0x00000154, - 0x0000049b, 0x0000049a, 0x00001fad, 0x02000112, - 0x000003c4, 0x000003a4, 0x000118d6, 0x000118b6, - 0x00000580, 0x00000550, 0x00002d15, 0x000010b5, - 0x00001f78, 0x00001ff8, 0x0000a767, 0x0000a766, - 0x00016e72, 0x00016e52, 0x00002d0a, 0x000010aa, - 0x00000061, 0x00000041, 0x0000a759, 0x0000a758, - 0x0000ab7a, 0x000013aa, 0x000000f0, 0x000000d0, - 0x00001f42, 0x00001f4a, 0x00002c9b, 0x00002c9a, + 0x00001f65, 0x00001f6d, 0x000000e6, 0x000000c6, + 0x0000043c, 0x0000041c, 0x00001e05, 0x00001e04, + 0x0000217b, 0x0000216b, 0x00000257, 0x0000018a, + 0x00016e6b, 0x00016e4b, 0x00000529, 0x00000528, + 0x0000ab93, 0x000013c3, 0x00001e5f, 0x00001e5e, + 0x00010437, 0x0001040f, 0x00000115, 0x00000114, + 0x00010442, 0x0001041a, 0x000001d6, 0x000001d5, + 0x00001f35, 0x00001f3d, 0x00001fe2, 0x030000be, + 0x00002cb9, 0x00002cb8, 0x0000a745, 0x0000a744, + 0x000024d8, 0x000024be, 0x0000a725, 0x0000a724, + 0x00000067, 0x00000047, 0x00016e7a, 0x00016e5a, + 0x0001e938, 0x0001e916, 0x00000442, 0x00000422, + 0x00002171, 0x00002161, 0x00000127, 0x00000126, + 0x0000020b, 0x0000020a, 0x0000aba8, 0x000013d8, + 0x00001fb7, 0x03000136, 0x000003f0, 0x0000039a, + 0x000003dd, 0x000003dc, 0x00001edb, 0x00001eda, + 0x0000045f, 0x0000040f, 0x000104e5, 0x000104bd, + 0x00001e5b, 0x00001e5a, 0x00001f62, 0x00001f6a, + 0x00000269, 0x00000196, 0x0000fb15, 0x02000074, + 0x00002d1f, 0x000010bf, 0x0000fb13, 0x0200006e, + 0x0000ab97, 0x000013c7, 0x00000469, 0x00000468, + 0x00000068, 0x00000048, 0x00001ea3, 0x00001ea2, + 0x00002d00, 0x000010a0, 0x00001f82, 0x02000006, + 0x00002c36, 0x00002c06, 0x00001fd2, 0x030000af, + 0x00001e49, 0x00001e48, 0x0001e926, 0x0001e904, + 0x00010cd3, 0x00010c93, 0x00001fb2, 0x02000124, + 0x00000586, 0x00000556, 0x000001bd, 0x000001bc, + 0x00000458, 0x00000408, 0x000004bd, 0x000004bc, + 0x00001f00, 0x00001f08, 0x0000a687, 0x0000a686, + 0x000003f5, 0x00000395, 0x00001f7d, 0x00001ffb, + 0x00000445, 0x00000425, 0x00010cdb, 0x00010c9b, + 0x00000456, 0x00000406, 0x0000ab77, 0x000013a7, + 0x00002d14, 0x000010b4, 0x000104fb, 0x000104d3, + 0x0000057f, 0x0000054f, 0x000001e3, 0x000001e2, + 0x0000a72d, 0x0000a72c, 0x000004d7, 0x000004d6, + 0x0000010b, 0x0000010a, 0x00001ed5, 0x00001ed4, + 0x0000ff49, 0x0000ff29, 0x00002c8f, 0x00002c8e, + 0x000003b4, 0x00000394, 0x00000373, 0x00000372, + 0x00001ec7, 0x00001ec6, 0x0000ab73, 0x000013a3, + 0x0000a7c3, 0x0000a7c2, 0x00001ebd, 0x00001ebc, + 0x000024d5, 0x000024bb, 0x00000233, 0x00000232, + 0x00000282, 0x0000a7c5, 0x00002d21, 0x000010c1, + 0x0000a683, 0x0000a682, 0x00002ca5, 0x00002ca4, + 0x0000ff4c, 0x0000ff2c, 0x00010cd4, 0x00010c94, + 0x00001eb1, 0x00001eb0, 0x000000e4, 0x000000c4, + 0x00002d0e, 0x000010ae, 0x00002c3a, 0x00002c0a, + 0x00002c55, 0x00002c25, 0x00001f11, 0x00001f19, + 0x000024e7, 0x000024cd, 0x0000a757, 0x0000a756, + 0x00002c42, 0x00002c12, 0x00001fd6, 0x020000b7, + 0x0000015f, 0x0000015e, 0x000104f2, 0x000104ca, + 0x0000049f, 0x0000049e, 0x00001fe5, 0x00001fec, + 0x00001f23, 0x00001f2b, 0x0000ab7a, 0x000013aa, + 0x00000065, 0x00000045, 0x000024db, 0x000024c1, + 0x00002d06, 0x000010a6, 0x0001e932, 0x0001e910, + 0x0000ab7f, 0x000013af, 0x0000a7a9, 0x0000a7a8, + 0x0000a7b7, 0x0000a7b6, 0x00002cbf, 0x00002cbe, + 0x00000142, 0x00000141, 0x0000a77a, 0x0000a779, + 0x0000048d, 0x0000048c, 0x0000056e, 0x0000053e, + 0x00000146, 0x00000145, 0x0001e934, 0x0001e912, + 0x00001f8b, 0x020000dc, 0x00016e6f, 0x00016e4f, + 0x0000037b, 0x000003fd, 0x0000ab7c, 0x000013ac, + 0x0000ab7b, 0x000013ab, 0x00002c9f, 0x00002c9e, + 0x0000a7ca, 0x0000a7c9, 0x00016e63, 0x00016e43, + 0x0000a769, 0x0000a768, 0x00001e69, 0x00001e68, + 0x00000519, 0x00000518, 0x0000020d, 0x0000020c, + 0x00000180, 0x00000243, 0x000000ec, 0x000000cc, + 0x00010cdc, 0x00010c9c, 0x00001fc7, 0x0300013a, + 0x0000ff58, 0x0000ff38, 0x00001f37, 0x00001f3f, + 0x000118d4, 0x000118b4, 0x00001f99, 0x020000ee, + 0x00001e53, 0x00001e52, 0x0001042b, 0x00010403, + 0x000118d2, 0x000118b2, 0x00002d12, 0x000010b2, + 0x0000056d, 0x0000053d, 0x000010e4, 0x00001ca4, + 0x00000292, 0x000001b7, 0x000004a5, 0x000004a4, + 0x0000010d, 0x0000010c, 0x0000a77f, 0x0000a77e, + 0x00016e71, 0x00016e51, 0x00001f33, 0x00001f3b, + 0x00000454, 0x00000404, 0x0000024b, 0x0000024a, + 0x0000abbf, 0x000013ef, 0x00002d13, 0x000010b3, + 0x00016e60, 0x00016e40, 0x00016e69, 0x00016e49, + 0x00000587, 0x0200006b, 0x0000010f, 0x0000010e, + 0x0001044b, 0x00010423, 0x00002c46, 0x00002c16, + 0x00001f8c, 0x020000df, 0x0000ff55, 0x0000ff35, + 0x00010cee, 0x00010cae, 0x0000a79b, 0x0000a79a, + 0x00000565, 0x00000535, 0x000003c4, 0x000003a4, + 0x000010de, 0x00001c9e, 0x00002d20, 0x000010c0, + 0x0000fb14, 0x02000071, 0x000010ef, 0x00001caf, + 0x000013fa, 0x000013f2, 0x0000a733, 0x0000a732, + 0x00001fc4, 0x0200012d, 0x00016e67, 0x00016e47, + 0x000003af, 0x0000038a, 0x000010f1, 0x00001cb1, + 0x00000153, 0x00000152, 0x00001eb3, 0x00001eb2, + 0x000010eb, 0x00001cab, 0x00002d05, 0x000010a5, + 0x0000ab9b, 0x000013cb, 0x00001fe4, 0x020000c6, + 0x00002c45, 0x00002c15, 0x00001e09, 0x00001e08, + 0x00002ce1, 0x00002ce0, 0x00000275, 0x0000019f, + 0x00010429, 0x00010401, 0x0000012b, 0x0000012a, + 0x00001f57, 0x00001f5f, 0x000118da, 0x000118ba, + 0x0000aba6, 0x000013d6, 0x00000101, 0x00000100, + 0x0000023f, 0x00002c7e, 0x00002c56, 0x00002c26, + 0x00001e7b, 0x00001e7a, 0x00001ecf, 0x00001ece, + 0x000000fa, 0x000000da, 0x00001f9c, 0x020000f7, + 0x0000ab7d, 0x000013ad, 0x00000287, 0x0000a7b1, + 0x0000a7bb, 0x0000a7ba, 0x0000ff47, 0x0000ff27, + 0x000003cc, 0x0000038c, 0x00001f88, 0x020000d3, + 0x00001f76, 0x00001fda, 0x00010ccf, 0x00010c8f, + 0x0000013e, 0x0000013d, 0x00000430, 0x00000410, + 0x00001e7d, 0x00001e7c, 0x0000029e, 0x0000a7b0, + 0x000003c9, 0x000003a9, 0x00000438, 0x00000418, + 0x0000ab8f, 0x000013bf, 0x000003db, 0x000003da, + 0x0000a685, 0x0000a684, 0x00002c33, 0x00002c03, + 0x0000011f, 0x0000011e, 0x00001d7d, 0x00002c63, + 0x00000441, 0x00000421, 0x00000161, 0x00000160, + 0x00001e7f, 0x00001e7e, 0x00000477, 0x00000476, + 0x00001fa9, 0x02000106, 0x00000571, 0x00000541, + 0x0000fb03, 0x0300005d, 0x000003ba, 0x0000039a, + 0x0000ab84, 0x000013b4, 0x00010cf2, 0x00010cb2, + 0x0000ab9f, 0x000013cf, 0x000001d4, 0x000001d3, + 0x0000217f, 0x0000216f, 0x0001043f, 0x00010417, + 0x0001e93f, 0x0001e91d, 0x0000012d, 0x0000012c, + 0x000104f1, 0x000104c9, 0x000004ca, 0x000004c9, + 0x000104f3, 0x000104cb, 0x00001e31, 0x00001e30, + 0x000001e9, 0x000001e8, 0x000001c8, 0x000001c7, + 0x00010cc0, 0x00010c80, 0x00002cc1, 0x00002cc0, + 0x00001e83, 0x00001e82, 0x00001f04, 0x00001f0c, + 0x0000a793, 0x0000a792, 0x00001ffc, 0x02000121, + 0x00002c3f, 0x00002c0f, 0x000003fb, 0x000003fa, + 0x0000015d, 0x0000015c, 0x000004d3, 0x000004d2, + 0x00010436, 0x0001040e, 0x00001f24, 0x00001f2c, + 0x0000043b, 0x0000041b, 0x0000ab8e, 0x000013be, + 0x00001ee3, 0x00001ee2, 0x000118cf, 0x000118af, + 0x00001e99, 0x02000094, 0x00010448, 0x00010420, + 0x00000063, 0x00000043, 0x0000037c, 0x000003fe, + 0x000118d9, 0x000118b9, 0x00002175, 0x00002165, + 0x00001f66, 0x00001f6e, 0x0000ff46, 0x0000ff26, + 0x0000a74b, 0x0000a74a, 0x0000ab94, 0x000013c4, + 0x00000461, 0x00000460, 0x0000a799, 0x0000a798, + 0x00001e27, 0x00001e26, 0x0000ff52, 0x0000ff32, + 0x00001e03, 0x00001e02, 0x0000ab89, 0x000013b9, + 0x00000440, 0x00000420, 0x0000ff4a, 0x0000ff2a, + 0x000104ec, 0x000104c4, 0x0000a72b, 0x0000a72a, + 0x0001042d, 0x00010405, 0x0000a68d, 0x0000a68c, + 0x000001c5, 0x000001c4, 0x00000455, 0x00000405, + 0x000004b9, 0x000004b8, 0x0000a7a1, 0x0000a7a0, + 0x000004ef, 0x000004ee, 0x0000ab99, 0x000013c9, + 0x00010ce4, 0x00010ca4, 0x00010cc6, 0x00010c86, + 0x00002c9b, 0x00002c9a, 0x00001e8b, 0x00001e8a, + 0x0000abad, 0x000013dd, 0x0000a787, 0x0000a786, + 0x00002d22, 0x000010c2, 0x00002c95, 0x00002c94, + 0x000000fe, 0x000000de, 0x00001fa0, 0x02000030, + 0x000004db, 0x000004da, 0x00000131, 0x00000049, + 0x0000ff53, 0x0000ff33, 0x00000479, 0x00000478, + 0x0000a735, 0x0000a734, 0x00001f80, 0x02000000, + 0x00010cce, 0x00010c8e, 0x0000a697, 0x0000a696, + 0x000010d7, 0x00001c97, 0x00000071, 0x00000051, + 0x00001e2d, 0x00001e2c, 0x000004f1, 0x000004f0, + 0x00000211, 0x00000210, 0x00001e67, 0x00001e66, + 0x00002c40, 0x00002c10, 0x0000a661, 0x0000a660, + 0x00000117, 0x00000116, 0x00001e39, 0x00001e38, + 0x000000b5, 0x0000039c, 0x0000a657, 0x0000a656, + 0x000003c7, 0x000003a7, 0x00001f31, 0x00001f39, + 0x00010ceb, 0x00010cab, 0x0001044f, 0x00010427, + 0x00001e47, 0x00001e46, 0x000000e9, 0x000000c9, + 0x00010430, 0x00010408, 0x00010441, 0x00010419, + 0x0000ff5a, 0x0000ff3a, 0x0000a653, 0x0000a652, + 0x00001ee1, 0x00001ee0, 0x00000481, 0x00000480, + 0x000001cb, 0x000001ca, 0x000003b8, 0x00000398, + 0x000003f3, 0x0000037f, 0x00010443, 0x0001041b, + 0x00000157, 0x00000156, 0x00002c87, 0x00002c86, + 0x00002cdb, 0x00002cda, 0x000010d4, 0x00001c94, + 0x000000e5, 0x000000c5, 0x00002c48, 0x00002c18, + 0x00000583, 0x00000553, 0x0000044f, 0x0000042f, + 0x0000a691, 0x0000a690, 0x000118cb, 0x000118ab, + 0x00000188, 0x00000187, 0x0001e929, 0x0001e907, + 0x00000443, 0x00000423, 0x00001fb0, 0x00001fb8, + 0x0001e927, 0x0001e905, 0x00000249, 0x00000248, + 0x000010e6, 0x00001ca6, 0x00000501, 0x00000500, + 0x0000a69b, 0x0000a69a, 0x00001e0f, 0x00001e0e, + 0x0000056f, 0x0000053f, 0x000000ef, 0x000000cf, + 0x0000a729, 0x0000a728, 0x00000517, 0x00000516, + 0x00002173, 0x00002163, 0x0000a73b, 0x0000a73a, + 0x000000f8, 0x000000d8, 0x00010cd8, 0x00010c98, + 0x00001e4f, 0x00001e4e, 0x000003d5, 0x000003a6, + 0x000104f0, 0x000104c8, 0x00002cd9, 0x00002cd8, + 0x00000577, 0x00000547, 0x0000019e, 0x00000220, + 0x00002c34, 0x00002c04, 0x00000261, 0x0000a7ac, + 0x00000505, 0x00000504, 0x00000569, 0x00000539, + 0x00000570, 0x00000540, 0x00002c68, 0x00002c67, + 0x000010fe, 0x00001cbe, 0x00000103, 0x00000102, + 0x0001e928, 0x0001e906, 0x000003e7, 0x000003e6, + 0x00001f51, 0x00001f59, 0x0000abbc, 0x000013ec, + 0x00002ccb, 0x00002cca, 0x00001e89, 0x00001e88, + 0x000010d9, 0x00001c99, 0x000118d1, 0x000118b1, + 0x00002c5e, 0x00002c2e, 0x00016e70, 0x00016e50, + 0x000001e1, 0x000001e0, 0x00001e3d, 0x00001e3c, + 0x00001f26, 0x00001f2e, 0x00000173, 0x00000172, + 0x0000a655, 0x0000a654, 0x0000043d, 0x0000041d, + 0x00010ce0, 0x00010ca0, 0x0000abae, 0x000013de, + 0x00000121, 0x00000120, 0x00001edd, 0x00001edc, + 0x0000ab79, 0x000013a9, 0x000000f0, 0x000000d0, + 0x00001e15, 0x00001e14, 0x0000aba3, 0x000013d3, + 0x0001044c, 0x00010424, 0x00016e6d, 0x00016e4d, + 0x00002c76, 0x00002c75, 0x00000165, 0x00000164, + 0x000004c2, 0x000004c1, 0x0000047d, 0x0000047c, + 0x00001fe7, 0x030000cc, 0x00000074, 0x00000054, + 0x00002cf3, 0x00002cf2, 0x00001ef7, 0x00001ef6, + 0x000010e1, 0x00001ca1, 0x000104e0, 0x000104b8, + 0x00001e57, 0x00001e56, 0x000104f6, 0x000104ce, + 0x000118c4, 0x000118a4, 0x00001f91, 0x0200001b, + 0x0000045b, 0x0000040b, 0x0001044d, 0x00010425, + 0x00000449, 0x00000429, 0x000004a3, 0x000004a2, + 0x00001fe3, 0x030000c2, 0x00000207, 0x00000206, + 0x00002d1d, 0x000010bd, 0x00000250, 0x00002c6f, + 0x00002d1e, 0x000010be, 0x00000195, 0x000001f6, + 0x0000a647, 0x0000a646, 0x0000ab82, 0x000013b2, + 0x0000a767, 0x0000a766, 0x00001e71, 0x00001e70, + 0x0001e940, 0x0001e91e, 0x000003c8, 0x000003a8, + 0x000010ea, 0x00001caa, 0x000004f3, 0x000004f2, + 0x00000129, 0x00000128, 0x00000451, 0x00000401, + 0x00002c73, 0x00002c72, 0x00001eab, 0x00001eaa, + 0x0000019a, 0x0000023d, 0x000104f9, 0x000104d1, + 0x00000242, 0x00000241, 0x0000ab71, 0x000013a1, + 0x00002c4d, 0x00002c1d, 0x00010cf1, 0x00010cb1, + 0x000001a8, 0x000001a7, 0x00002179, 0x00002169, + 0x00001d79, 0x0000a77d, 0x00002d17, 0x000010b7, + 0x0000016d, 0x0000016c, 0x00001f78, 0x00001ff8, + 0x00016e65, 0x00016e45, 0x00010ce2, 0x00010ca2, + 0x00000567, 0x00000537, 0x00002c3b, 0x00002c0b, + 0x00001ead, 0x00001eac, 0x000004df, 0x000004de, + 0x00000266, 0x0000a7aa, 0x0000aba2, 0x000013d2, + 0x0000ff4f, 0x0000ff2f, 0x0000a761, 0x0000a760, + 0x0001e937, 0x0001e915, 0x00001f60, 0x00001f68, + 0x00000148, 0x00000147, 0x0001e939, 0x0001e917, + 0x00000497, 0x00000496, 0x0000a7a3, 0x0000a7a2, + 0x00002ccd, 0x00002ccc, 0x00002c3d, 0x00002c0d, + 0x00000509, 0x00000508, 0x0000ff4d, 0x0000ff2d, + 0x00000185, 0x00000184, 0x00001f63, 0x00001f6b, + 0x00001ebb, 0x00001eba, 0x000003be, 0x0000039e, + 0x0000a643, 0x0000a642, 0x00010cf0, 0x00010cb0, + 0x00001fbc, 0x0200011b, 0x000104fa, 0x000104d2, + 0x00000066, 0x00000046, 0x00016e6a, 0x00016e4a, + 0x00001c87, 0x00000462, 0x00001f54, 0x030000a1, + 0x00001f8d, 0x020000e2, 0x000003ac, 0x00000386, + 0x00000371, 0x00000370, 0x00001ec5, 0x00001ec4, + 0x000010dd, 0x00001c9d, 0x0000029d, 0x0000a7b2, + 0x0000a641, 0x0000a640, 0x00001f8a, 0x020000d9, + 0x00000215, 0x00000214, 0x00001eef, 0x00001eee, + 0x00000527, 0x00000526, 0x0000a665, 0x0000a664, + 0x00000568, 0x00000538, 0x00002176, 0x00002166, + 0x00001fa7, 0x02000045, 0x00001e19, 0x00001e18, + 0x000003cd, 0x0000038e, 0x00001f07, 0x00001f0f, + 0x0000abb5, 0x000013e5, 0x00002c43, 0x00002c13, + 0x00001e43, 0x00001e42, 0x000004fd, 0x000004fc, + 0x00010432, 0x0001040a, 0x000003f2, 0x000003f9, + 0x0000023c, 0x0000023b, 0x000001b0, 0x000001af, + 0x0000a693, 0x0000a692, 0x00000448, 0x00000428, + 0x000003e3, 0x000003e2, 0x00001e21, 0x00001e20, + 0x000001eb, 0x000001ea, 0x00002ca3, 0x00002ca2, + 0x0001e941, 0x0001e91f, 0x00000584, 0x00000554, + 0x00001e2f, 0x00001e2e, 0x000118db, 0x000118bb, + 0x0000026f, 0x0000019c, 0x0000abb4, 0x000013e4, + 0x00002c3e, 0x00002c0e, 0x00000452, 0x00000402, + 0x000010dc, 0x00001c9c, 0x0000028a, 0x000001b1, + 0x000024d6, 0x000024bc, 0x00001f98, 0x020000eb, + 0x0000050b, 0x0000050a, 0x00000439, 0x00000419, + 0x00001e37, 0x00001e36, 0x00000113, 0x00000112, + 0x00000072, 0x00000052, 0x00001f90, 0x02000018, + 0x00002c4f, 0x00002c1f, 0x00001e29, 0x00001e28, + 0x00001fb4, 0x02000127, 0x0000021d, 0x0000021c, + 0x0000abba, 0x000013ea, 0x00010cdd, 0x00010c9d, + 0x0000a66d, 0x0000a66c, 0x00001f21, 0x00001f29, + 0x000118c1, 0x000118a1, 0x00010ce6, 0x00010ca6, + 0x00000457, 0x00000407, 0x000003c1, 0x000003a1, + 0x0000ab72, 0x000013a2, 0x000010f7, 0x00001cb7, + 0x00002c4b, 0x00002c1b, 0x00001e4b, 0x00001e4a, + 0x00001f93, 0x02000021, 0x00000263, 0x00000194, + 0x0001e92d, 0x0001e90b, 0x00010cc3, 0x00010c83, + 0x000003ca, 0x000003aa, 0x00000209, 0x00000208, + 0x000024d7, 0x000024bd, 0x00000105, 0x00000104, + 0x0000fb04, 0x03000061, 0x00002d04, 0x000010a4, + 0x00001e61, 0x00001e60, 0x00010cca, 0x00010c8a, + 0x000000e1, 0x000000c1, 0x00001e97, 0x0200008e, + 0x0001e935, 0x0001e913, 0x0000a791, 0x0000a790, + 0x0001044a, 0x00010422, 0x00016e74, 0x00016e54, + 0x00000219, 0x00000218, 0x00001fb6, 0x020000a9, + 0x00016e7b, 0x00016e5b, 0x00000434, 0x00000414, + 0x000024e4, 0x000024ca, 0x00001ea9, 0x00001ea8, + 0x00001f75, 0x00001fcb, 0x00001f70, 0x00001fba, + 0x000024e0, 0x000024c6, 0x0000a781, 0x0000a780, + 0x000010ed, 0x00001cad, 0x0000a79d, 0x0000a79c, + 0x00000459, 0x00000409, 0x000001f0, 0x02000088, + 0x00000076, 0x00000056, 0x0000ab92, 0x000013c2, + 0x0000ab96, 0x000013c6, 0x000001f2, 0x000001f1, + 0x00001ec9, 0x00001ec8, 0x000118c7, 0x000118a7, + 0x000000f3, 0x000000d3, 0x00001e1b, 0x00001e1a, + 0x000024d9, 0x000024bf, 0x00001ef3, 0x00001ef2, + 0x000004a9, 0x000004a8, 0x000104e2, 0x000104ba, + 0x00001fae, 0x02000115, 0x0001e92c, 0x0001e90a, + 0x00000260, 0x00000193, 0x0001043d, 0x00010415, + 0x0000052b, 0x0000052a, 0x000003b0, 0x03000084, + 0x00001e9a, 0x02000097, 0x0000047f, 0x0000047e, + 0x0000012f, 0x0000012e, 0x0001e930, 0x0001e90e, + 0x00002d09, 0x000010a9, 0x00001f03, 0x00001f0b, + 0x000004b1, 0x000004b0, 0x00000579, 0x00000549, + 0x00001e81, 0x00001e80, 0x000001da, 0x000001d9, + 0x0000a76d, 0x0000a76c, 0x00001e35, 0x00001e34, + 0x000104db, 0x000104b3, 0x000001ad, 0x000001ac, + 0x00001f95, 0x02000027, 0x0000ab8a, 0x000013ba, + 0x00000137, 0x00000136, 0x0000ff59, 0x0000ff39, + 0x00016e6c, 0x00016e4c, 0x000000ff, 0x00000178, + 0x00000203, 0x00000202, 0x0001042f, 0x00010407, + 0x00001ed9, 0x00001ed8, 0x00010ce8, 0x00010ca8, + 0x000000f6, 0x000000d6, 0x00010cef, 0x00010caf, + 0x00016e61, 0x00016e41, 0x0000026b, 0x00002c62, + 0x00000507, 0x00000506, 0x000010e7, 0x00001ca7, + 0x000001bf, 0x000001f7, 0x0000a79f, 0x0000a79e, + 0x00000471, 0x00000470, 0x0000045c, 0x0000040c, + 0x00000119, 0x00000118, 0x00002d11, 0x000010b1, + 0x00001efb, 0x00001efa, 0x00000254, 0x00000186, + 0x00002c49, 0x00002c19, 0x00000159, 0x00000158, + 0x00000562, 0x00000532, 0x0000a763, 0x0000a762, + 0x0000044b, 0x0000042b, 0x00010439, 0x00010411, + 0x00000566, 0x00000536, 0x000010f4, 0x00001cb4, + 0x0000ab8c, 0x000013bc, 0x000000f5, 0x000000d5, + 0x00001e6b, 0x00001e6a, 0x000003f1, 0x000003a1, + 0x00000256, 0x00000189, 0x0000ff42, 0x0000ff22, + 0x00002c9d, 0x00002c9c, 0x0000044c, 0x0000042c, + 0x00000491, 0x00000490, 0x0001042c, 0x00010404, + 0x0001e93a, 0x0001e918, 0x00000247, 0x00000246, + 0x00016e64, 0x00016e44, 0x0000a7c8, 0x0000a7c7, + 0x000004d1, 0x000004d0, 0x00000177, 0x00000176, + 0x0000ff51, 0x0000ff31, 0x000004ed, 0x000004ec, + 0x000003d7, 0x000003cf, 0x00000580, 0x00000550, + 0x00002cb7, 0x00002cb6, 0x00001ea1, 0x00001ea0, + 0x00002c30, 0x00002c00, 0x0000043a, 0x0000041a, + 0x00001e13, 0x00001e12, 0x0000217c, 0x0000216c, + 0x000118cc, 0x000118ac, 0x00001f79, 0x00001ff9, + 0x0000052d, 0x0000052c, 0x000001ff, 0x000001fe, + 0x00002ca7, 0x00002ca6, 0x00000431, 0x00000411, + 0x00001fa3, 0x02000039, 0x00001e6f, 0x00001e6e, + 0x000010f3, 0x00001cb3, 0x00001f44, 0x00001f4c, + 0x00002ce3, 0x00002ce2, 0x00010ccd, 0x00010c8d, + 0x00001e63, 0x00001e62, 0x0000052f, 0x0000052e, + 0x00010434, 0x0001040c, 0x00001f81, 0x02000003, + 0x00002c32, 0x00002c02, 0x000010ec, 0x00001cac, + 0x00001f50, 0x0200009a, 0x0000abbb, 0x000013eb, + 0x0000049b, 0x0000049a, 0x00001e23, 0x00001e22, + 0x0001e942, 0x0001e920, 0x000003f8, 0x000003f7, + 0x00000582, 0x00000552, 0x00002cc5, 0x00002cc4, + 0x00001ee5, 0x00001ee4, 0x0000ab53, 0x0000a7b3, + 0x00001f22, 0x00001f2a, 0x000104ef, 0x000104c7, + 0x000024e5, 0x000024cb, 0x00001f20, 0x00001f28, + 0x0001e924, 0x0001e902, 0x00001fa4, 0x0200003c, + 0x00000171, 0x00000170, 0x00001c81, 0x00000414, + 0x000104df, 0x000104b7, 0x00001f89, 0x020000d6, + 0x000001d0, 0x000001cf, 0x0000037d, 0x000003ff, + 0x00001e55, 0x00001e54, 0x000010d1, 0x00001c91, + 0x00010ce3, 0x00010ca3, 0x00001e07, 0x00001e06, + 0x00001f9b, 0x020000f4, 0x0000a76b, 0x0000a76a, + 0x0000a739, 0x0000a738, 0x00000521, 0x00000520, + 0x000104e6, 0x000104be, 0x0000017a, 0x00000179, + 0x000004eb, 0x000004ea, 0x00001fab, 0x0200010c, + 0x000003eb, 0x000003ea, 0x000003c3, 0x000003a3, + 0x00000079, 0x00000059, 0x000000ea, 0x000000ca, + 0x00002d23, 0x000010c3, 0x000013fb, 0x000013f3, + 0x00000069, 0x00000049, 0x00000265, 0x0000a78d, + 0x00001f94, 0x02000024, 0x00002ca1, 0x00002ca0, + 0x000001a5, 0x000001a4, 0x00001ed7, 0x00001ed6, + 0x000004a1, 0x000004a0, 0x00001ff7, 0x0300013e, + 0x0000a699, 0x0000a698, 0x00000433, 0x00000413, + 0x000003d0, 0x00000392, 0x0000a73d, 0x0000a73c, + 0x00002c85, 0x00002c84, 0x00001c88, 0x0000a64a, + 0x00010cc4, 0x00010c84, 0x00010431, 0x00010409, + 0x000104dd, 0x000104b5, 0x00000581, 0x00000551, + 0x00000227, 0x00000226, 0x000010d8, 0x00001c98, + 0x000004ad, 0x000004ac, 0x0000014b, 0x0000014a, + 0x0001e943, 0x0001e921, 0x00010ced, 0x00010cad, + 0x0000ab9a, 0x000013ca, 0x00001f56, 0x030000a5, + 0x00002cc7, 0x00002cc6, 0x00001ec3, 0x00001ec2, + 0x00000229, 0x00000228, 0x000118de, 0x000118be, + 0x00002cec, 0x00002ceb, 0x00001fbe, 0x00000399, + 0x00000253, 0x00000181, 0x00001f7b, 0x00001feb, + 0x0000aba4, 0x000013d4, 0x00016e66, 0x00016e46, + 0x00001fcc, 0x0200011e, 0x0001e92e, 0x0001e90c, + 0x00001ff4, 0x02000133, 0x00010cec, 0x00010cac, + 0x000003c0, 0x000003a0, 0x00001f13, 0x00001f1b, + 0x0000abb3, 0x000013e3, 0x000104e4, 0x000104bc, + 0x00002cab, 0x00002caa, 0x00016e62, 0x00016e42, + 0x0000057d, 0x0000054d, 0x00001f92, 0x0200001e, + 0x000000df, 0x02000051, 0x000001ed, 0x000001ec, + 0x000024d0, 0x000024b6, 0x000024dc, 0x000024c2, + 0x00001fe1, 0x00001fe9, 0x00001f9f, 0x02000100, + 0x000003bf, 0x0000039f, 0x00000205, 0x00000204, + 0x000004b3, 0x000004b2, 0x000001d8, 0x000001d7, + 0x0000045a, 0x0000040a, 0x000118cd, 0x000118ad, + 0x000104e3, 0x000104bb, 0x00010cea, 0x00010caa, + 0x00002172, 0x00002162, 0x00001fd0, 0x00001fd8, + 0x00010447, 0x0001041f, 0x0000abb9, 0x000013e9, + 0x0000011d, 0x0000011c, 0x000003bc, 0x0000039c, + 0x0000fb05, 0x02000065, 0x000003df, 0x000003de, + 0x0000a743, 0x0000a742, 0x000003cb, 0x000003ab, + 0x00001eb7, 0x00001eb6, 0x00001eeb, 0x00001eea, + 0x0000a76f, 0x0000a76e, 0x0000ab98, 0x000013c8, + 0x00016e7c, 0x00016e5c, 0x00016e68, 0x00016e48, + 0x00000073, 0x00000053, 0x00016e6e, 0x00016e4e, + 0x000004ff, 0x000004fe, 0x0000a689, 0x0000a688, + 0x00000473, 0x00000472, 0x00010cd6, 0x00010c96, + 0x0001e922, 0x0001e900, 0x000001f3, 0x000001f1, + 0x00010ce9, 0x00010ca9, 0x0000aba7, 0x000013d7, + 0x00002c57, 0x00002c27, 0x00010cc7, 0x00010c87, + 0x00002cd7, 0x00002cd6, 0x0000a765, 0x0000a764, + 0x0000a749, 0x0000a748, 0x0000057e, 0x0000054e, + 0x000003b6, 0x00000396, 0x0000013a, 0x00000139, + 0x000000fc, 0x000000dc, 0x000000fb, 0x000000db, + 0x0000a68b, 0x0000a68a, 0x00000280, 0x000001a6, + 0x00001f7c, 0x00001ffa, 0x000004c4, 0x000004c3, + 0x000104e1, 0x000104b9, 0x00002c39, 0x00002c09, + 0x00001f74, 0x00001fca, 0x00001f10, 0x00001f18, + 0x000104d9, 0x000104b1, 0x00016e78, 0x00016e58, + 0x000001fb, 0x000001fa, 0x000024df, 0x000024c5, + 0x000004d5, 0x000004d4, 0x0000a64b, 0x0000a64a, + 0x0000ff57, 0x0000ff37, 0x000004e5, 0x000004e4, + 0x00001f73, 0x00001fc9, 0x000010e8, 0x00001ca8, + 0x00002cb3, 0x00002cb2, 0x00001e9b, 0x00001e60, + 0x00002c4a, 0x00002c1a, 0x00002c54, 0x00002c24, + 0x0000abbe, 0x000013ee, 0x0000048b, 0x0000048a, + 0x00000223, 0x00000222, 0x0001e93b, 0x0001e919, + 0x00002184, 0x00002183, 0x00000169, 0x00000168, + 0x00001e98, 0x02000091, 0x000104e7, 0x000104bf, + 0x00001fc3, 0x0200004b, 0x0000ff44, 0x0000ff24, + 0x00002cc3, 0x00002cc2, 0x00010cc2, 0x00010c82, + 0x000004ab, 0x000004aa, 0x00002c41, 0x00002c11, + 0x0000a695, 0x0000a694, 0x00016e7d, 0x00016e5d, + 0x000118c8, 0x000118a8, 0x00001f83, 0x02000009, + 0x000013fc, 0x000013f4, 0x00000155, 0x00000154, + 0x000010da, 0x00001c9a, 0x0000ab88, 0x000013b8, + 0x0000a7a5, 0x0000a7a4, 0x00000447, 0x00000427, + 0x000003bd, 0x0000039d, 0x00001f55, 0x00001f5d, + 0x00001fa8, 0x02000103, 0x00002c99, 0x00002c98, + 0x00001ff6, 0x020000d0, 0x00002ccf, 0x00002cce, + 0x0000a797, 0x0000a796, 0x000104f7, 0x000104cf, + 0x000024e9, 0x000024cf, 0x000001e7, 0x000001e6, + 0x00001fa2, 0x02000036, 0x000004dd, 0x000004dc, + 0x000001dd, 0x0000018e, 0x00001c83, 0x00000421, + 0x0000047b, 0x0000047a, 0x00001f67, 0x00001f6f, + 0x00001e3b, 0x00001e3a, 0x00002cbb, 0x00002cba, + 0x00000283, 0x000001a9, 0x000010d3, 0x00001c93, + 0x00002c59, 0x00002c29, 0x00000123, 0x00000122, + 0x00002caf, 0x00002cae, 0x000118d3, 0x000118b3, + 0x0001e92b, 0x0001e909, 0x00000523, 0x00000522, + 0x0000022f, 0x0000022e, 0x00000575, 0x00000545, + 0x00002cd1, 0x00002cd0, 0x000000fd, 0x000000dd, + 0x000001c9, 0x000001c7, 0x000003c5, 0x000003a5, + 0x00000288, 0x000001ae, 0x000010e5, 0x00001ca5, + 0x000024e2, 0x000024c8, 0x00001e41, 0x00001e40, + 0x000024de, 0x000024c4, 0x0000a755, 0x0000a754, + 0x0001e923, 0x0001e901, 0x000010e2, 0x00001ca2, + 0x000000eb, 0x000000cb, 0x0000a659, 0x0000a658, + 0x000004d9, 0x000004d8, 0x0000a65f, 0x0000a65e, + 0x000118d5, 0x000118b5, 0x0000fb01, 0x02000057, + 0x0000a65d, 0x0000a65c, 0x0000028b, 0x000001b2, + 0x00002c61, 0x00002c60, 0x00001e0d, 0x00001e0c, + 0x0000a64d, 0x0000a64c, 0x000118c2, 0x000118a2, + 0x0001e93c, 0x0001e91a, 0x00000585, 0x00000555, + 0x000000ed, 0x000000cd, 0x000004fb, 0x000004fa, + 0x000000e8, 0x000000c8, 0x000004cc, 0x000004cb, + 0x00001c80, 0x00000412, 0x000004ce, 0x000004cd, + 0x0000057b, 0x0000054b, 0x00002c6c, 0x00002c6b, + 0x000003b3, 0x00000393, 0x00016e75, 0x00016e55, + 0x000010d0, 0x00001c90, 0x0001042e, 0x00010406, + 0x0001e93d, 0x0001e91b, 0x00001e0b, 0x00001e0a, + 0x0000a723, 0x0000a722, 0x0000a7b5, 0x0000a7b4, + 0x00002c6a, 0x00002c69, 0x0000a669, 0x0000a668, + 0x000118d8, 0x000118b8, 0x000001dc, 0x000001db, + 0x000000f1, 0x000000d1, 0x00001d8e, 0x0000a7c6, + 0x000003ef, 0x000003ee, 0x0000a747, 0x0000a746, + 0x0000ab87, 0x000013b7, 0x0000016f, 0x0000016e, + 0x0000217e, 0x0000216e, 0x00001e79, 0x00001e78, + 0x000118ce, 0x000118ae, 0x00001e3f, 0x00001e3e, + 0x0000051f, 0x0000051e, 0x00000175, 0x00000174, + 0x00001f12, 0x00001f1a, 0x0000017e, 0x0000017d, + 0x00001f72, 0x00001fc8, 0x0000a65b, 0x0000a65a, + 0x00001ee9, 0x00001ee8, 0x0000026c, 0x0000a7ad, + 0x000004f7, 0x000004f6, 0x0001e931, 0x0001e90f, + 0x00001e91, 0x00001e90, 0x000010db, 0x00001c9b, + 0x000118ca, 0x000118aa, 0x00001c86, 0x0000042a, + 0x0000a77c, 0x0000a77b, 0x000004af, 0x000004ae, + 0x0000a68f, 0x0000a68e, 0x00001f96, 0x0200002a, + 0x00000109, 0x00000108, 0x00001ed1, 0x00001ed0, + 0x0000abb0, 0x000013e0, 0x0000abab, 0x000013db, + 0x000010d6, 0x00001c96, 0x000003e5, 0x000003e4, + 0x00001e87, 0x00001e86, 0x0000ab81, 0x000013b1, + 0x00002d1b, 0x000010bb, 0x00001e11, 0x00001e10, + 0x00016e77, 0x00016e57, 0x0000017f, 0x00000053, + 0x0000ff45, 0x0000ff25, 0x00001f9a, 0x020000f1, + 0x0000043e, 0x0000041e, 0x00001e65, 0x00001e64, + 0x00000475, 0x00000474, 0x00010cd2, 0x00010c92, + 0x0000a794, 0x0000a7c4, 0x000003b5, 0x00000395, + 0x00001ef1, 0x00001ef0, 0x00016e7f, 0x00016e5f, + 0x00002c5d, 0x00002c2d, 0x00001e1d, 0x00001e1c, + 0x0000025c, 0x0000a7ab, 0x0000025b, 0x00000190, + 0x00001f87, 0x02000015, 0x00000144, 0x00000143, + 0x000003ae, 0x00000389, 0x0000abb6, 0x000013e6, + 0x00010ce1, 0x00010ca1, 0x00000111, 0x00000110, + 0x0000a78c, 0x0000a78b, 0x00000437, 0x00000417, + 0x00002d16, 0x000010b6, 0x0000ff4b, 0x0000ff2b, + 0x00002c83, 0x00002c82, 0x0000a72f, 0x0000a72e, + 0x000118c3, 0x000118a3, 0x000003c6, 0x000003a6, + 0x00000436, 0x00000416, 0x000003d9, 0x000003d8, + 0x000001b4, 0x000001b3, 0x00001f64, 0x00001f6c, + 0x000024d2, 0x000024b8, 0x0000a74d, 0x0000a74c, + 0x000003b2, 0x00000392, 0x000004bf, 0x000004be, + 0x0001e933, 0x0001e911, 0x00001f34, 0x00001f3c, + 0x00002cd3, 0x00002cd2, 0x00001eb5, 0x00001eb4, + 0x00002c31, 0x00002c01, 0x000104de, 0x000104b6, + 0x00002cc9, 0x00002cc8, 0x00002d1a, 0x000010ba, + 0x0000a727, 0x0000a726, 0x000000ee, 0x000000ce, + 0x00002c5c, 0x00002c2c, 0x00000564, 0x00000534, + 0x00001f06, 0x00001f0e, 0x0000ab70, 0x000013a0, + 0x00010cda, 0x00010c9a, 0x0000ab9d, 0x000013cd, + 0x00010ccc, 0x00010c8c, 0x00000062, 0x00000042, + 0x00001f32, 0x00001f3a, 0x000104da, 0x000104b2, + 0x00000572, 0x00000542, 0x0000044a, 0x0000042a, + 0x0000a753, 0x0000a752, 0x000010e0, 0x00001ca0, + 0x0000051d, 0x0000051c, 0x000001a3, 0x000001a2, + 0x00001ecb, 0x00001eca, 0x000000f2, 0x000000d2, + 0x00001e96, 0x0200008b, 0x0000ab9c, 0x000013cc, + 0x000000e3, 0x000000c3, 0x00001f41, 0x00001f49, + 0x0000ab8b, 0x000013bb, 0x0000006f, 0x0000004f, + 0x0000ff4e, 0x0000ff2e, 0x000118c9, 0x000118a9, + 0x00001f7a, 0x00001fea, 0x000104ed, 0x000104c5, + 0x00010446, 0x0001041e, 0x000001b9, 0x000001b8, + 0x0000ab91, 0x000013c1, 0x00002178, 0x00002168, + 0x0000006b, 0x0000004b, 0x00001c85, 0x00000422, + 0x000104e8, 0x000104c0, 0x0000021f, 0x0000021e, + 0x00000561, 0x00000531, 0x00000231, 0x00000230, + 0x00001ec1, 0x00001ec0, 0x000010d5, 0x00001c95, + 0x0000a681, 0x0000a680, 0x0000a645, 0x0000a644, + 0x000024d1, 0x000024b7, 0x0000a75f, 0x0000a75e, + 0x000024e1, 0x000024c7, 0x00000525, 0x00000524, + 0x0000013c, 0x0000013b, 0x0000217a, 0x0000216a, + 0x00000465, 0x00000464, 0x00001fa1, 0x02000033, + 0x00001e77, 0x00001e76, 0x00002d07, 0x000010a7, + 0x00002ca9, 0x00002ca8, 0x0000abb1, 0x000013e1, + 0x00016e7e, 0x00016e5e, 0x00001e45, 0x00001e44, + 0x00002d0a, 0x000010aa, 0x0000a75b, 0x0000a75a, + 0x00010cc5, 0x00010c85, 0x00002d10, 0x000010b0, + 0x0000045e, 0x0000040e, 0x0000a7b9, 0x0000a7b8, + 0x000004e7, 0x000004e6, 0x000000f9, 0x000000d9, 0x00001e25, 0x00001e24, 0x0000aba1, 0x000013d1, - 0x000118c7, 0x000118a7, 0x0000018c, 0x0000018b, - 0x00001e4d, 0x00001e4c, 0x000010e4, 0x00001ca4, - 0x000118d0, 0x000118b0, 0x00001ea7, 0x00001ea6, - 0x00010ceb, 0x00010cab, 0x000010d8, 0x00001c98, - 0x0000a64f, 0x0000a64e, 0x0001e929, 0x0001e907, - 0x0000011f, 0x0000011e, 0x0000ab94, 0x000013c4, - 0x00002d23, 0x000010c3, 0x0001e941, 0x0001e91f, - 0x00000345, 0x00000399, 0x0000ab77, 0x000013a7, - 0x00001ed1, 0x00001ed0, 0x0001e923, 0x0001e901, - 0x00001e1d, 0x00001e1c, 0x0000ab8f, 0x000013bf, - 0x00000582, 0x00000552, 0x00001f37, 0x00001f3f, - 0x00001fb2, 0x02000124, 0x00000249, 0x00000248, - 0x00001ec5, 0x00001ec4, 0x0000ff50, 0x0000ff30, - 0x00001e61, 0x00001e60, 0x0000043a, 0x0000041a, - 0x00000463, 0x00000462, 0x0000ff55, 0x0000ff35, - 0x00000215, 0x00000214, 0x00016e6d, 0x00016e4d, - 0x00010cda, 0x00010c9a, 0x00002175, 0x00002165, - 0x00001e6f, 0x00001e6e, 0x00000493, 0x00000492, - 0x00000587, 0x0200006b, 0x00002d09, 0x000010a9, - 0x00001f62, 0x00001f6a, 0x0000017a, 0x00000179, - 0x0000abaf, 0x000013df, 0x000118ce, 0x000118ae, - 0x000003b2, 0x00000392, 0x00001e0d, 0x00001e0c, - 0x000118da, 0x000118ba, 0x00002c3b, 0x00002c0b, - 0x00001f60, 0x00001f68, 0x00000117, 0x00000116, - 0x00001e3b, 0x00001e3a, 0x00000144, 0x00000143, - 0x0000ff5a, 0x0000ff3a, 0x0000029e, 0x0000a7b0, - 0x0000021f, 0x0000021e, 0x0000a79f, 0x0000a79e, - 0x000024e7, 0x000024cd, 0x000000e5, 0x000000c5, - 0x00016e66, 0x00016e46, 0x0000ab79, 0x000013a9, - 0x0000fb13, 0x0200006e, 0x00001f87, 0x02000015, - 0x0000a733, 0x0000a732, 0x0000fb06, 0x02000068, - 0x00002c3e, 0x00002c0e, 0x0001e93c, 0x0001e91a, - 0x0000ff53, 0x0000ff33, 0x0000a735, 0x0000a734, - 0x00002c42, 0x00002c12, 0x00001fb0, 0x00001fb8, - 0x00001e0b, 0x00001e0a, 0x00000577, 0x00000547, - 0x000004c2, 0x000004c1, 0x0000a7a3, 0x0000a7a2, - 0x000001e7, 0x000001e6, 0x0000044c, 0x0000042c, - 0x000010fe, 0x00001cbe, 0x00000229, 0x00000228, - 0x00001e93, 0x00001e92, 0x000001cc, 0x000001ca, - 0x000010e0, 0x00001ca0, 0x000118c2, 0x000118a2, - 0x00000072, 0x00000052, 0x000010f9, 0x00001cb9, - 0x00010cc4, 0x00010c84, 0x0000217d, 0x0000216d, - 0x000013fb, 0x000013f3, 0x000001bf, 0x000001f7, - 0x0000ab7c, 0x000013ac, 0x00001eb9, 0x00001eb8, - 0x0000028c, 0x00000245, 0x0000a791, 0x0000a790, - 0x000001ff, 0x000001fe, 0x00000459, 0x00000409, - 0x0001e936, 0x0001e914, 0x00001e7b, 0x00001e7a, - 0x000004e5, 0x000004e4, 0x00002c93, 0x00002c92, - 0x00001fe7, 0x030000cc, 0x00000101, 0x00000100, - 0x000003d1, 0x00000398, 0x0000abb9, 0x000013e9, - 0x0000ff44, 0x0000ff24, 0x00001e4b, 0x00001e4a, - 0x00000450, 0x00000400, 0x00010ce2, 0x00010ca2, - 0x000118cf, 0x000118af, 0x00001f91, 0x0200001b, - 0x00002c97, 0x00002c96, 0x00000564, 0x00000534, - 0x000003d6, 0x000003a0, 0x00010439, 0x00010411, - 0x00001fbe, 0x00000399, 0x00010cc9, 0x00010c89, - 0x000003cc, 0x0000038c, 0x000003dd, 0x000003dc, - 0x00002d04, 0x000010a4, 0x0000a72d, 0x0000a72c, - 0x0000044e, 0x0000042e, 0x00010442, 0x0001041a, - 0x00001f75, 0x00001fcb, 0x00002cd7, 0x00002cd6, - 0x00000449, 0x00000429, 0x0000006a, 0x0000004a, - 0x000001df, 0x000001de, 0x00000105, 0x00000104, - 0x0000abae, 0x000013de, 0x0000a65b, 0x0000a65a, - 0x00001ea9, 0x00001ea8, 0x00000445, 0x00000425, - 0x0000ab81, 0x000013b1, 0x00000140, 0x0000013f, - 0x00001efb, 0x00001efa, 0x00010cee, 0x00010cae, - 0x00002c89, 0x00002c88, 0x00000119, 0x00000118, - 0x0000a695, 0x0000a694, 0x000004b3, 0x000004b2, - 0x00000569, 0x00000539, 0x00002c51, 0x00002c21, - 0x00001e47, 0x00001e46, 0x0000015f, 0x0000015e, - 0x000001e9, 0x000001e8, 0x000118d2, 0x000118b2, - 0x00001f50, 0x0200009a, 0x00001e21, 0x00001e20, - 0x00002c34, 0x00002c04, 0x00000069, 0x00000049, - 0x0001e93e, 0x0001e91c, 0x00001ef3, 0x00001ef2, - 0x00002c59, 0x00002c29, 0x000010e9, 0x00001ca9, - 0x00000180, 0x00000243, 0x000001e3, 0x000001e2, - 0x00016e67, 0x00016e47, 0x00010ccc, 0x00010c8c, - 0x000104e4, 0x000104bc, 0x00000071, 0x00000051, - 0x000000f9, 0x000000d9, 0x0000ab9b, 0x000013cb, - 0x000003ce, 0x0000038f, 0x00001ee1, 0x00001ee0, - 0x0000019e, 0x00000220, 0x000010e7, 0x00001ca7, - 0x00002d1e, 0x000010be, 0x00010445, 0x0001041d, - 0x00001e35, 0x00001e34, 0x000010f8, 0x00001cb8, - 0x00000438, 0x00000418, 0x00001f55, 0x00001f5d, - 0x00016e77, 0x00016e57, 0x0000a76b, 0x0000a76a, - 0x000004d9, 0x000004d8, 0x00001fbc, 0x0200011b, - 0x00001e41, 0x00001e40, 0x00000146, 0x00000145, - 0x000010de, 0x00001c9e, 0x00001e89, 0x00001e88, - 0x00001e8f, 0x00001e8e, 0x000000e6, 0x000000c6, - 0x00010cd4, 0x00010c94, 0x0000022f, 0x0000022e, - 0x00001e91, 0x00001e90, 0x00002cbf, 0x00002cbe, - 0x0000057a, 0x0000054a, 0x00001ed3, 0x00001ed2, - 0x000024d9, 0x000024bf, 0x00001edf, 0x00001ede, - 0x0000a7b5, 0x0000a7b4, 0x00002d0b, 0x000010ab, - 0x0001e93a, 0x0001e918, 0x00001f95, 0x02000027, - 0x00001f41, 0x00001f49, 0x000118c5, 0x000118a5, - 0x00000259, 0x0000018f, 0x00016e6a, 0x00016e4a, - 0x0000ab76, 0x000013a6, 0x000003f8, 0x000003f7, - 0x000104d9, 0x000104b1, 0x000000ec, 0x000000cc, - 0x0000a66b, 0x0000a66a, 0x000010d3, 0x00001c93, - 0x000104f9, 0x000104d1, 0x00001e17, 0x00001e16, - 0x000003b0, 0x03000084, 0x000004ad, 0x000004ac, - 0x000003b3, 0x00000393, 0x00000253, 0x00000181, - 0x00001c82, 0x0000041e, 0x00010cce, 0x00010c8e, - 0x000003b8, 0x00000398, 0x0000a645, 0x0000a644, - 0x0000217b, 0x0000216b, 0x000104e7, 0x000104bf, - 0x0000044f, 0x0000042f, 0x0001e931, 0x0001e90f, - 0x0000013e, 0x0000013d, 0x0000ab99, 0x000013c9, - 0x000004c6, 0x000004c5, 0x000001d4, 0x000001d3, - 0x00016e61, 0x00016e41, 0x0000a657, 0x0000a656, - 0x0000217c, 0x0000216c, 0x000104f6, 0x000104ce, - 0x00001e3f, 0x00001e3e, 0x00000070, 0x00000050, - 0x000000e7, 0x000000c7, 0x000104e6, 0x000104be, - 0x000024e9, 0x000024cf, 0x00010cef, 0x00010caf, - 0x000004cf, 0x000004c0, 0x00000131, 0x00000049, - 0x00000107, 0x00000106, 0x00002d25, 0x000010c5, - 0x0000ab85, 0x000013b5, 0x00001ebb, 0x00001eba, - 0x00000271, 0x00002c6e, 0x00016e6c, 0x00016e4c, - 0x000000e8, 0x000000c8, 0x0000fb15, 0x02000074, - 0x0001e924, 0x0001e902, 0x00000133, 0x00000132, - 0x00000373, 0x00000372, 0x00000442, 0x00000422, - 0x000001c9, 0x000001c7, 0x00001fb6, 0x020000a9, - 0x00000561, 0x00000531, 0x0000ff51, 0x0000ff31, - 0x000104ed, 0x000104c5, 0x00001efd, 0x00001efc, - 0x00000578, 0x00000548, 0x0000ff46, 0x0000ff26, - 0x0000ff47, 0x0000ff27, 0x00001e98, 0x02000091, - 0x00002c38, 0x00002c08, 0x000001d0, 0x000001cf, - 0x000118d1, 0x000118b1, 0x000024d8, 0x000024be, - 0x00002c30, 0x00002c00, 0x00010ce9, 0x00010ca9, - 0x00001ebd, 0x00001ebc, 0x00001f31, 0x00001f39, - 0x0000010d, 0x0000010c, 0x0000abb1, 0x000013e1, - 0x0000aba7, 0x000013d7, 0x0001e93d, 0x0001e91b, - 0x0000a743, 0x0000a742, 0x0000ab7f, 0x000013af, - 0x00000437, 0x00000417, 0x0000024d, 0x0000024c, - 0x0000015b, 0x0000015a, 0x00002d01, 0x000010a1, - 0x000013f9, 0x000013f1, 0x00010443, 0x0001041b, - 0x00001e55, 0x00001e54, 0x0000a681, 0x0000a680, - 0x0000abac, 0x000013dc, 0x00002c83, 0x00002c82, - 0x000001f0, 0x02000088, 0x00000448, 0x00000428, - 0x00002178, 0x00002168, 0x000118c4, 0x000118a4, - 0x000000f8, 0x000000d8, 0x00002c81, 0x00002c80, - 0x00010ce4, 0x00010ca4, 0x000003c0, 0x000003a0, - 0x0001e92b, 0x0001e909, 0x00002cd5, 0x00002cd4, - 0x00002d07, 0x000010a7, 0x0000ab9c, 0x000013cc, - 0x000003bd, 0x0000039d, 0x0000a751, 0x0000a750, - 0x0000ab74, 0x000013a4, 0x000118c9, 0x000118a9, - 0x00001f22, 0x00001f2a, 0x000000ea, 0x000000ca, - 0x000004fd, 0x000004fc, 0x00000586, 0x00000556, - 0x00001ed9, 0x00001ed8, 0x00001e7f, 0x00001e7e, - 0x000118d7, 0x000118b7, 0x00001faa, 0x02000109, - 0x0000ff43, 0x0000ff23, 0x000003e5, 0x000003e4, - 0x0000043d, 0x0000041d, 0x000104da, 0x000104b2, - 0x000104df, 0x000104b7, 0x0000023c, 0x0000023b, - 0x00001f64, 0x00001f6c, 0x00010cd3, 0x00010c93, - 0x000003cb, 0x000003ab, 0x0001e93f, 0x0001e91d, - 0x0000a723, 0x0000a722, 0x0001043c, 0x00010414, - 0x0000ab91, 0x000013c1, 0x0001044e, 0x00010426, - 0x00000149, 0x0200007d, 0x00001ed7, 0x00001ed6, - 0x00001fd6, 0x020000b7, 0x00001f14, 0x00001f1c, - 0x0000a7a9, 0x0000a7a8, 0x00016e74, 0x00016e54, - 0x00002c49, 0x00002c19, 0x00000111, 0x00000110, - 0x00000068, 0x00000048, 0x0000045c, 0x0000040c, - 0x000000e3, 0x000000c3, 0x00000205, 0x00000204, - 0x000024da, 0x000024c0, 0x00002c5e, 0x00002c2e, - 0x000010ea, 0x00001caa, 0x0001044a, 0x00010422, - 0x0000029d, 0x0000a7b2, 0x00016e65, 0x00016e45, - 0x0000ab70, 0x000013a0, 0x00002171, 0x00002161, - 0x000104ea, 0x000104c2, 0x00016e71, 0x00016e51, - 0x000010d1, 0x00001c91, 0x00002c91, 0x00002c90, - 0x000001cb, 0x000001ca, 0x0000a73b, 0x0000a73a, - 0x00001e15, 0x00001e14, 0x00002c5a, 0x00002c2a, - 0x000104f1, 0x000104c9, 0x000001bd, 0x000001bc, - 0x0000006b, 0x0000004b, 0x00001f9f, 0x02000100, - 0x000104f2, 0x000104ca, 0x00001f70, 0x00001fba, - 0x0000a64d, 0x0000a64c, 0x00002d22, 0x000010c2, - 0x00001f9a, 0x020000f1, 0x000001f5, 0x000001f4, - 0x00002c53, 0x00002c23, 0x0000049f, 0x0000049e, - 0x00010441, 0x00010419, 0x00000292, 0x000001b7, - 0x00000436, 0x00000416, 0x0000052d, 0x0000052c, - 0x00001e75, 0x00001e74, 0x00001f79, 0x00001ff9, - 0x00016e7a, 0x00016e5a, 0x0000057e, 0x0000054e, - 0x00002d11, 0x000010b1, 0x00001f27, 0x00001f2f, - 0x00000125, 0x00000124, 0x00010ce8, 0x00010ca8, - 0x00002c4f, 0x00002c1f, 0x00001f45, 0x00001f4d, - 0x00001e03, 0x00001e02, 0x00002d18, 0x000010b8, - 0x0000ab9e, 0x000013ce, 0x0000ff52, 0x0000ff32, - 0x00001f65, 0x00001f6d, 0x0000a655, 0x0000a654, - 0x0000abb6, 0x000013e6, 0x00001f8f, 0x020000e8, - 0x000001f3, 0x000001f1, 0x00002c48, 0x00002c18, - 0x0000ab8b, 0x000013bb, 0x00001ee5, 0x00001ee4, - 0x000024d6, 0x000024bc, 0x00000203, 0x00000202, - 0x000010e2, 0x00001ca2, 0x0000214e, 0x00002132, - 0x0000024b, 0x0000024a, 0x00002cee, 0x00002ced, - 0x0000ab72, 0x000013a2, 0x00002d24, 0x000010c4, - 0x00001e5b, 0x00001e5a, 0x000001b4, 0x000001b3, - 0x0000ab86, 0x000013b6, 0x00001fc3, 0x0200004b, - 0x000003b1, 0x00000391, 0x00001e1f, 0x00001e1e, - 0x00016e78, 0x00016e58, 0x00000481, 0x00000480, - 0x00001f61, 0x00001f69, 0x000001a5, 0x000001a4, - 0x0000a663, 0x0000a662, 0x0000abab, 0x000013db, - 0x00001f7c, 0x00001ffa, 0x00001e9a, 0x02000097, - 0x00016e76, 0x00016e56, 0x00010cd6, 0x00010c96, - 0x0000ff42, 0x0000ff22, 0x00001ead, 0x00001eac, - 0x00010ced, 0x00010cad, 0x00002d12, 0x000010b2, - 0x0000ff57, 0x0000ff37, 0x0000a647, 0x0000a646, - 0x00001f85, 0x0200000f, 0x0000a76d, 0x0000a76c, - 0x00002d16, 0x000010b6, 0x000003b9, 0x00000399, - 0x0000a763, 0x0000a762, 0x00000579, 0x00000549, - 0x000004e9, 0x000004e8, 0x00001e73, 0x00001e72, - 0x00001e39, 0x00001e38, 0x00002c43, 0x00002c13, - 0x000004ed, 0x000004ec, 0x00001f99, 0x020000ee, - 0x000003f0, 0x0000039a, 0x0000a74f, 0x0000a74e, - 0x000010fa, 0x00001cba, 0x00000217, 0x00000216, - 0x000024dd, 0x000024c3, 0x0000a683, 0x0000a682, - 0x000004b5, 0x000004b4, 0x00002c33, 0x00002c03, - 0x00001f80, 0x02000000, 0x000000fe, 0x000000de, - 0x0000abb5, 0x000013e5, 0x0000217f, 0x0000216f, - 0x0000026c, 0x0000a7ad, 0x0000a769, 0x0000a768, - 0x0000abaa, 0x000013da, 0x0000045a, 0x0000040a, - 0x00001e71, 0x00001e70, 0x00001f97, 0x0200002d, - 0x0000056e, 0x0000053e, 0x00001ee7, 0x00001ee6, - 0x000118ca, 0x000118aa, 0x00000529, 0x00000528, - 0x00000566, 0x00000536, 0x00002c6c, 0x00002c6b, - 0x0000a68d, 0x0000a68c, 0x0000a783, 0x0000a782, - 0x000003c6, 0x000003a6, 0x00001edb, 0x00001eda, - 0x00001ff6, 0x020000d0, 0x00000209, 0x00000208, - 0x00000227, 0x00000226, 0x00000479, 0x00000478, - 0x0000ff45, 0x0000ff25, 0x00001f8b, 0x020000dc, - 0x000001ce, 0x000001cd, 0x0000057b, 0x0000054b, - 0x00001f73, 0x00001fc9, 0x00000261, 0x0000a7ac, - 0x00002cdd, 0x00002cdc, 0x0000ab88, 0x000013b8, - 0x00002d08, 0x000010a8, 0x0001e933, 0x0001e911, - 0x000004eb, 0x000004ea, 0x00000563, 0x00000533, - 0x00000435, 0x00000415, 0x00001ec7, 0x00001ec6, - 0x0000a797, 0x0000a796, 0x0000021d, 0x0000021c, - 0x0000047b, 0x0000047a, 0x00001f83, 0x02000009, - 0x000001c6, 0x000001c4, 0x000013f8, 0x000013f0, - 0x000118dd, 0x000118bd, 0x00001f56, 0x030000a5, - 0x00001f86, 0x02000012, 0x00002c57, 0x00002c27, - 0x00002d21, 0x000010c1, 0x000003be, 0x0000039e, - 0x00000527, 0x00000526, 0x0000047f, 0x0000047e, - 0x0000051f, 0x0000051e, 0x00001ecf, 0x00001ece, - 0x00001f04, 0x00001f0c, 0x00016e75, 0x00016e55, - 0x00010cd5, 0x00010c95, 0x00000507, 0x00000506, - 0x0001e926, 0x0001e904, 0x00001f81, 0x02000003, - 0x00002cd9, 0x00002cd8, 0x00000161, 0x00000160, - 0x000104fa, 0x000104d2, 0x00001e23, 0x00001e22, - 0x000118d4, 0x000118b4, 0x0000aba3, 0x000013d3, - 0x00001f51, 0x00001f59, 0x0000a659, 0x0000a658, - 0x000118df, 0x000118bf, 0x00002d2d, 0x000010cd, - 0x00001fe0, 0x00001fe8, 0x000001e5, 0x000001e4, - 0x00002c4c, 0x00002c1c, 0x000010d4, 0x00001c94, - 0x0000048d, 0x0000048c, 0x00001eab, 0x00001eaa, - 0x000003bb, 0x0000039b, 0x00000565, 0x00000535, - 0x000003ac, 0x00000386, 0x000024d7, 0x000024bd, - 0x00016e68, 0x00016e48, 0x000001ef, 0x000001ee, - 0x00000159, 0x00000158, 0x00001f53, 0x00001f5b, - 0x00000188, 0x00000187, 0x00002cc1, 0x00002cc0, - 0x00002cd3, 0x00002cd2, 0x0001e935, 0x0001e913, - 0x00001fab, 0x0200010c, 0x0000057c, 0x0000054c, - 0x0000ab98, 0x000013c8, 0x00010448, 0x00010420, - 0x00001f54, 0x030000a1, 0x000004f1, 0x000004f0, - 0x000004d7, 0x000004d6, 0x00001fd2, 0x030000af, - 0x000003e7, 0x000003e6, 0x00002c76, 0x00002c75, - 0x000010ef, 0x00001caf, 0x0000012d, 0x0000012c, - 0x00001ef9, 0x00001ef8, 0x00000123, 0x00000122, - 0x00002cc9, 0x00002cc8, 0x000003db, 0x000003da, - 0x0001e927, 0x0001e905, 0x0000012f, 0x0000012e, - 0x00000568, 0x00000538, 0x000003e1, 0x000003e0, - 0x0001e930, 0x0001e90e, 0x00000501, 0x00000500, - 0x00002c73, 0x00002c72, 0x00000177, 0x00000176, - 0x0001e928, 0x0001e906, 0x00001fa0, 0x02000030, - 0x000118de, 0x000118be, 0x00002c87, 0x00002c86, - 0x0001043f, 0x00010417, 0x000001f9, 0x000001f8, - 0x000000fd, 0x000000dd, 0x0000a65f, 0x0000a65e, - 0x00000075, 0x00000055, 0x000001dd, 0x0000018e, - 0x0000012b, 0x0000012a, 0x000010e8, 0x00001ca8, - 0x00000477, 0x00000476, 0x00001ecb, 0x00001eca, - 0x00000499, 0x00000498, 0x00000377, 0x00000376, - 0x00000103, 0x00000102, 0x0001e925, 0x0001e903, - 0x00002c95, 0x00002c94, 0x000010e6, 0x00001ca6, - 0x00002d14, 0x000010b4, 0x00001e5d, 0x00001e5c, - 0x000104e1, 0x000104b9, 0x00002cab, 0x00002caa, - 0x0000050b, 0x0000050a, 0x0000026b, 0x00002c62, - 0x00000173, 0x00000172, 0x000118d5, 0x000118b5, - 0x000004ce, 0x000004cd, 0x0000ab53, 0x0000a7b3, - 0x000001b9, 0x000001b8, 0x00000233, 0x00000232, - 0x0000014f, 0x0000014e, 0x00000219, 0x00000218, - 0x00000268, 0x00000197, 0x0000047d, 0x0000047c, - 0x00010cc0, 0x00010c80, 0x00010444, 0x0001041c, - 0x00000231, 0x00000230, 0x00001ec9, 0x00001ec8, - 0x00002cb3, 0x00002cb2, 0x00001eaf, 0x00001eae, - 0x00000266, 0x0000a7aa, 0x00000523, 0x00000522, - 0x00001c83, 0x00000421, 0x00002cb9, 0x00002cb8, - 0x0001042d, 0x00010405, 0x0000ff48, 0x0000ff28, - 0x00001c87, 0x00000462, 0x00002c4d, 0x00002c1d, - 0x00000260, 0x00000193, 0x0000a79b, 0x0000a79a, - 0x000004ab, 0x000004aa, 0x000003ef, 0x000003ee, - 0x00001f26, 0x00001f2e, 0x00000185, 0x00000184, - 0x00000457, 0x00000407, 0x0000ab92, 0x000013c2, - 0x00001f34, 0x00001f3c, 0x00001e79, 0x00001e78, - 0x0000037b, 0x000003fd, 0x00010cd0, 0x00010c90, - 0x00001ff3, 0x0200004e, 0x0001e92f, 0x0001e90d, - 0x000010f5, 0x00001cb5, 0x00001f36, 0x00001f3e, - 0x000003ba, 0x0000039a, 0x0001e938, 0x0001e916, - 0x000000f3, 0x000000d3, 0x0000ab87, 0x000013b7, - 0x0000052f, 0x0000052e, 0x00001e01, 0x00001e00, - 0x000118c6, 0x000118a6, 0x000118c0, 0x000118a0, - 0x00002c58, 0x00002c28, 0x0000fb02, 0x0200005a, - 0x0000a78c, 0x0000a78b, 0x0000037d, 0x000003ff, - 0x00002cbb, 0x00002cba, 0x000104ef, 0x000104c7, - 0x000001a3, 0x000001a2, 0x00000062, 0x00000042, - 0x0000abbf, 0x000013ef, 0x000003ca, 0x000003aa, - 0x00001eed, 0x00001eec, 0x00002c52, 0x00002c22, - 0x000003e9, 0x000003e8, 0x0000019a, 0x0000023d, - 0x0000025b, 0x00000190, 0x00001ea1, 0x00001ea0, - 0x0000056f, 0x0000053f, 0x00001fa2, 0x02000036, - 0x0000022b, 0x0000022a, 0x000004c8, 0x000004c7, - 0x00010cd2, 0x00010c92, 0x000003c1, 0x000003a1, - 0x0000028a, 0x000001b1, 0x000118d3, 0x000118b3, - 0x00002d02, 0x000010a2, 0x00000443, 0x00000423, - 0x0001044f, 0x00010427, 0x0000a781, 0x0000a780, - 0x00000562, 0x00000532, 0x00002cdb, 0x00002cda, - 0x00001fc7, 0x0300013a, 0x00000199, 0x00000198, - 0x00001c84, 0x00000422, 0x000004ef, 0x000004ee, - 0x00001f40, 0x00001f48, 0x00001f74, 0x00001fca, - 0x0000a641, 0x0000a640, 0x000104de, 0x000104b6, - 0x00001e67, 0x00001e66, 0x000118d9, 0x000118b9, - 0x0000049d, 0x0000049c, 0x000010e3, 0x00001ca3, - 0x0000fb03, 0x0300005d, 0x0001e92a, 0x0001e908, - 0x000004bd, 0x000004bc, 0x0000ab9f, 0x000013cf, - 0x00000519, 0x00000518, 0x000001a8, 0x000001a7, - 0x000000f4, 0x000000d4, 0x00000585, 0x00000555, - 0x00000454, 0x00000404, 0x00001f24, 0x00001f2c, - 0x0000a77a, 0x0000a779, 0x000004f9, 0x000004f8, - 0x00002ccd, 0x00002ccc, 0x00001f66, 0x00001f6e, - 0x000001da, 0x000001d9, 0x00000065, 0x00000045, - 0x0000aba9, 0x000013d9, 0x00001f71, 0x00001fbb, - 0x00001ef7, 0x00001ef6, 0x00000157, 0x00000156, - 0x0000abb8, 0x000013e8, 0x0000ff4d, 0x0000ff2d, - 0x00000252, 0x00002c70, 0x00016e7e, 0x00016e5e, - 0x00002d1d, 0x000010bd, 0x00002177, 0x00002167, - 0x000024e3, 0x000024c9, 0x0000a64b, 0x0000a64a, - 0x00000503, 0x00000502, 0x0000048f, 0x0000048e, - 0x000024e0, 0x000024c6, 0x00000153, 0x00000152, - 0x00000576, 0x00000546, 0x00002c54, 0x00002c24, - 0x00001f89, 0x020000d6, 0x00001f7d, 0x00001ffb, - 0x00001e2b, 0x00001e2a, 0x00002170, 0x00002160, - 0x00010430, 0x00010408, 0x00001eef, 0x00001eee, - 0x000000f2, 0x000000d2, 0x00000491, 0x00000490, - 0x0000a7a1, 0x0000a7a0, 0x000024d2, 0x000024b8, - 0x00002c68, 0x00002c67, 0x0000abad, 0x000013dd, - 0x0000a653, 0x0000a652, 0x0000a667, 0x0000a666, - 0x00001e8b, 0x00001e8a, 0x00010cdc, 0x00010c9c, - 0x0000ff41, 0x0000ff21, 0x0001e940, 0x0001e91e, - 0x00001f9b, 0x020000f4, 0x00001f57, 0x00001f5f, - 0x00002d00, 0x000010a0, 0x00001f01, 0x00001f09, - 0x00000148, 0x00000147, 0x0000056b, 0x0000053b, - 0x0000043e, 0x0000041e, 0x00001f9e, 0x020000fd, - 0x00001f72, 0x00001fc8, 0x000004e3, 0x000004e2, - 0x00002c61, 0x00002c60, 0x00001fa6, 0x02000042, - 0x00001fa7, 0x02000045, 0x0000006d, 0x0000004d, - 0x00010ce5, 0x00010ca5, 0x00001fc6, 0x020000ac, - 0x00000287, 0x0000a7b1, 0x00002c5d, 0x00002c2d, - 0x000010eb, 0x00001cab, 0x000003eb, 0x000003ea, - 0x00001f96, 0x0200002a, 0x00001c86, 0x0000042a, - 0x00000572, 0x00000542, 0x00000371, 0x00000370, - 0x000024d5, 0x000024bb, 0x00002ccb, 0x00002cca, - 0x000010d0, 0x00001c90, 0x00000444, 0x00000424, - 0x00001f25, 0x00001f2d, 0x00000115, 0x00000114, - 0x00001ec1, 0x00001ec0, 0x00002c5b, 0x00002c2b, - 0x00010447, 0x0001041f, 0x00001f67, 0x00001f6f, - 0x00016e6f, 0x00016e4f, 0x00002ce3, 0x00002ce2, - 0x00001fa5, 0x0200003f, 0x00001e31, 0x00001e30, - 0x00002c3d, 0x00002c0d, 0x00010cd8, 0x00010c98, - 0x0000ff4f, 0x0000ff2f, 0x00001ea5, 0x00001ea4, - 0x00000453, 0x00000403, 0x00000497, 0x00000496, - 0x0000013c, 0x0000013b, 0x0000a699, 0x0000a698, - 0x000010f7, 0x00001cb7, 0x00010cc6, 0x00010c86, - 0x00000175, 0x00000174, 0x00001f06, 0x00001f0e, - 0x0000010f, 0x0000010e, 0x00002d10, 0x000010b0, - 0x00002c39, 0x00002c09, 0x000003f3, 0x0000037f, - 0x00001f8c, 0x020000df, 0x00016e7f, 0x00016e5f, - 0x0000051b, 0x0000051a, 0x00001f12, 0x00001f1a, - 0x0000a785, 0x0000a784, 0x00000525, 0x00000524, - 0x0000aba0, 0x000013d0, 0x000104dd, 0x000104b5, - 0x000001c8, 0x000001c7, 0x0000056a, 0x0000053a, - 0x00010ccf, 0x00010c8f, 0x000104e5, 0x000104bd, - 0x00001ea3, 0x00001ea2, 0x00001f76, 0x00001fda, - 0x000010d5, 0x00001c95, 0x00000137, 0x00000136, - 0x00000265, 0x0000a78d, 0x00002ca3, 0x00002ca2, - 0x00001e29, 0x00001e28, 0x0000a75f, 0x0000a75e, - 0x00001f63, 0x00001f6b, 0x000004af, 0x000004ae, - 0x0000ab71, 0x000013a1, 0x000104e8, 0x000104c0, - 0x000003c8, 0x000003a8, 0x0000a77c, 0x0000a77b, - 0x0000ab83, 0x000013b3, 0x00002d1c, 0x000010bc, - 0x00010435, 0x0001040d, 0x00001e19, 0x00001e18, - 0x000004db, 0x000004da, 0x0000ab95, 0x000013c5, - 0x00001ff2, 0x02000130, 0x00001e7d, 0x00001e7c, - 0x0000011b, 0x0000011a, 0x00010cc2, 0x00010c82, - 0x00001fa3, 0x02000039, 0x000001d8, 0x000001d7, - 0x000000b5, 0x0000039c, 0x000010dd, 0x00001c9d, - 0x00000213, 0x00000212, 0x00000257, 0x0000018a, - 0x0000051d, 0x0000051c, 0x00010ce7, 0x00010ca7, - 0x000003d9, 0x000003d8, 0x0000020d, 0x0000020c, - 0x00002ce1, 0x00002ce0, 0x000104e0, 0x000104b8, - 0x00001e99, 0x02000094, 0x000118c1, 0x000118a1, - 0x0000016f, 0x0000016e, 0x0000abba, 0x000013ea, - 0x00002c65, 0x0000023a, 0x00001f52, 0x0300009d, - 0x00001f33, 0x00001f3b, 0x000004dd, 0x000004dc, - 0x000000fb, 0x000000db, 0x00001fb4, 0x02000127, - 0x00001e1b, 0x00001e1a, 0x0000a66d, 0x0000a66c, - 0x00001eeb, 0x00001eea, 0x00002c99, 0x00002c98, - 0x000001b0, 0x000001af, 0x00000432, 0x00000412, - 0x0000aba8, 0x000013d8, 0x0000a74b, 0x0000a74a, - 0x00001e97, 0x0200008e, 0x0000a725, 0x0000a724, - 0x000010d7, 0x00001c97, 0x000003b7, 0x00000397, - 0x00001f93, 0x02000021, 0x000000ee, 0x000000ce, - 0x00001e11, 0x00001e10, 0x00002c5c, 0x00002c2c, - 0x00001f23, 0x00001f2b, 0x000004f7, 0x000004f6, - 0x0000a73f, 0x0000a73e, 0x000004ff, 0x000004fe, - 0x00001f35, 0x00001f3d, 0x0000017e, 0x0000017d, - 0x0000050f, 0x0000050e, 0x00000113, 0x00000112, - 0x00001ec3, 0x00001ec2, 0x000001f2, 0x000001f1, - 0x000000f1, 0x000000d1, 0x00002cd1, 0x00002cd0, - 0x0000ff54, 0x0000ff34, 0x00002c8b, 0x00002c8a, - 0x000010f6, 0x00001cb6, 0x0000abb3, 0x000013e3, - 0x00000390, 0x03000080, 0x000024e1, 0x000024c7, - 0x00002c8d, 0x00002c8c, 0x00010cd1, 0x00010c91, - 0x00001f98, 0x020000eb, 0x0001e934, 0x0001e912, - 0x00001f90, 0x02000018, 0x000118cb, 0x000118ab, - 0x00000431, 0x00000411, 0x0001042f, 0x00010407, - 0x0000a74d, 0x0000a74c, 0x00001eb1, 0x00001eb0, - 0x00002c6a, 0x00002c69, 0x0000fb01, 0x02000057, - 0x000001dc, 0x000001db, 0x00001ecd, 0x00001ecc, - 0x00000439, 0x00000419, 0x0000045d, 0x0000040d, - 0x0000a799, 0x0000a798, 0x00002c41, 0x00002c11, - 0x0000ab9d, 0x000013cd, 0x0001043a, 0x00010412, - 0x00000067, 0x00000047, 0x0000006f, 0x0000004f, - 0x000004c4, 0x000004c3, 0x00002176, 0x00002166, - 0x0001e922, 0x0001e900, 0x00001c80, 0x00000412, - 0x000010f0, 0x00001cb0, 0x00001f8d, 0x020000e2, - 0x0000024f, 0x0000024e, 0x00000127, 0x00000126, - 0x000001a1, 0x000001a0, 0x0000043c, 0x0000041c, - 0x00001fe4, 0x020000c6, 0x00002d27, 0x000010c7, - 0x00000207, 0x00000206, 0x00002c44, 0x00002c14, - 0x0000a65d, 0x0000a65c, 0x0000a72b, 0x0000a72a, - 0x0000ab7e, 0x000013ae, 0x00000465, 0x00000464, - 0x000104d8, 0x000104b0, 0x000001e1, 0x000001e0, - 0x00002c36, 0x00002c06, 0x0000abbb, 0x000013eb, - 0x000104ec, 0x000104c4, 0x0000ff4b, 0x0000ff2b, - 0x0000045e, 0x0000040e, 0x0000ab8c, 0x000013bc, - 0x00000289, 0x00000244, 0x00000254, 0x00000186, - 0x0000a685, 0x0000a684, 0x000010ed, 0x00001cad, - 0x00002172, 0x00002162, 0x00010437, 0x0001040f, - 0x0000a77f, 0x0000a77e, 0x00000574, 0x00000544, - 0x000003df, 0x000003de, 0x0001042a, 0x00010402, - 0x00001c85, 0x00000422, 0x0000a755, 0x0000a754, - 0x00000076, 0x00000056, 0x00010440, 0x00010418, - 0x00000183, 0x00000182 + 0x00001f01, 0x00001f09, 0x0000abbd, 0x000013ed, + 0x0000024d, 0x0000024c, 0x00002c66, 0x0000023e, + 0x000118dd, 0x000118bd, 0x000003ad, 0x00000388, + 0x00001f61, 0x00001f69, 0x0000ab7e, 0x000013ae, + 0x00016e79, 0x00016e59, 0x00001f30, 0x00001f38, + 0x00000513, 0x00000512, 0x0000014d, 0x0000014c, + 0x000024e6, 0x000024cc, 0x00016e73, 0x00016e53, + 0x0000024f, 0x0000024e, 0x00000453, 0x00000403, + 0x000003b7, 0x00000397, 0x0001044e, 0x00010426, + 0x000010ff, 0x00001cbf, 0x000104dc, 0x000104b4, + 0x0000a7bf, 0x0000a7be, 0x00002d0c, 0x000010ac, + 0x00000251, 0x00002c6d, 0x00000444, 0x00000424, + 0x00002cd5, 0x00002cd4, 0x00000167, 0x00000166, + 0x00001e75, 0x00001e74, 0x00002c38, 0x00002c08, + 0x000001b6, 0x000001b5, 0x0000043f, 0x0000041f, + 0x00002d15, 0x000010b5, 0x00000201, 0x00000200, + 0x0000ab8d, 0x000013bd, 0x0000abb8, 0x000013e8, + 0x00001e4d, 0x00001e4c, 0x000010f2, 0x00001cb2, + 0x00010cd1, 0x00010c91, 0x0001043b, 0x00010413, + 0x00002c97, 0x00002c96, 0x000010f0, 0x00001cb0, + 0x00001f9d, 0x020000fa, 0x000004e1, 0x000004e0, + 0x00010445, 0x0001041d, 0x000024e8, 0x000024ce, + 0x00002d27, 0x000010c7, 0x00000573, 0x00000543, + 0x000024e3, 0x000024c9, 0x000003ed, 0x000003ec, + 0x00001e93, 0x00001e92, 0x000010f5, 0x00001cb5, + 0x00002177, 0x00002167, 0x0000fb06, 0x02000068, + 0x0000044d, 0x0000042d, 0x00000493, 0x00000492, + 0x00000272, 0x0000019d, 0x00010438, 0x00010410, + 0x000003e1, 0x000003e0, 0x00001ed3, 0x00001ed2, + 0x00001e6d, 0x00001e6c, 0x00001f71, 0x00001fbb, + 0x0000abaa, 0x000013da, 0x000003e9, 0x000003e8, + 0x00001ea5, 0x00001ea4, 0x0000ab83, 0x000013b3, + 0x00000289, 0x00000244, 0x00000446, 0x00000426, + 0x00002cee, 0x00002ced, 0x0000a75d, 0x0000a75c, + 0x00001f27, 0x00001f2f, 0x00000515, 0x00000514, + 0x00010ce5, 0x00010ca5, 0x00010ccb, 0x00010c8b, + 0x0000ff54, 0x0000ff34, 0x00001f05, 0x00001f0d, + 0x0000044e, 0x0000042e, 0x000003bb, 0x0000039b, + 0x00001ef5, 0x00001ef4, 0x00001ee7, 0x00001ee6, + 0x0000ab90, 0x000013c0, 0x000000e0, 0x000000c0, + 0x000118c5, 0x000118a5, 0x00000271, 0x00002c6e, + 0x00002170, 0x00002160, 0x00002c89, 0x00002c88, + 0x0000018c, 0x0000018b, 0x000010f6, 0x00001cb6, + 0x000004bb, 0x000004ba, 0x00001fb1, 0x00001fb9, + 0x00001fd1, 0x00001fd9, 0x00002d0b, 0x000010ab, + 0x00000268, 0x00000197, 0x000004b5, 0x000004b4, + 0x00000151, 0x00000150, 0x00002c44, 0x00002c14, + 0x00010cd9, 0x00010c99, 0x00010cde, 0x00010c9e, + 0x00001eaf, 0x00001eae, 0x00002c91, 0x00002c90, + 0x000001fd, 0x000001fc, 0x000000e2, 0x000000c2, + 0x000004e3, 0x000004e2, 0x00000135, 0x00000134, + 0x0000048f, 0x0000048e, 0x00000075, 0x00000055, + 0x0000a74f, 0x0000a74e, 0x00001f8e, 0x020000e5, + 0x000104ee, 0x000104c6, 0x00001eb9, 0x00001eb8, + 0x0000ab80, 0x000013b0, 0x000010fa, 0x00001cba, + 0x00001f9e, 0x020000fd, 0x0000ab95, 0x000013c5, + 0x00000217, 0x00000216, 0x00001f25, 0x00001f2d, + 0x00010cd7, 0x00010c97, 0x0000a667, 0x0000a666, + 0x000010f8, 0x00001cb8, 0x000000f4, 0x000000d4, + 0x0000057c, 0x0000054c, 0x00002d18, 0x000010b8, + 0x000001f5, 0x000001f4, 0x00001efd, 0x00001efc, + 0x00001e1f, 0x00001e1e, 0x00002c51, 0x00002c21, + 0x00002c3c, 0x00002c0c, 0x00000252, 0x00002c70, + 0x00010428, 0x00010400, 0x00001eed, 0x00001eec, + 0x00000140, 0x0000013f, 0x000104f5, 0x000104cd, + 0x000104f4, 0x000104cc, 0x000004a7, 0x000004a6, + 0x00001f42, 0x00001f4a, 0x0000050f, 0x0000050e, + 0x0000049d, 0x0000049c, 0x00001f43, 0x00001f4b, + 0x0000aba5, 0x000013d5, 0x00002c47, 0x00002c17, + 0x0000a73f, 0x0000a73e, 0x00002d24, 0x000010c4, + 0x00000450, 0x00000400, 0x00001f53, 0x00001f5b, + 0x000024dd, 0x000024c3, 0x000001df, 0x000001de, + 0x0000006e, 0x0000004e, 0x00000495, 0x00000494, + 0x0000214e, 0x00002132, 0x000001ce, 0x000001cd, + 0x00002174, 0x00002164, 0x00001fb3, 0x02000048, + 0x00000563, 0x00000533, 0x00002cb1, 0x00002cb0, + 0x00001ef9, 0x00001ef8, 0x00002cad, 0x00002cac, + 0x00010435, 0x0001040d, 0x000004c8, 0x000004c7, + 0x0000ff50, 0x0000ff30, 0x00002d19, 0x000010b9, + 0x00001fd7, 0x030000ba, 0x00002c58, 0x00002c28, + 0x0000ff43, 0x0000ff23, 0x000004f9, 0x000004f8, + 0x0000ab76, 0x000013a6, 0x00001fa5, 0x0200003f, + 0x00001f97, 0x0200002d, 0x00002d0d, 0x000010ad, + 0x00010cc1, 0x00010c81, 0x0000abb2, 0x000013e2, + 0x0000a785, 0x0000a784, 0x00001e5d, 0x00001e5c, + 0x0000ab86, 0x000013b6, 0x00000259, 0x0000018f, + 0x00001f85, 0x0200000f, 0x0000056b, 0x0000053b, + 0x0000fb02, 0x0200005a, 0x0000022d, 0x0000022c, + 0x00002d0f, 0x000010af, 0x00010cdf, 0x00010c9f, + 0x00001faa, 0x02000109, 0x0000050d, 0x0000050c, + 0x00001f40, 0x00001f48, 0x000104f8, 0x000104d0, + 0x000003c2, 0x000003a3, 0x00000192, 0x00000191, + 0x00001e33, 0x00001e32, 0x000118c0, 0x000118a0, + 0x00001faf, 0x02000118, 0x00016e76, 0x00016e56, + 0x000001e5, 0x000001e4, 0x000001cc, 0x000001ca, + 0x00000125, 0x00000124, 0x00000576, 0x00000546, + 0x0000006c, 0x0000004c, 0x000004cf, 0x000004c0, + 0x00000061, 0x00000041, 0x000003d6, 0x000003a0, + 0x000003b1, 0x00000391, 0x00001e8d, 0x00001e8c, + 0x000118df, 0x000118bf, 0x0000020f, 0x0000020e, + 0x00001e17, 0x00001e16, 0x0001043c, 0x00010414, + 0x00001f86, 0x02000012, 0x00001e73, 0x00001e72, + 0x00002c37, 0x00002c07, 0x00000163, 0x00000162, + 0x00001fd3, 0x030000b3, 0x00000435, 0x00000415, + 0x00001fad, 0x02000112, 0x0000ff48, 0x0000ff28, + 0x00002d01, 0x000010a1, 0x0000026a, 0x0000a7ae, + 0x00000064, 0x00000044, 0x000104d8, 0x000104b0, + 0x000013fd, 0x000013f5, 0x000010fd, 0x00001cbd, + 0x0000006a, 0x0000004a, 0x00010444, 0x0001041c, + 0x000118dc, 0x000118bc, 0x0000014f, 0x0000014e, + 0x00010cc9, 0x00010c89, 0x000001ef, 0x000001ee, + 0x00001ff3, 0x0200004e, 0x0000ff41, 0x0000ff21, + 0x00002c4e, 0x00002c1e, 0x00001ff2, 0x02000130, + 0x0001043a, 0x00010412, 0x00002c81, 0x00002c80, + 0x00001e95, 0x00001e94, 0x000010f9, 0x00001cb9, + 0x0001042a, 0x00010402, 0x0000aba0, 0x000013d0, + 0x000118d6, 0x000118b6, 0x000010e9, 0x00001ca9, + 0x00001f36, 0x00001f3e, 0x0000056c, 0x0000053c, + 0x00000149, 0x0200007d, 0x0000007a, 0x0000005a, + 0x0000046d, 0x0000046c, 0x0000a7a7, 0x0000a7a6, + 0x00000199, 0x00000198, 0x00002c8d, 0x00002c8c, + 0x0000ab78, 0x000013a8, 0x0000ab85, 0x000013b5, + 0x00000078, 0x00000058, 0x000013f9, 0x000013f1, + 0x00002d08, 0x000010a8, 0x0000027d, 0x00002c64, + 0x00000578, 0x00000548, 0x0000051b, 0x0000051a, + 0x0000016b, 0x0000016a, 0x0000017c, 0x0000017b, + 0x00002d2d, 0x000010cd, 0x00000240, 0x00002c7f, + 0x000024d3, 0x000024b9, 0x000003d1, 0x00000398, + 0x0000011b, 0x0000011a, 0x0000a64f, 0x0000a64e, + 0x0000217d, 0x0000216d, 0x00001edf, 0x00001ede, + 0x00000390, 0x03000080, 0x0000a759, 0x0000a758, + 0x00002c4c, 0x00002c1c, 0x0000045d, 0x0000040d, + 0x0000a783, 0x0000a782, 0x00010cd5, 0x00010c95, + 0x0000fb00, 0x02000054, 0x00001fac, 0x0200010f, + 0x0000a741, 0x0000a740, 0x00002d25, 0x000010c5, + 0x000004e9, 0x000004e8, 0x00001f84, 0x0200000c, + 0x000010ee, 0x00001cae, 0x00001ebf, 0x00001ebe, + 0x00000432, 0x00000412, 0x000013f8, 0x000013f0, + 0x00001fe0, 0x00001fe8, 0x00002c93, 0x00002c92, + 0x000004c6, 0x000004c5, 0x0000a651, 0x0000a650, + 0x00002c5a, 0x00002c2a, 0x00002c35, 0x00002c05, + 0x00001eff, 0x00001efe, 0x00000467, 0x00000466, + 0x00010440, 0x00010418, 0x0000028c, 0x00000245, + 0x00000377, 0x00000376, 0x00001e8f, 0x00001e8e, + 0x0000abaf, 0x000013df, 0x00001ea7, 0x00001ea6, + 0x00001e51, 0x00001e50, 0x0001e936, 0x0001e914, + 0x00000213, 0x00000212, 0x00002d1c, 0x000010bc, + 0x0001e92a, 0x0001e908, 0x0000a663, 0x0000a662, + 0x00001f14, 0x00001f1c, 0x00000463, 0x00000462, + 0x00010cd0, 0x00010c90, 0x00002cdd, 0x00002cdc, + 0x00002c52, 0x00002c22, 0x00002cdf, 0x00002cde, + 0x0000abb7, 0x000013e7, 0x00002c53, 0x00002c23, + 0x0001e925, 0x0001e903, 0x00000503, 0x00000502, + 0x0000a751, 0x0000a750, 0x000104eb, 0x000104c3, + 0x000001c6, 0x000001c4, 0x000001a1, 0x000001a0, + 0x0000fb17, 0x0200007a, 0x0000056a, 0x0000053a, + 0x00001f52, 0x0300009d, 0x000104ea, 0x000104c2, + 0x000000e7, 0x000000c7, 0x00001f45, 0x00001f4d, + 0x0000aba9, 0x000013d9, 0x00002c65, 0x0000023a, + 0x00001e85, 0x00001e84, 0x00001e59, 0x00001e58, + 0x00000225, 0x00000224, 0x00001fe6, 0x020000c9, + 0x0000fb16, 0x02000077, 0x000001f9, 0x000001f8, + 0x00001fc2, 0x0200012a, 0x00000499, 0x00000498, + 0x0000a649, 0x0000a648, 0x000010e3, 0x00001ca3, + 0x0000046f, 0x0000046e, 0x00000077, 0x00000057, + 0x0000ab9e, 0x000013ce, 0x00002cb5, 0x00002cb4, + 0x00010ce7, 0x00010ca7, 0x0000ab75, 0x000013a5, + 0x00010433, 0x0001040b, 0x00001e2b, 0x00001e2a, + 0x000010df, 0x00001c9f, 0x0000021b, 0x0000021a, + 0x0000a737, 0x0000a736, 0x0000057a, 0x0000054a, + 0x0000a66b, 0x0000a66a, 0x00001c84, 0x00000422, + 0x0000046b, 0x0000046a, 0x0000ab74, 0x000013a4, + 0x00001c82, 0x0000041e, 0x000003b9, 0x00000399, + 0x00001f8f, 0x020000e8, 0x00010cc8, 0x00010c88, + 0x00002c50, 0x00002c20, 0x00001fc6, 0x020000ac, + 0x000010d2, 0x00001c92, 0x000118d0, 0x000118b0, + 0x00001f15, 0x00001f1d, 0x00002c8b, 0x00002c8a, + 0x000001d2, 0x000001d1, 0x00001f02, 0x00001f0a, + 0x0000015b, 0x0000015a, 0x00000107, 0x00000106, + 0x0001e93e, 0x0001e91c, 0x00010449, 0x00010421, + 0x0000006d, 0x0000004d, 0x00000070, 0x00000050, + 0x00000345, 0x00000399, 0x00001ecd, 0x00001ecc, + 0x000004f5, 0x000004f4, 0x000118c6, 0x000118a6, + 0x0000abac, 0x000013dc, 0x00016e72, 0x00016e52, + 0x000024d4, 0x000024ba, 0x000118d7, 0x000118b7, + 0x00000511, 0x00000510, 0x00000133, 0x00000132, + 0x000024da, 0x000024c0, 0x0001043e, 0x00010416, + 0x00001f77, 0x00001fdb, 0x00000574, 0x00000544, + 0x00002cbd, 0x00002cbc, 0x0000a7bd, 0x0000a7bc, + 0x000004b7, 0x000004b6, 0x00002c5b, 0x00002c2b, + 0x0000a7f6, 0x0000a7f5, 0x0000ff56, 0x0000ff36, + 0x0000022b, 0x0000022a, 0x0001e92f, 0x0001e90d, + 0x000104e9, 0x000104c1, 0x00000183, 0x00000182, + 0x00001e01, 0x00001e00, 0x00002d02, 0x000010a2, + 0x00001fa6, 0x02000042, 0x000003ce, 0x0000038f, + 0x00002d03, 0x000010a3 }; static const unsigned _uccase_lower_g_size = 226; static const short _uccase_lower_g[] = { - 378, 492, 185, 1753, 339, 6625, 945, 16446, - 65, 1293, 18, 11220, 1036, 427, 550, 32, - 133, 1629, 44, -55, 674, 19, 3949, 999, - 2, -1322, 799, 1563, 17679, -1376, 61, 8474, - 17, 6429, 7526, 1989, 4806, 2240, 569, 123, - 7, 3273, 3641, 1058, 750, 5194, 5, 4168, - 348, 515, 1355, 1127, 43, 8505, 14, 6476, - 1223, 1245, 1705, 10707, 15, 2869, 33, 1441, - 8845, 25, 7125, 2629, 1, -1039, 505, 252, - 14983, 1438, 48, 156, 1131, 1079, 1404, 831, - 553, 836, 278, 32767, 551, 1351, 14260, 22101, - 682, 3477, 2, 18384, 61, 5915, 536, 473, - 43, 10714, 20, 612, 536, 3622, 528, 1334, - 104, 3202, 23, 437, 5395, 29, 3132, 432, - 5, -610, 518, 111, 7221, 857, 40, 4247, - 318, 1678, 2930, 24758, 66, 30739, 348, -1000, - 3271, 1220, 17653, 14959, 1306, 1059, 209, -102, - 219, 2132, 752, 2322, 43, 3295, 6, 10838, - 450, 5742, 614, 1121, 48, 5015, 7, 3227, - 895, 86, 7694, 5597, 2, 1432, 5512, 77, - 3964, 3372, 77, -813, 610, 16149, 1418, 3255, - 2, 976, 263, -336, 1806, 3, 5294, 4036, - 547, 1524, 1, -33, 40, 8455, 1218, 8552, - 368, 889, 2, 1502, 3441, 7654, 80, 10953, - 293, 3783, 32, 2996, 525, 68, 1729, 4606, - 8, -496, 1483, 51, 6480, 1116, 9, -1339, - 3265, 3526, 3995, 356, 1, 4243, 650, 2662, - 5467, 1209, 4058, 24424, 374, 610, 216, -125, - 3604, 1707 + 1364, 1530, 36, 3524, 222, 3723, 1086, 32445, + 34, 941, 99, 2624, 363, 543, 579, 107, + 142, 1498, 41, -115, 1231, 45, 21716, 5055, + 2, -1260, 80, 4533, 669, -1371, 57, 7285, + 18, 27113, 267, 18811, 1503, 26436, 16, 6882, + 2, 131, 12268, 4501, 1506, 870, 2, 572, + 172, 600, 2926, 106, 1, 6212, 32, 532, + 275, 1224, 6706, 590, 9, 14784, 66, 3938, + 726, 34, 7581, 2701, 1, -1189, 370, 72, + 9811, 1065, 20, 130, 249, 2699, 1127, 1814, + 181, 2659, 612, 32767, 235, 602, 7283, 6396, + 173, 1227, 1, 689, 30, 6401, 1402, 1045, + 4, 15880, 41, 55, 426, 3302, 69, 314, + 234, 2489, 87, 1468, 7445, 66, 18936, 932, + 1, -899, 1550, 61, 5099, 170, 2, 209, + 315, 4729, 6976, 17031, 20, 1731, 3079, -1068, + 1263, 4178, 3345, 206, 1144, 8221, 27, -155, + 133, 3598, 529, 11028, 17, 3752, 10, 2322, + 7, 2679, 275, 1177, 6, 520, 1, 5192, + 2344, 76, 1480, 2650, 1, 1490, 3578, 71, + 2137, 4106, 48, -962, 292, 13361, 2718, 979, + 1, 3186, 111, -563, 1725, 693, 5410, 2445, + 259, 3498, 34, -48, 119, 4723, 552, 4339, + 391, 524, 5, 706, 1352, 28294, 41, 2049, + 130, 372, 109, 3105, 4453, 42, 1149, 159, + 18, -586, 530, 64, 32517, 650, 16, -1345, + 1079, 21291, 1599, 340, 2, 3444, 843, 492, + 61, 11025, 1091, 282, 840, 9166, 38, -259, + 16488, 5061 }; -static const unsigned _uccase_lower_table_size = 1383; +static const unsigned _uccase_lower_table_size = 1393; static const unsigned _uccase_lower_table[] = { - 0x000010a9, 0x00002d09, 0x00000130, 0x02000142, - 0x00002c1f, 0x00002c4f, 0x000013dc, 0x0000abac, - 0x00016e56, 0x00016e76, 0x00000048, 0x00000068, - 0x00002cd0, 0x00002cd1, 0x000013d3, 0x0000aba3, - 0x00000460, 0x00000461, 0x00001e20, 0x00001e21, - 0x00001ee4, 0x00001ee5, 0x00001cb4, 0x000010f4, - 0x00002126, 0x000003c9, 0x00001ffc, 0x00001ff3, - 0x0000216d, 0x0000217d, 0x00001fba, 0x00001f70, - 0x00001f59, 0x00001f51, 0x000013ed, 0x0000abbd, - 0x00010c93, 0x00010cd3, 0x00001e68, 0x00001e69, - 0x000000d8, 0x000000f8, 0x0000ff28, 0x0000ff48, - 0x00000480, 0x00000481, 0x0000040c, 0x0000045c, - 0x0000050a, 0x0000050b, 0x00000218, 0x00000219, - 0x000104d3, 0x000104fb, 0x00000230, 0x00000231, - 0x00001ef8, 0x00001ef9, 0x00010405, 0x0001042d, - 0x00000421, 0x00000441, 0x00000393, 0x000003b3, - 0x00000512, 0x00000513, 0x000104c8, 0x000104f0, - 0x00002c9e, 0x00002c9f, 0x00001fc8, 0x00001f72, - 0x00001f2e, 0x00001f26, 0x00010404, 0x0001042c, - 0x000010c1, 0x00002d21, 0x00001e46, 0x00001e47, - 0x00002c82, 0x00002c83, 0x0000053e, 0x0000056e, - 0x00000228, 0x00000229, 0x000024ce, 0x000024e8, - 0x000010b0, 0x00002d10, 0x00002cca, 0x00002ccb, - 0x00000141, 0x00000142, 0x000010bd, 0x00002d1d, - 0x00001f9b, 0x00001f93, 0x000104cb, 0x000104f3, - 0x00000472, 0x00000473, 0x000013df, 0x0000abaf, - 0x0000a648, 0x0000a649, 0x00016e42, 0x00016e62, - 0x00001fe8, 0x00001fe0, 0x00002c07, 0x00002c37, - 0x000118a7, 0x000118c7, 0x00002c16, 0x00002c46, - 0x000001fa, 0x000001fb, 0x00002c0d, 0x00002c3d, - 0x00000184, 0x00000185, 0x0000a66a, 0x0000a66b, - 0x000024bb, 0x000024d5, 0x00001f0c, 0x00001f04, - 0x000001c8, 0x000001c9, 0x0000a732, 0x0000a733, - 0x00001e04, 0x00001e05, 0x00010cab, 0x00010ceb, - 0x000001a4, 0x000001a5, 0x00000492, 0x00000493, - 0x0000021c, 0x0000021d, 0x00000056, 0x00000076, - 0x00002cde, 0x00002cdf, 0x000013c8, 0x0000ab98, - 0x0000040b, 0x0000045b, 0x00001c91, 0x000010d1, - 0x000024b8, 0x000024d2, 0x00001f3c, 0x00001f34, - 0x00000426, 0x00000446, 0x00002c2a, 0x00002c5a, - 0x0000a742, 0x0000a743, 0x0000a73c, 0x0000a73d, - 0x000000cf, 0x000000ef, 0x00002ca8, 0x00002ca9, - 0x00002cbe, 0x00002cbf, 0x000003aa, 0x000003ca, - 0x0000048a, 0x0000048b, 0x000013c0, 0x0000ab90, - 0x00001ffb, 0x00001f7d, 0x00001e10, 0x00001e11, - 0x00002c17, 0x00002c47, 0x00000520, 0x00000521, - 0x00000187, 0x00000188, 0x000013da, 0x0000abaa, - 0x0000a664, 0x0000a665, 0x0000a73a, 0x0000a73b, - 0x00002c9c, 0x00002c9d, 0x000104be, 0x000104e6, - 0x00002cbc, 0x00002cbd, 0x00001ca7, 0x000010e7, - 0x000001ea, 0x000001eb, 0x00000246, 0x00000247, - 0x000104c6, 0x000104ee, 0x00000551, 0x00000581, - 0x000024ba, 0x000024d4, 0x00000506, 0x00000507, - 0x00002c06, 0x00002c36, 0x0000053d, 0x0000056d, - 0x00016e50, 0x00016e70, 0x00001e2c, 0x00001e2d, - 0x0000ff32, 0x0000ff52, 0x00001ed2, 0x00001ed3, - 0x0000053f, 0x0000056f, 0x00001cae, 0x000010ee, - 0x0000015c, 0x0000015d, 0x00010c82, 0x00010cc2, - 0x00000476, 0x00000477, 0x0000ff23, 0x0000ff43, - 0x0001041a, 0x00010442, 0x0000a728, 0x0000a729, - 0x00002c62, 0x0000026b, 0x00001f6f, 0x00001f67, - 0x000118bf, 0x000118df, 0x00000403, 0x00000453, - 0x00001e3a, 0x00001e3b, 0x000104ca, 0x000104f2, - 0x0000052e, 0x0000052f, 0x000004d0, 0x000004d1, - 0x0000a652, 0x0000a653, 0x00001ee6, 0x00001ee7, - 0x000013bd, 0x0000ab8d, 0x000001b8, 0x000001b9, - 0x000004de, 0x000004df, 0x00001e34, 0x00001e35, - 0x000104c1, 0x000104e9, 0x0000046a, 0x0000046b, - 0x000013c1, 0x0000ab91, 0x0000040d, 0x0000045d, - 0x0000ff21, 0x0000ff41, 0x00010421, 0x00010449, - 0x000013d4, 0x0000aba4, 0x00001e54, 0x00001e55, - 0x00000134, 0x00000135, 0x00002c11, 0x00002c41, - 0x0000042f, 0x0000044f, 0x00016e47, 0x00016e67, - 0x0000a766, 0x0000a767, 0x0000a79e, 0x0000a79f, - 0x00001fd8, 0x00001fd0, 0x000104b3, 0x000104db, - 0x00010caa, 0x00010cea, 0x000013ad, 0x0000ab7d, - 0x000001f7, 0x000001bf, 0x000003a6, 0x000003c6, - 0x0000a660, 0x0000a661, 0x000118b9, 0x000118d9, - 0x00002c24, 0x00002c54, 0x000003f4, 0x000003b8, - 0x0000051e, 0x0000051f, 0x000118aa, 0x000118ca, - 0x000118bc, 0x000118dc, 0x00000415, 0x00000435, - 0x000000ca, 0x000000ea, 0x0000022a, 0x0000022b, - 0x000004aa, 0x000004ab, 0x000013e1, 0x0000abb1, - 0x00001ec4, 0x00001ec5, 0x0000011a, 0x0000011b, - 0x00010424, 0x0001044c, 0x00001e0c, 0x00001e0d, - 0x0000a696, 0x0000a697, 0x000010bc, 0x00002d1c, - 0x0000019c, 0x0000026f, 0x000104bf, 0x000104e7, - 0x000118bb, 0x000118db, 0x00010408, 0x00010430, - 0x0000024a, 0x0000024b, 0x00000412, 0x00000432, - 0x000013e0, 0x0000abb0, 0x00000046, 0x00000066, - 0x00002cce, 0x00002ccf, 0x0000051c, 0x0000051d, - 0x000013ac, 0x0000ab7c, 0x000010be, 0x00002d1e, - 0x00000196, 0x00000269, 0x000010ba, 0x00002d1a, - 0x00010ca5, 0x00010ce5, 0x00001fbb, 0x00001f71, - 0x0001e90e, 0x0001e930, 0x0000a7b0, 0x0000029e, - 0x000010c4, 0x00002d24, 0x00001cb7, 0x000010f7, - 0x00016e55, 0x00016e75, 0x00001caa, 0x000010ea, - 0x00000172, 0x00000173, 0x00001e14, 0x00001e15, - 0x0000041a, 0x0000043a, 0x0001e917, 0x0001e939, - 0x00000556, 0x00000586, 0x0000a79a, 0x0000a79b, - 0x00002c84, 0x00002c85, 0x0001e909, 0x0001e92b, - 0x00001fcb, 0x00001f75, 0x00016e4c, 0x00016e6c, - 0x0000ff2b, 0x0000ff4b, 0x00000547, 0x00000577, - 0x000013f5, 0x000013fd, 0x000013cc, 0x0000ab9c, - 0x00000128, 0x00000129, 0x000013b5, 0x0000ab85, - 0x0000ff25, 0x0000ff45, 0x00001f0e, 0x00001f06, - 0x00001edc, 0x00001edd, 0x00002cda, 0x00002cdb, - 0x00002c6e, 0x00000271, 0x000000d3, 0x000000f3, - 0x0000216b, 0x0000217b, 0x000024c8, 0x000024e2, - 0x000001fe, 0x000001ff, 0x0000039c, 0x000003bc, - 0x000013ab, 0x0000ab7b, 0x00002160, 0x00002170, - 0x00001e00, 0x00001e01, 0x00001c9b, 0x000010db, - 0x0000048c, 0x0000048d, 0x00010ca0, 0x00010ce0, - 0x00010c99, 0x00010cd9, 0x0000a782, 0x0000a783, - 0x00001cbd, 0x000010fd, 0x0001e906, 0x0001e928, - 0x000004c5, 0x000004c6, 0x000001b2, 0x0000028b, - 0x00001f9c, 0x00001f94, 0x000104cf, 0x000104f7, - 0x000104b6, 0x000104de, 0x00002c19, 0x00002c49, - 0x0000a686, 0x0000a687, 0x00001e6e, 0x00001e6f, - 0x00000110, 0x00000111, 0x000013a8, 0x0000ab78, - 0x0000012c, 0x0000012d, 0x0000a77d, 0x00001d79, - 0x00010c85, 0x00010cc5, 0x0000a76a, 0x0000a76b, - 0x00000404, 0x00000454, 0x0001040d, 0x00010435, - 0x00001f6d, 0x00001f65, 0x00001c97, 0x000010d7, - 0x000013d2, 0x0000aba2, 0x0000a76e, 0x0000a76f, - 0x000024bd, 0x000024d7, 0x000013a7, 0x0000ab77, - 0x00000392, 0x000003b2, 0x00010c86, 0x00010cc6, - 0x00000496, 0x00000497, 0x00002cb0, 0x00002cb1, - 0x00001c99, 0x000010d9, 0x000003e2, 0x000003e3, - 0x0000004b, 0x0000006b, 0x0000a77e, 0x0000a77f, - 0x0000a65e, 0x0000a65f, 0x00001feb, 0x00001f7b, - 0x00000145, 0x00000146, 0x000118bd, 0x000118dd, - 0x000024c9, 0x000024e3, 0x0000a7a8, 0x0000a7a9, - 0x0000038c, 0x000003cc, 0x00000102, 0x00000103, - 0x00002c08, 0x00002c38, 0x0000a64e, 0x0000a64f, - 0x000003f9, 0x000003f2, 0x0001e920, 0x0001e942, - 0x00000544, 0x00000574, 0x000003f7, 0x000003f8, - 0x00000241, 0x00000242, 0x00000108, 0x00000109, - 0x00001f29, 0x00001f21, 0x00001fab, 0x00001fa3, - 0x00010411, 0x00010439, 0x00001e7c, 0x00001e7d, - 0x00001cb0, 0x000010f0, 0x00010402, 0x0001042a, - 0x000010b4, 0x00002d14, 0x00000132, 0x00000133, - 0x000013e5, 0x0000abb5, 0x0000042e, 0x0000044e, - 0x00010c8a, 0x00010cca, 0x00001ca8, 0x000010e8, - 0x00001e4c, 0x00001e4d, 0x00001fae, 0x00001fa6, - 0x00000422, 0x00000442, 0x000003fa, 0x000003fb, - 0x00001eb4, 0x00001eb5, 0x0000a7b6, 0x0000a7b7, - 0x000001b5, 0x000001b6, 0x000001e0, 0x000001e1, - 0x000118b8, 0x000118d8, 0x00000508, 0x00000509, - 0x00016e5e, 0x00016e7e, 0x000104c5, 0x000104ed, - 0x000013d8, 0x0000aba8, 0x000118ba, 0x000118da, - 0x000024ca, 0x000024e4, 0x00001f49, 0x00001f41, - 0x00016e41, 0x00016e61, 0x0000010c, 0x0000010d, - 0x0000021a, 0x0000021b, 0x0000a7a0, 0x0000a7a1, - 0x00001e0a, 0x00001e0b, 0x000004c9, 0x000004ca, - 0x00001f99, 0x00001f91, 0x00010415, 0x0001043d, - 0x000001c5, 0x000001c6, 0x00001ff9, 0x00001f79, - 0x0000053b, 0x0000056b, 0x00001c96, 0x000010d6, - 0x00002c70, 0x00000252, 0x00000042, 0x00000062, - 0x00000424, 0x00000444, 0x00001f8f, 0x00001f87, - 0x00001e60, 0x00001e61, 0x00016e52, 0x00016e72, - 0x0000041f, 0x0000043f, 0x00002ca0, 0x00002ca1, - 0x0000a668, 0x0000a669, 0x0000014a, 0x0000014b, - 0x000013b7, 0x0000ab87, 0x000003a0, 0x000003c0, - 0x000004b8, 0x000004b9, 0x00010cb2, 0x00010cf2, - 0x000013b3, 0x0000ab83, 0x000001b3, 0x000001b4, - 0x00001f3f, 0x00001f37, 0x000013f2, 0x000013fa, - 0x000000cb, 0x000000eb, 0x0000015e, 0x0000015f, - 0x00000041, 0x00000061, 0x000003fe, 0x0000037c, - 0x000104c0, 0x000104e8, 0x000004c3, 0x000004c4, - 0x00010c81, 0x00010cc1, 0x0000ff37, 0x0000ff57, - 0x00002c29, 0x00002c59, 0x00001fb9, 0x00001fb1, - 0x0000a698, 0x0000a699, 0x00002c20, 0x00002c50, - 0x0000019d, 0x00000272, 0x00000528, 0x00000529, - 0x00010ca8, 0x00010ce8, 0x00000136, 0x00000137, - 0x00010c92, 0x00010cd2, 0x0000042d, 0x0000044d, - 0x000013e2, 0x0000abb2, 0x00001c92, 0x000010d2, - 0x00010cb1, 0x00010cf1, 0x00001cad, 0x000010ed, - 0x000000c3, 0x000000e3, 0x0000a748, 0x0000a749, - 0x00000402, 0x00000452, 0x000001ee, 0x000001ef, - 0x0000a758, 0x0000a759, 0x000013dd, 0x0000abad, - 0x000118b1, 0x000118d1, 0x0000013d, 0x0000013e, - 0x000010ab, 0x00002d0b, 0x00001cb5, 0x000010f5, - 0x000104cd, 0x000104f5, 0x00001ca5, 0x000010e5, - 0x0000012a, 0x0000012b, 0x00002c8c, 0x00002c8d, - 0x00000429, 0x00000449, 0x000013cf, 0x0000ab9f, - 0x000118a6, 0x000118c6, 0x00002c14, 0x00002c44, - 0x00000147, 0x00000148, 0x000004f6, 0x000004f7, - 0x00002165, 0x00002175, 0x00000118, 0x00000119, - 0x0000023e, 0x00002c66, 0x00010c9a, 0x00010cda, - 0x00001e5c, 0x00001e5d, 0x000118a9, 0x000118c9, - 0x00000222, 0x00000223, 0x00000411, 0x00000431, - 0x00001cb3, 0x000010f3, 0x000013e6, 0x0000abb6, - 0x00010410, 0x00010438, 0x0000a7b2, 0x0000029d, - 0x00002c6d, 0x00000251, 0x00001f5d, 0x00001f55, - 0x00016e59, 0x00016e79, 0x0000a762, 0x0000a763, - 0x00000413, 0x00000433, 0x000013c7, 0x0000ab97, - 0x0000a740, 0x0000a741, 0x0001e908, 0x0001e92a, - 0x00002c12, 0x00002c42, 0x00002c92, 0x00002c93, - 0x00000395, 0x000003b5, 0x000004e0, 0x000004e1, - 0x000010b6, 0x00002d16, 0x00002cd2, 0x00002cd3, - 0x0000ff24, 0x0000ff44, 0x0000047e, 0x0000047f, - 0x000010b8, 0x00002d18, 0x0000024e, 0x0000024f, - 0x000013bb, 0x0000ab8b, 0x000004be, 0x000004bf, - 0x000001a9, 0x00000283, 0x000004dc, 0x000004dd, - 0x000000d2, 0x000000f2, 0x000010a0, 0x00002d00, - 0x000003e8, 0x000003e9, 0x00000536, 0x00000566, - 0x00016e5a, 0x00016e7a, 0x0000051a, 0x0000051b, - 0x00010425, 0x0001044d, 0x00001f9d, 0x00001f95, - 0x00000208, 0x00000209, 0x0000a756, 0x0000a757, - 0x00001e26, 0x00001e27, 0x000000d5, 0x000000f5, - 0x000013aa, 0x0000ab7a, 0x00010ca1, 0x00010ce1, - 0x000024cb, 0x000024e5, 0x00001e80, 0x00001e81, - 0x00000394, 0x000003b4, 0x00001f0b, 0x00001f03, - 0x000118ae, 0x000118ce, 0x00001e3e, 0x00001e3f, - 0x00000408, 0x00000458, 0x000004b2, 0x000004b3, - 0x000104c4, 0x000104ec, 0x00010ca2, 0x00010ce2, - 0x00001e86, 0x00001e87, 0x0001e918, 0x0001e93a, - 0x00016e44, 0x00016e64, 0x000003cf, 0x000003d7, - 0x00002c0e, 0x00002c3e, 0x0000a7a6, 0x0000a7a7, - 0x0000038a, 0x000003af, 0x000118a0, 0x000118c0, - 0x000118ad, 0x000118cd, 0x0000a684, 0x0000a685, - 0x00001f98, 0x00001f90, 0x00000468, 0x00000469, - 0x000013a2, 0x0000ab72, 0x0000a754, 0x0000a755, - 0x0000041d, 0x0000043d, 0x00001fcc, 0x00001fc3, - 0x0000212a, 0x0000006b, 0x000001b7, 0x00000292, - 0x00010413, 0x0001043b, 0x00001e4e, 0x00001e4f, - 0x00001e1e, 0x00001e1f, 0x000001af, 0x000001b0, - 0x0000004f, 0x0000006f, 0x0000a680, 0x0000a681, - 0x000000d9, 0x000000f9, 0x00000398, 0x000003b8, - 0x00002c69, 0x00002c6a, 0x000004ba, 0x000004bb, - 0x0000015a, 0x0000015b, 0x00002c88, 0x00002c89, - 0x00000427, 0x00000447, 0x000001cb, 0x000001cc, - 0x00000216, 0x00000217, 0x00002c26, 0x00002c56, - 0x000118a2, 0x000118c2, 0x0001e907, 0x0001e929, - 0x000118be, 0x000118de, 0x00001fbc, 0x00001fb3, - 0x000004e6, 0x000004e7, 0x00001ed8, 0x00001ed9, - 0x000013f3, 0x000013fb, 0x00000498, 0x00000499, - 0x000024c5, 0x000024df, 0x000000c4, 0x000000e4, - 0x00010c9f, 0x00010cdf, 0x00016e5d, 0x00016e7d, - 0x0000013f, 0x00000140, 0x00010caf, 0x00010cef, - 0x00001cb2, 0x000010f2, 0x0000050c, 0x0000050d, - 0x0000004d, 0x0000006d, 0x00000052, 0x00000072, - 0x00001eb8, 0x00001eb9, 0x00001cb8, 0x000010f8, - 0x000024cf, 0x000024e9, 0x00001c9a, 0x000010da, - 0x00001f0a, 0x00001f02, 0x0000ff3a, 0x0000ff5a, - 0x00000397, 0x000003b7, 0x00000524, 0x00000525, - 0x00001cab, 0x000010eb, 0x0000a722, 0x0000a723, - 0x00002c05, 0x00002c35, 0x00002c6b, 0x00002c6c, - 0x0000a650, 0x0000a651, 0x0000004c, 0x0000006c, - 0x00001e84, 0x00001e85, 0x00002ca4, 0x00002ca5, - 0x00001f9f, 0x00001f97, 0x000118b4, 0x000118d4, - 0x00001eea, 0x00001eeb, 0x00000204, 0x00000205, - 0x00001f5b, 0x00001f53, 0x000010b1, 0x00002d11, - 0x00001ca4, 0x000010e4, 0x00000405, 0x00000455, - 0x00001f2a, 0x00001f22, 0x00000114, 0x00000115, - 0x000024b7, 0x000024d1, 0x000001cf, 0x000001d0, - 0x00000156, 0x00000157, 0x00001ea0, 0x00001ea1, - 0x00001c95, 0x000010d5, 0x000010a5, 0x00002d05, - 0x00002169, 0x00002179, 0x00001f28, 0x00001f20, - 0x000003e4, 0x000003e5, 0x00000526, 0x00000527, - 0x00001e70, 0x00001e71, 0x0000a7ae, 0x0000026a, - 0x000004c1, 0x000004c2, 0x0000042a, 0x0000044a, - 0x00001ede, 0x00001edf, 0x0000a78b, 0x0000a78c, - 0x0000a726, 0x0000a727, 0x0000ff39, 0x0000ff59, - 0x0000a73e, 0x0000a73f, 0x0000a72e, 0x0000a72f, - 0x00010403, 0x0001042b, 0x00010ca7, 0x00010ce7, - 0x000003a3, 0x000003c3, 0x000104ce, 0x000104f6, - 0x00001efc, 0x00001efd, 0x00002c18, 0x00002c48, - 0x00001eb6, 0x00001eb7, 0x0000020e, 0x0000020f, - 0x000013ef, 0x0000abbf, 0x000013a3, 0x0000ab73, - 0x00000189, 0x00000256, 0x0000ff36, 0x0000ff56, - 0x000004ac, 0x000004ad, 0x00002c09, 0x00002c39, - 0x00001f1b, 0x00001f13, 0x00002cae, 0x00002caf, - 0x0001e904, 0x0001e926, 0x000000c7, 0x000000e7, - 0x00000406, 0x00000456, 0x000024bc, 0x000024d6, - 0x000010b9, 0x00002d19, 0x00002c90, 0x00002c91, - 0x00000478, 0x00000479, 0x00001efa, 0x00001efb, - 0x00000139, 0x0000013a, 0x00002c0b, 0x00002c3b, - 0x00001caf, 0x000010ef, 0x000004ee, 0x000004ef, - 0x00001c98, 0x000010d8, 0x00000178, 0x000000ff, - 0x0000a7b1, 0x00000287, 0x00001cbf, 0x000010ff, - 0x0001041c, 0x00010444, 0x0000017b, 0x0000017c, - 0x00001e74, 0x00001e75, 0x00000399, 0x000003b9, - 0x00001f0d, 0x00001f05, 0x000118b7, 0x000118d7, - 0x000003a9, 0x000003c9, 0x00001e76, 0x00001e77, - 0x000013b8, 0x0000ab88, 0x00016e43, 0x00016e63, - 0x00001ca3, 0x000010e3, 0x000001db, 0x000001dc, - 0x0001e91c, 0x0001e93e, 0x0000041e, 0x0000043e, - 0x0001e90f, 0x0001e931, 0x00000120, 0x00000121, - 0x000001e8, 0x000001e9, 0x00000370, 0x00000371, - 0x00001ea4, 0x00001ea5, 0x000118ac, 0x000118cc, - 0x000024c0, 0x000024da, 0x000010a2, 0x00002d02, - 0x000003e0, 0x000003e1, 0x000013a6, 0x0000ab76, - 0x0000a7ad, 0x0000026c, 0x00001ec8, 0x00001ec9, - 0x000003da, 0x000003db, 0x00000416, 0x00000436, - 0x0001e913, 0x0001e935, 0x00001ca2, 0x000010e2, - 0x0000a7b8, 0x0000a7b9, 0x000013d0, 0x0000aba0, - 0x00010426, 0x0001044e, 0x000013eb, 0x0000abbb, - 0x000000d0, 0x000000f0, 0x00002c9a, 0x00002c9b, - 0x0000054d, 0x0000057d, 0x0001e901, 0x0001e923, - 0x000003a7, 0x000003c7, 0x000001a0, 0x000001a1, - 0x00001f3a, 0x00001f32, 0x0000040e, 0x0000045e, - 0x000004ea, 0x000004eb, 0x000013e3, 0x0000abb3, - 0x00000162, 0x00000163, 0x0000ff35, 0x0000ff55, - 0x00002c01, 0x00002c31, 0x0000023d, 0x0000019a, - 0x000013cd, 0x0000ab9d, 0x0000a666, 0x0000a667, - 0x0000039e, 0x000003be, 0x000004a0, 0x000004a1, - 0x000010c5, 0x00002d25, 0x000024c4, 0x000024de, - 0x000010a6, 0x00002d06, 0x00010cae, 0x00010cee, - 0x00002c2c, 0x00002c5c, 0x00000044, 0x00000064, - 0x00002ccc, 0x00002ccd, 0x00001e2e, 0x00001e2f, - 0x00002132, 0x0000214e, 0x00016e4f, 0x00016e6f, - 0x00000179, 0x0000017a, 0x00001e48, 0x00001e49, - 0x00016e58, 0x00016e78, 0x000004a6, 0x000004a7, - 0x00001f09, 0x00001f01, 0x00001cb6, 0x000010f6, - 0x00016e48, 0x00016e68, 0x0000039a, 0x000003ba, - 0x0000041b, 0x0000043b, 0x0000018a, 0x00000257, - 0x00000158, 0x00000159, 0x00000462, 0x00000463, - 0x0000216a, 0x0000217a, 0x0001e91e, 0x0001e940, - 0x000000c0, 0x000000e0, 0x00000176, 0x00000177, - 0x000013ce, 0x0000ab9e, 0x00001e52, 0x00001e53, - 0x000010bf, 0x00002d1f, 0x00001f38, 0x00001f30, - 0x000001f6, 0x00000195, 0x00002cc2, 0x00002cc3, - 0x000010b5, 0x00002d15, 0x00000490, 0x00000491, - 0x000004bc, 0x000004bd, 0x00010c8d, 0x00010ccd, - 0x000013a9, 0x0000ab79, 0x000004fa, 0x000004fb, - 0x00000504, 0x00000505, 0x00002cd8, 0x00002cd9, - 0x00001ee0, 0x00001ee1, 0x00002166, 0x00002176, - 0x00001e6a, 0x00001e6b, 0x00000054, 0x00000074, - 0x00002cdc, 0x00002cdd, 0x00001e78, 0x00001e79, - 0x00000419, 0x00000439, 0x000118b2, 0x000118d2, - 0x0001e903, 0x0001e925, 0x000104c2, 0x000104ea, - 0x000001d7, 0x000001d8, 0x00000540, 0x00000570, - 0x00002c1b, 0x00002c4b, 0x000003e6, 0x000003e7, - 0x000000cc, 0x000000ec, 0x000010c2, 0x00002d22, - 0x00002c27, 0x00002c57, 0x0000004a, 0x0000006a, - 0x00001eba, 0x00001ebb, 0x0000013b, 0x0000013c, - 0x000004b4, 0x000004b5, 0x00001ca1, 0x000010e1, - 0x000024c7, 0x000024e1, 0x000013b9, 0x0000ab89, - 0x00002161, 0x00002171, 0x000000dd, 0x000000fd, - 0x000013d5, 0x0000aba5, 0x000024c3, 0x000024dd, - 0x00001e82, 0x00001e83, 0x000001c7, 0x000001c9, - 0x00000510, 0x00000511, 0x0000020c, 0x0000020d, - 0x00010cad, 0x00010ced, 0x00000248, 0x00000249, - 0x0000a7b3, 0x0000ab53, 0x00000417, 0x00000437, - 0x00000058, 0x00000078, 0x00002ce0, 0x00002ce1, - 0x000013ec, 0x0000abbc, 0x00010c88, 0x00010cc8, - 0x00001e22, 0x00001e23, 0x0000a694, 0x0000a695, - 0x0000ff2e, 0x0000ff4e, 0x0000038e, 0x000003cd, - 0x00000418, 0x00000438, 0x000013c5, 0x0000ab95, - 0x00001e94, 0x00001e95, 0x00000116, 0x00000117, - 0x00002c86, 0x00002c87, 0x0000a734, 0x0000a735, - 0x00010417, 0x0001043f, 0x0000a7a2, 0x0000a7a3, - 0x000013ca, 0x0000ab9a, 0x000001a6, 0x00000280, - 0x000004f4, 0x000004f5, 0x0000a760, 0x0000a761, - 0x00001f18, 0x00001f10, 0x00002c64, 0x0000027d, - 0x00000541, 0x00000571, 0x00000049, 0x00000069, - 0x00000152, 0x00000153, 0x000003ec, 0x000003ed, - 0x0001e914, 0x0001e936, 0x00002c23, 0x00002c53, - 0x00001ed0, 0x00001ed1, 0x00001c9e, 0x000010de, - 0x00001f1c, 0x00001f14, 0x00001e06, 0x00001e07, - 0x00001ef2, 0x00001ef3, 0x00000057, 0x00000077, - 0x00000206, 0x00000207, 0x000003d8, 0x000003d9, - 0x0000047a, 0x0000047b, 0x00001ffa, 0x00001f7c, - 0x00000051, 0x00000071, 0x000013c9, 0x0000ab99, - 0x0000a640, 0x0000a641, 0x0001e919, 0x0001e93b, - 0x00000053, 0x00000073, 0x0000a7a4, 0x0000a7a5, - 0x00001e56, 0x00001e57, 0x00002ced, 0x00002cee, - 0x00016e5f, 0x00016e7f, 0x00010416, 0x0001043e, - 0x0000a78d, 0x00000265, 0x00010c95, 0x00010cd5, - 0x00000546, 0x00000576, 0x00000555, 0x00000585, - 0x00001fac, 0x00001fa4, 0x00001f6a, 0x00001f62, - 0x000003dc, 0x000003dd, 0x00000548, 0x00000578, - 0x00016e54, 0x00016e74, 0x00000552, 0x00000582, - 0x0000ff2f, 0x0000ff4f, 0x00001fa9, 0x00001fa1, - 0x00010406, 0x0001042e, 0x000013d7, 0x0000aba7, - 0x000001e6, 0x000001e7, 0x00010cac, 0x00010cec, - 0x00010c8b, 0x00010ccb, 0x00000181, 0x00000253, - 0x000024c2, 0x000024dc, 0x00000407, 0x00000457, - 0x000001d1, 0x000001d2, 0x00010c83, 0x00010cc3, - 0x000104b4, 0x000104dc, 0x00001ecc, 0x00001ecd, - 0x000104c3, 0x000104eb, 0x0000042b, 0x0000044b, - 0x00002c80, 0x00002c81, 0x00001c9c, 0x000010dc, - 0x00001e4a, 0x00001e4b, 0x000013d9, 0x0000aba9, - 0x000013e7, 0x0000abb7, 0x00001eda, 0x00001edb, - 0x000003ea, 0x000003eb, 0x00001cbe, 0x000010fe, - 0x00001e16, 0x00001e17, 0x00010cb0, 0x00010cf0, - 0x0000049c, 0x0000049d, 0x0000a654, 0x0000a655, - 0x00002cb2, 0x00002cb3, 0x000013af, 0x0000ab7f, - 0x0001e910, 0x0001e932, 0x000004ec, 0x000004ed, - 0x0000a656, 0x0000a657, 0x000000c6, 0x000000e6, - 0x00010423, 0x0001044b, 0x0000021e, 0x0000021f, - 0x00010c94, 0x00010cd4, 0x0000a798, 0x0000a799, - 0x0001e900, 0x0001e922, 0x00001c9d, 0x000010dd, - 0x0000a75e, 0x0000a75f, 0x00010407, 0x0001042f, - 0x00002c22, 0x00002c52, 0x00016e4e, 0x00016e6e, - 0x0000053c, 0x0000056c, 0x00001efe, 0x00001eff, - 0x00002c0c, 0x00002c3c, 0x00001e8e, 0x00001e8f, - 0x00000414, 0x00000434, 0x000013ee, 0x0000abbe, - 0x00000059, 0x00000079, 0x000004c7, 0x000004c8, - 0x00001c9f, 0x000010df, 0x000118a4, 0x000118c4, - 0x0000212b, 0x000000e5, 0x000004f8, 0x000004f9, - 0x00001eac, 0x00001ead, 0x000003ff, 0x0000037d, - 0x00000542, 0x00000572, 0x00002c02, 0x00002c32, - 0x000000de, 0x000000fe, 0x00002cb4, 0x00002cb5, - 0x00001c93, 0x000010d3, 0x000004cd, 0x000004ce, - 0x000010c3, 0x00002d23, 0x00001e2a, 0x00001e2b, - 0x0000ff33, 0x0000ff53, 0x00002c1d, 0x00002c4d, - 0x0000040f, 0x0000045f, 0x0000a764, 0x0000a765, - 0x0000a79c, 0x0000a79d, 0x0000ff26, 0x0000ff46, - 0x00001f2d, 0x00001f25, 0x00001e1a, 0x00001e1b, - 0x000000d6, 0x000000f6, 0x000013b6, 0x0000ab86, - 0x00010420, 0x00010448, 0x00000532, 0x00000562, - 0x00000182, 0x00000183, 0x0000a768, 0x0000a769, - 0x00001f8c, 0x00001f84, 0x00016e40, 0x00016e60, - 0x00002c2d, 0x00002c5d, 0x0001041b, 0x00010443, - 0x00001f0f, 0x00001f07, 0x000104bd, 0x000104e5, - 0x000004a4, 0x000004a5, 0x0000a72c, 0x0000a72d, - 0x0000a646, 0x0000a647, 0x00000401, 0x00000451, - 0x000000cd, 0x000000ed, 0x00000533, 0x00000563, - 0x0000a74c, 0x0000a74d, 0x00000545, 0x00000575, - 0x00000400, 0x00000450, 0x00002168, 0x00002178, - 0x000024cd, 0x000024e7, 0x000004d6, 0x000004d7, - 0x00001e8a, 0x00001e8b, 0x0000024c, 0x0000024d, - 0x00010c9b, 0x00010cdb, 0x000004cb, 0x000004cc, - 0x000024bf, 0x000024d9, 0x00001ca0, 0x000010e0, - 0x000001d9, 0x000001da, 0x000013de, 0x0000abae, - 0x00001eb2, 0x00001eb3, 0x0000a68e, 0x0000a68f, - 0x00001e64, 0x00001e65, 0x0000a746, 0x0000a747, - 0x000013a4, 0x0000ab74, 0x0000a74e, 0x0000a74f, - 0x00000166, 0x00000167, 0x00001fec, 0x00001fe5, - 0x00000106, 0x00000107, 0x000104bb, 0x000104e3, - 0x0000005a, 0x0000007a, 0x00002ce2, 0x00002ce3, - 0x00010c9c, 0x00010cdc, 0x0000014e, 0x0000014f, - 0x000118ab, 0x000118cb, 0x00010418, 0x00010440, - 0x00001f3e, 0x00001f36, 0x000013bf, 0x0000ab8f, - 0x00000543, 0x00000573, 0x00001e66, 0x00001e67, - 0x00002cac, 0x00002cad, 0x00000043, 0x00000063, - 0x000004b6, 0x000004b7, 0x000004f0, 0x000004f1, - 0x0000a752, 0x0000a753, 0x00001eae, 0x00001eaf, - 0x00000150, 0x00000151, 0x00010c8e, 0x00010cce, - 0x000001a7, 0x000001a8, 0x00000100, 0x00000101, - 0x000104c7, 0x000104ef, 0x000001c4, 0x000001c6, - 0x000013f0, 0x000013f8, 0x000004da, 0x000004db, - 0x0000a692, 0x0000a693, 0x00001fd9, 0x00001fd1, - 0x000104b2, 0x000104da, 0x00000531, 0x00000561, - 0x00000522, 0x00000523, 0x0000a7ac, 0x00000261, - 0x0000054b, 0x0000057b, 0x0000a750, 0x0000a751, - 0x0000054f, 0x0000057f, 0x0001041d, 0x00010445, - 0x00000200, 0x00000201, 0x0000a786, 0x0000a787, - 0x00001f2b, 0x00001f23, 0x00001e5e, 0x00001e5f, - 0x0001040a, 0x00010432, 0x000104c9, 0x000104f1, - 0x00000122, 0x00000123, 0x000013f4, 0x000013fc, - 0x00001ea6, 0x00001ea7, 0x00000174, 0x00000175, - 0x00001f9e, 0x00001f96, 0x00001e50, 0x00001e51, - 0x00002c2e, 0x00002c5e, 0x0001040e, 0x00010436, - 0x000104b9, 0x000104e1, 0x0000039d, 0x000003bd, - 0x00002183, 0x00002184, 0x00002c6f, 0x00000250, - 0x00000190, 0x0000025b, 0x000010a4, 0x00002d04, - 0x0000039f, 0x000003bf, 0x00000389, 0x000003ae, - 0x00001e12, 0x00001e13, 0x0000a644, 0x0000a645, - 0x00001ec0, 0x00001ec1, 0x00000494, 0x00000495, - 0x000104ba, 0x000104e2, 0x00000050, 0x00000070, - 0x00001e32, 0x00001e33, 0x0000ff2d, 0x0000ff4d, - 0x00000423, 0x00000443, 0x00016e4a, 0x00016e6a, - 0x0000004e, 0x0000006e, 0x00010427, 0x0001044f, - 0x00002c0f, 0x00002c3f, 0x0000023b, 0x0000023c, - 0x00001f1d, 0x00001f15, 0x00001f08, 0x00001f00, - 0x00001f4c, 0x00001f44, 0x00010c87, 0x00010cc7, - 0x000004f2, 0x000004f3, 0x00001c94, 0x000010d4, - 0x0000a7aa, 0x00000266, 0x00001f68, 0x00001f60, - 0x0000046e, 0x0000046f, 0x00016e49, 0x00016e69, - 0x00001faf, 0x00001fa7, 0x000001cd, 0x000001ce, - 0x00000514, 0x00000515, 0x0000046c, 0x0000046d, - 0x000118b5, 0x000118d5, 0x00002c1c, 0x00002c4c, - 0x00001ea8, 0x00001ea9, 0x000003de, 0x000003df, - 0x00002c04, 0x00002c34, 0x00001fa8, 0x00001fa0, - 0x00002cb8, 0x00002cb9, 0x00000553, 0x00000583, - 0x0000041c, 0x0000043c, 0x00001f5f, 0x00001f57, - 0x000010b7, 0x00002d17, 0x00000212, 0x00000213, - 0x000013d1, 0x0000aba1, 0x0001041e, 0x00010446, - 0x00000243, 0x00000180, 0x0000a690, 0x0000a691, - 0x00001cba, 0x000010fa, 0x00000391, 0x000003b1, - 0x0001e90b, 0x0001e92d, 0x00001f39, 0x00001f31, - 0x00001e7e, 0x00001e7f, 0x00001f69, 0x00001f61, - 0x00000516, 0x00000517, 0x00000535, 0x00000565, - 0x00010401, 0x00010429, 0x0000a7b4, 0x0000a7b5, - 0x000118a8, 0x000118c8, 0x000004a8, 0x000004a9, - 0x000010a7, 0x00002d07, 0x000013be, 0x0000ab8e, - 0x00001eaa, 0x00001eab, 0x00010ca6, 0x00010ce6, - 0x0001e921, 0x0001e943, 0x00010c97, 0x00010cd7, - 0x0000a744, 0x0000a745, 0x000013b4, 0x0000ab84, - 0x00001e9e, 0x000000df, 0x000010c0, 0x00002d20, - 0x000013c4, 0x0000ab94, 0x00001eb0, 0x00001eb1, - 0x00001f8e, 0x00001f86, 0x00001f89, 0x00001f81, - 0x0001e90d, 0x0001e92f, 0x000003a8, 0x000003c8, - 0x00001ece, 0x00001ecf, 0x0000ff2a, 0x0000ff4a, - 0x0000a66c, 0x0000a66d, 0x0001e91a, 0x0001e93c, - 0x0000010e, 0x0000010f, 0x00002c96, 0x00002c97, - 0x0000037f, 0x000003f3, 0x00000534, 0x00000564, - 0x0000049e, 0x0000049f, 0x00002cb6, 0x00002cb7, - 0x00002c25, 0x00002c55, 0x0000047c, 0x0000047d, - 0x000013ea, 0x0000abba, 0x00010414, 0x0001043c, - 0x0000a780, 0x0000a781, 0x000001a2, 0x000001a3, - 0x0001e915, 0x0001e937, 0x00010400, 0x00010428, - 0x000024c6, 0x000024e0, 0x00001e92, 0x00001e93, - 0x000001ac, 0x000001ad, 0x00002c15, 0x00002c45, - 0x000000c9, 0x000000e9, 0x00002c21, 0x00002c51, - 0x00001cb9, 0x000010f9, 0x000001bc, 0x000001bd, - 0x00016e4d, 0x00016e6d, 0x00000518, 0x00000519, - 0x00002cf2, 0x00002cf3, 0x00001cb1, 0x000010f1, - 0x000004ae, 0x000004af, 0x000010b2, 0x00002d12, - 0x00002c28, 0x00002c58, 0x000001fc, 0x000001fd, - 0x0001e912, 0x0001e934, 0x0000a662, 0x0000a663, - 0x000000d1, 0x000000f1, 0x000000d4, 0x000000f4, - 0x000013c3, 0x0000ab93, 0x00000186, 0x00000254, - 0x00000538, 0x00000568, 0x0000011c, 0x0000011d, - 0x00002cba, 0x00002cbb, 0x00001ea2, 0x00001ea3, - 0x000104cc, 0x000104f4, 0x00000193, 0x00000260, - 0x0001040f, 0x00010437, 0x00000202, 0x00000203, - 0x00010c8f, 0x00010ccf, 0x00010c8c, 0x00010ccc, - 0x00001e1c, 0x00001e1d, 0x0000a65a, 0x0000a65b, - 0x00000550, 0x00000580, 0x00000245, 0x0000028c, - 0x00001f19, 0x00001f11, 0x000000c1, 0x000000e1, - 0x00001e40, 0x00001e41, 0x00001f2c, 0x00001f24, - 0x00000466, 0x00000467, 0x00002cc4, 0x00002cc5, - 0x000024b9, 0x000024d3, 0x00001e8c, 0x00001e8d, - 0x00001e90, 0x00001e91, 0x000004b0, 0x000004b1, - 0x000001b1, 0x0000028a, 0x000003fd, 0x0000037b, - 0x000001f2, 0x000001f3, 0x000000c2, 0x000000e2, - 0x00000502, 0x00000503, 0x0000022e, 0x0000022f, - 0x000013b1, 0x0000ab81, 0x0000017d, 0x0000017e, - 0x00010c89, 0x00010cc9, 0x000013a0, 0x0000ab70, - 0x00001ca9, 0x000010e9, 0x00000164, 0x00000165, - 0x00002c00, 0x00002c30, 0x00001ef4, 0x00001ef5, - 0x00002cc0, 0x00002cc1, 0x0000a68c, 0x0000a68d, - 0x00001e24, 0x00001e25, 0x00000372, 0x00000373, - 0x0000052c, 0x0000052d, 0x000010c7, 0x00002d27, - 0x00001e28, 0x00001e29, 0x00001f48, 0x00001f40, - 0x000003a4, 0x000003c4, 0x00010c9e, 0x00010cde, - 0x00001ca6, 0x000010e6, 0x00001e44, 0x00001e45, - 0x0000018b, 0x0000018c, 0x00000047, 0x00000067, - 0x00001f6e, 0x00001f66, 0x0000a75c, 0x0000a75d, - 0x00001ebe, 0x00001ebf, 0x00001fda, 0x00001f76, - 0x00001e62, 0x00001e63, 0x000118a5, 0x000118c5, - 0x00002c1a, 0x00002c4a, 0x000010a8, 0x00002d08, - 0x00002c7f, 0x00000240, 0x00016e51, 0x00016e71, - 0x00001cac, 0x000010ec, 0x000001f1, 0x000001f3, - 0x00000554, 0x00000584, 0x00001e0e, 0x00001e0f, - 0x000013a1, 0x0000ab71, 0x00000055, 0x00000075, - 0x00000154, 0x00000155, 0x00010c90, 0x00010cd0, - 0x00002cc8, 0x00002cc9, 0x0000a658, 0x0000a659, - 0x0000048e, 0x0000048f, 0x00001e7a, 0x00001e7b, - 0x000003a1, 0x000003c1, 0x00001f3d, 0x00001f35, - 0x000000c8, 0x000000e8, 0x00002c10, 0x00002c40, - 0x00001f4a, 0x00001f42, 0x0000042c, 0x0000044c, - 0x00002163, 0x00002173, 0x00016e46, 0x00016e66, - 0x00001faa, 0x00001fa2, 0x00000104, 0x00000105, - 0x00001ed4, 0x00001ed5, 0x0000a64c, 0x0000a64d, - 0x0001041f, 0x00010447, 0x00001e88, 0x00001e89, - 0x0000039b, 0x000003bb, 0x000104b0, 0x000104d8, - 0x000010ae, 0x00002d0e, 0x0000a64a, 0x0000a64b, - 0x00002caa, 0x00002cab, 0x000001e2, 0x000001e3, - 0x00016e45, 0x00016e65, 0x000004e8, 0x000004e9, - 0x000104d2, 0x000104fa, 0x0000ff38, 0x0000ff58, - 0x00001ed6, 0x00001ed7, 0x00000376, 0x00000377, - 0x0000a76c, 0x0000a76d, 0x00001e38, 0x00001e39, - 0x0000023a, 0x00002c65, 0x00000464, 0x00000465, - 0x00000500, 0x00000501, 0x0000a69a, 0x0000a69b, - 0x00001f4b, 0x00001f43, 0x000001ca, 0x000001cc, - 0x00000539, 0x00000569, 0x00001e6c, 0x00001e6d, - 0x00000124, 0x00000125, 0x0001e90c, 0x0001e92e, - 0x0000216f, 0x0000217f, 0x0001e91d, 0x0001e93f, - 0x00001f1a, 0x00001f12, 0x0000a72a, 0x0000a72b, - 0x00001f9a, 0x00001f92, 0x00000470, 0x00000471, - 0x00002cc6, 0x00002cc7, 0x00010409, 0x00010431, - 0x000013c6, 0x0000ab96, 0x00000388, 0x000003ad, - 0x000013e4, 0x0000abb4, 0x000118b3, 0x000118d3, - 0x00002c1e, 0x00002c4e, 0x0000054e, 0x0000057e, - 0x000104d0, 0x000104f8, 0x0000038f, 0x000003ce, - 0x000118b0, 0x000118d0, 0x00001ec2, 0x00001ec3, - 0x00000194, 0x00000263, 0x00001ff8, 0x00001f78, - 0x0001e902, 0x0001e924, 0x000010ad, 0x00002d0d, - 0x00001ec6, 0x00001ec7, 0x00001ee8, 0x00001ee9, - 0x000104b8, 0x000104e0, 0x00001f3b, 0x00001f33, - 0x0000a77b, 0x0000a77c, 0x00001f88, 0x00001f80, - 0x00010c80, 0x00010cc0, 0x000013e9, 0x0000abb9, - 0x0001e916, 0x0001e938, 0x0000012e, 0x0000012f, - 0x00002c98, 0x00002c99, 0x00002167, 0x00002177, - 0x000013f1, 0x000013f9, 0x0001040b, 0x00010433, - 0x0000a7ab, 0x0000025c, 0x0000a74a, 0x0000a74b, - 0x00002c7e, 0x0000023f, 0x00016e57, 0x00016e77, - 0x0000a682, 0x0000a683, 0x00002ca2, 0x00002ca3, - 0x0000a736, 0x0000a737, 0x000000c5, 0x000000e5, - 0x00002c63, 0x00001d7d, 0x000000dc, 0x000000fc, - 0x0000a790, 0x0000a791, 0x00002c67, 0x00002c68, - 0x0001e90a, 0x0001e92c, 0x00010422, 0x0001044a, - 0x000001e4, 0x000001e5, 0x0000ff22, 0x0000ff42, - 0x000104bc, 0x000104e4, 0x00000220, 0x0000019e, - 0x000010cd, 0x00002d2d, 0x00001eca, 0x00001ecb, - 0x000004c0, 0x000004cf, 0x0001e905, 0x0001e927, - 0x00016e4b, 0x00016e6b, 0x000024cc, 0x000024e6, - 0x00010ca9, 0x00010ce9, 0x0000010a, 0x0000010b, - 0x0000053a, 0x0000056a, 0x00002c0a, 0x00002c3a, - 0x00000168, 0x00000169, 0x00001fca, 0x00001f74, - 0x00002c75, 0x00002c76, 0x000013c2, 0x0000ab92, - 0x00010412, 0x0001043a, 0x000003ee, 0x000003ef, - 0x000013ba, 0x0000ab8a, 0x000004d2, 0x000004d3, - 0x000004e4, 0x000004e5, 0x0000a688, 0x0000a689, - 0x0000016c, 0x0000016d, 0x00000396, 0x000003b6, - 0x00001ee2, 0x00001ee3, 0x0000022c, 0x0000022d, - 0x00001e42, 0x00001e43, 0x00001f4d, 0x00001f45, - 0x0000a779, 0x0000a77a, 0x0000019f, 0x00000275, - 0x00001fb8, 0x00001fb0, 0x00001e30, 0x00001e31, - 0x00016e5c, 0x00016e7c, 0x00001f6c, 0x00001f64, - 0x00002ceb, 0x00002cec, 0x000001ae, 0x00000288, - 0x000001f4, 0x000001f5, 0x00000112, 0x00000113, - 0x000003ab, 0x000003cb, 0x000118a1, 0x000118c1, - 0x000024c1, 0x000024db, 0x000010aa, 0x00002d0a, - 0x00010ca3, 0x00010ce3, 0x00002c8e, 0x00002c8f, - 0x00001ef0, 0x00001ef1, 0x00001f8d, 0x00001f85, - 0x000010af, 0x00002d0f, 0x00000425, 0x00000445, - 0x000004e2, 0x000004e3, 0x0000a68a, 0x0000a68b, - 0x000004d8, 0x000004d9, 0x00000409, 0x00000459, - 0x0000052a, 0x0000052b, 0x0001e911, 0x0001e933, - 0x000000ce, 0x000000ee, 0x00001e02, 0x00001e03, - 0x000010b3, 0x00002d13, 0x00000143, 0x00000144, - 0x000004fc, 0x000004fd, 0x0000016e, 0x0000016f, - 0x00001f8a, 0x00001f82, 0x0000216c, 0x0000217c, - 0x00016e5b, 0x00016e7b, 0x0000054c, 0x0000057c, - 0x00002cd6, 0x00002cd7, 0x000104b7, 0x000104df, - 0x00001fc9, 0x00001f73, 0x000118a3, 0x000118c3, - 0x00001e08, 0x00001e09, 0x000001f8, 0x000001f9, - 0x00010ca4, 0x00010ce4, 0x000013b0, 0x0000ab80, - 0x0000a75a, 0x0000a75b, 0x00002c72, 0x00002c73, - 0x00000244, 0x00000289, 0x00000420, 0x00000440, - 0x00002c03, 0x00002c33, 0x00010c98, 0x00010cd8, - 0x0000018e, 0x000001dd, 0x00001eec, 0x00001eed, - 0x00000410, 0x00000430, 0x00000226, 0x00000227, - 0x000013cb, 0x0000ab9b, 0x00002cd4, 0x00002cd5, - 0x00010c9d, 0x00010cdd, 0x00000210, 0x00000211, - 0x000010a1, 0x00002d01, 0x00000126, 0x00000127, - 0x0000ff2c, 0x0000ff4c, 0x00000428, 0x00000448, - 0x0001e91b, 0x0001e93d, 0x000010bb, 0x00002d1b, - 0x00000170, 0x00000171, 0x00001ef6, 0x00001ef7, - 0x00000474, 0x00000475, 0x000013bc, 0x0000ab8c, - 0x00010419, 0x00010441, 0x00001ebc, 0x00001ebd, - 0x0000a65c, 0x0000a65d, 0x00001e58, 0x00001e59, - 0x000118af, 0x000118cf, 0x000004fe, 0x000004ff, - 0x00001e72, 0x00001e73, 0x00010c96, 0x00010cd6, - 0x00000537, 0x00000567, 0x00001c90, 0x000010d0, - 0x00001e5a, 0x00001e5b, 0x00001fe9, 0x00001fe1, - 0x00000197, 0x00000268, 0x00001f8b, 0x00001f83, - 0x0000016a, 0x0000016b, 0x000001ec, 0x000001ed, - 0x00002c8a, 0x00002c8b, 0x00002164, 0x00002174, - 0x0000040a, 0x0000045a, 0x000000da, 0x000000fa, - 0x0000a796, 0x0000a797, 0x00002c94, 0x00002c95, - 0x000013ae, 0x0000ab7e, 0x00001fad, 0x00001fa5, - 0x00000160, 0x00000161, 0x0000ff30, 0x0000ff50, - 0x000104b5, 0x000104dd, 0x00000549, 0x00000579, - 0x00000191, 0x00000192, 0x0000a784, 0x0000a785, - 0x00000232, 0x00000233, 0x00002c13, 0x00002c43, - 0x0000ff27, 0x0000ff47, 0x0001040c, 0x00010434, - 0x0000a724, 0x0000a725, 0x00000386, 0x000003ac, - 0x000013e8, 0x0000abb8, 0x000118b6, 0x000118d6, - 0x000024b6, 0x000024d0, 0x00001e36, 0x00001e37, - 0x0000ff29, 0x0000ff49, 0x000013d6, 0x0000aba6, - 0x0000020a, 0x0000020b, 0x000000db, 0x000000fb, - 0x00001fdb, 0x00001f77, 0x0000018f, 0x00000259, - 0x000001d3, 0x000001d4, 0x000010a3, 0x00002d03, - 0x00001e3c, 0x00001e3d, 0x00001fea, 0x00001f7a, - 0x000004a2, 0x000004a3, 0x000003a5, 0x000003c5, - 0x000024be, 0x000024d8, 0x000004d4, 0x000004d5, - 0x000013db, 0x0000abab, 0x000013b2, 0x0000ab82, - 0x00010c91, 0x00010cd1, 0x0000a792, 0x0000a793, - 0x0000ff34, 0x0000ff54, 0x00002c2b, 0x00002c5b, - 0x0001e91f, 0x0001e941, 0x0000011e, 0x0000011f, - 0x0000a738, 0x0000a739, 0x0000216e, 0x0000217e, - 0x000013a5, 0x0000ab75, 0x00001eee, 0x00001eef, - 0x00001e18, 0x00001e19, 0x0000a642, 0x0000a643, - 0x00002ca6, 0x00002ca7, 0x0000054a, 0x0000057a, - 0x000001de, 0x000001df, 0x000104b1, 0x000104d9, - 0x00000214, 0x00000215, 0x000001d5, 0x000001d6, - 0x00016e53, 0x00016e73, 0x00001f6b, 0x00001f63, - 0x00002c60, 0x00002c61, 0x0000ff31, 0x0000ff51, - 0x000010ac, 0x00002d0c, 0x00000224, 0x00000225, - 0x0000014c, 0x0000014d, 0x000104d1, 0x000104f9, - 0x00010c84, 0x00010cc4, 0x00000198, 0x00000199, - 0x00002162, 0x00002172, 0x00001f2f, 0x00001f27, - 0x0000049a, 0x0000049b, 0x00000045, 0x00000065, - 0x0000050e, 0x0000050f + 0x00001eba, 0x00001ebb, 0x000024c6, 0x000024e0, + 0x000013ee, 0x0000abbe, 0x0000039c, 0x000003bc, + 0x000004d4, 0x000004d5, 0x000004d6, 0x000004d7, + 0x0000a7aa, 0x00000266, 0x00000528, 0x00000529, + 0x00000397, 0x000003b7, 0x00000150, 0x00000151, + 0x00001f4c, 0x00001f44, 0x0000a7be, 0x0000a7bf, + 0x0000053f, 0x0000056f, 0x0001e90e, 0x0001e930, + 0x0000216e, 0x0000217e, 0x00001eb2, 0x00001eb3, + 0x0000a780, 0x0000a781, 0x00001f1b, 0x00001f13, + 0x000001ae, 0x00000288, 0x000013cc, 0x0000ab9c, + 0x000001a7, 0x000001a8, 0x00001fba, 0x00001f70, + 0x0000a7ad, 0x0000026c, 0x00000412, 0x00000432, + 0x000104b8, 0x000104e0, 0x00001e0c, 0x00001e0d, + 0x00010404, 0x0001042c, 0x0000050e, 0x0000050f, + 0x000013b7, 0x0000ab87, 0x00002160, 0x00002170, + 0x000104b9, 0x000104e1, 0x0000a73a, 0x0000a73b, + 0x00001c96, 0x000010d6, 0x0000042b, 0x0000044b, + 0x0000216a, 0x0000217a, 0x00010ca7, 0x00010ce7, + 0x00001e28, 0x00001e29, 0x000118ba, 0x000118da, + 0x0000040a, 0x0000045a, 0x00010406, 0x0001042e, + 0x0000011a, 0x0000011b, 0x00002ca4, 0x00002ca5, + 0x000004e8, 0x000004e9, 0x000013ec, 0x0000abbc, + 0x00010ca0, 0x00010ce0, 0x00001e6c, 0x00001e6d, + 0x00001e3a, 0x00001e3b, 0x00000510, 0x00000511, + 0x000104c8, 0x000104f0, 0x00000118, 0x00000119, + 0x0000021a, 0x0000021b, 0x00001e20, 0x00001e21, + 0x000001a6, 0x00000280, 0x00001fad, 0x00001fa5, + 0x00002c13, 0x00002c43, 0x00000152, 0x00000153, + 0x00001eac, 0x00001ead, 0x00001c9a, 0x000010da, + 0x000013e0, 0x0000abb0, 0x00000389, 0x000003ae, + 0x0000a7c2, 0x0000a7c3, 0x00001e08, 0x00001e09, + 0x000104bb, 0x000104e3, 0x00000474, 0x00000475, + 0x000104c3, 0x000104eb, 0x000010ac, 0x00002d0c, + 0x00001e88, 0x00001e89, 0x0000a680, 0x0000a681, + 0x0000013d, 0x0000013e, 0x00002cc8, 0x00002cc9, + 0x00010cb1, 0x00010cf1, 0x00001ecc, 0x00001ecd, + 0x0000a740, 0x0000a741, 0x000010b8, 0x00002d18, + 0x0000216f, 0x0000217f, 0x0000012a, 0x0000012b, + 0x00001e7e, 0x00001e7f, 0x0000a688, 0x0000a689, + 0x000004b8, 0x000004b9, 0x00001ee4, 0x00001ee5, + 0x00000506, 0x00000507, 0x00001e3c, 0x00001e3d, + 0x00001ca7, 0x000010e7, 0x0001e90c, 0x0001e92e, + 0x00001f2a, 0x00001f22, 0x0000a792, 0x0000a793, + 0x00010413, 0x0001043b, 0x00002ce0, 0x00002ce1, + 0x00000210, 0x00000211, 0x0000ff37, 0x0000ff57, + 0x000013d7, 0x0000aba7, 0x00000116, 0x00000117, + 0x00001f0d, 0x00001f05, 0x000001d7, 0x000001d8, + 0x000000cb, 0x000000eb, 0x000010a4, 0x00002d04, + 0x00010415, 0x0001043d, 0x00002cd6, 0x00002cd7, + 0x0000054b, 0x0000057b, 0x000013dc, 0x0000abac, + 0x00001f0b, 0x00001f03, 0x0001040e, 0x00010436, + 0x00000498, 0x00000499, 0x0000a750, 0x0000a751, + 0x00000394, 0x000003b4, 0x00002cc6, 0x00002cc7, + 0x00001f4b, 0x00001f43, 0x0000a666, 0x0000a667, + 0x00001ede, 0x00001edf, 0x0000039d, 0x000003bd, + 0x000003f9, 0x000003f2, 0x00001f68, 0x00001f60, + 0x00002c70, 0x00000252, 0x00001c97, 0x000010d7, + 0x00001eda, 0x00001edb, 0x00002c07, 0x00002c37, + 0x000001d3, 0x000001d4, 0x0000a782, 0x0000a783, + 0x000010af, 0x00002d0f, 0x00000395, 0x000003b5, + 0x00001f1a, 0x00001f12, 0x00001f4a, 0x00001f42, + 0x0000041d, 0x0000043d, 0x00000548, 0x00000578, + 0x00001ff8, 0x00001f78, 0x00000243, 0x00000180, + 0x00001fd9, 0x00001fd1, 0x0000a798, 0x0000a799, + 0x00001f9f, 0x00001f97, 0x000013c7, 0x0000ab97, + 0x00010c97, 0x00010cd7, 0x00001e50, 0x00001e51, + 0x0000a744, 0x0000a745, 0x00001c94, 0x000010d4, + 0x0000a74a, 0x0000a74b, 0x00000222, 0x00000223, + 0x000004fe, 0x000004ff, 0x00001f8d, 0x00001f85, + 0x0000a656, 0x0000a657, 0x0000054d, 0x0000057d, + 0x0000ff24, 0x0000ff44, 0x00001f3a, 0x00001f32, + 0x00001cb0, 0x000010f0, 0x0000a686, 0x0000a687, + 0x000004f8, 0x000004f9, 0x00002168, 0x00002178, + 0x00010ca9, 0x00010ce9, 0x00016e43, 0x00016e63, + 0x000001de, 0x000001df, 0x00000102, 0x00000103, + 0x00001f2c, 0x00001f24, 0x000013b3, 0x0000ab83, + 0x000024b7, 0x000024d1, 0x000118ad, 0x000118cd, + 0x000104cd, 0x000104f5, 0x000104c6, 0x000104ee, + 0x0000015a, 0x0000015b, 0x00001fb8, 0x00001fb0, + 0x000118ac, 0x000118cc, 0x000010b1, 0x00002d11, + 0x00002cc0, 0x00002cc1, 0x000000cf, 0x000000ef, + 0x00001e70, 0x00001e71, 0x00002c1e, 0x00002c4e, + 0x00000492, 0x00000493, 0x00002c2e, 0x00002c5e, + 0x000001b8, 0x000001b9, 0x00001e48, 0x00001e49, + 0x00002c1b, 0x00002c4b, 0x000013f4, 0x000013fc, + 0x000118a8, 0x000118c8, 0x00001f09, 0x00001f01, + 0x00001fb9, 0x00001fb1, 0x000024c5, 0x000024df, + 0x000010bf, 0x00002d1f, 0x00002c8a, 0x00002c8b, + 0x000001ea, 0x000001eb, 0x00016e4b, 0x00016e6b, + 0x0000a694, 0x0000a695, 0x0000021c, 0x0000021d, + 0x000013ab, 0x0000ab7b, 0x0001041e, 0x00010446, + 0x000013bc, 0x0000ab8c, 0x00010c99, 0x00010cd9, + 0x0000046a, 0x0000046b, 0x0000020a, 0x0000020b, + 0x0000a662, 0x0000a663, 0x0000004a, 0x0000006a, + 0x000024c2, 0x000024dc, 0x000013a0, 0x0000ab70, + 0x000003a8, 0x000003c8, 0x000004f0, 0x000004f1, + 0x00001faa, 0x00001fa2, 0x00001c9f, 0x000010df, + 0x00000554, 0x00000584, 0x000013cd, 0x0000ab9d, + 0x000001f1, 0x000001f3, 0x0001040d, 0x00010435, + 0x00002cb8, 0x00002cb9, 0x00016e4e, 0x00016e6e, + 0x000013dd, 0x0000abad, 0x000004c1, 0x000004c2, + 0x00010414, 0x0001043c, 0x000024bf, 0x000024d9, + 0x000013e4, 0x0000abb4, 0x0000a766, 0x0000a767, + 0x00002c80, 0x00002c81, 0x00000058, 0x00000078, + 0x00002cce, 0x00002ccf, 0x00000104, 0x00000105, + 0x000010bb, 0x00002d1b, 0x000000c5, 0x000000e5, + 0x0001040c, 0x00010434, 0x0000a65e, 0x0000a65f, + 0x000004f6, 0x000004f7, 0x00001c91, 0x000010d1, + 0x0000ff27, 0x0000ff47, 0x0000004e, 0x0000006e, + 0x0000a732, 0x0000a733, 0x000004aa, 0x000004ab, + 0x000001c8, 0x000001c9, 0x000003fa, 0x000003fb, + 0x00001fa9, 0x00001fa1, 0x00016e5f, 0x00016e7f, + 0x000118aa, 0x000118ca, 0x00010c80, 0x00010cc0, + 0x000104b3, 0x000104db, 0x000000dc, 0x000000fc, + 0x00002cb0, 0x00002cb1, 0x00001f3f, 0x00001f37, + 0x000001b1, 0x0000028a, 0x00000401, 0x00000451, + 0x000013a9, 0x0000ab79, 0x00002c20, 0x00002c50, + 0x000118af, 0x000118cf, 0x0000024c, 0x0000024d, + 0x00000218, 0x00000219, 0x00001f9e, 0x00001f96, + 0x0000a7b0, 0x0000029e, 0x0000052a, 0x0000052b, + 0x00002c2c, 0x00002c5c, 0x00001cbf, 0x000010ff, + 0x000104d3, 0x000104fb, 0x000000db, 0x000000fb, + 0x00001c92, 0x000010d2, 0x000104b2, 0x000104da, + 0x0000216b, 0x0000217b, 0x00010c81, 0x00010cc1, + 0x00016e53, 0x00016e73, 0x0000a664, 0x0000a665, + 0x0000038a, 0x000003af, 0x0000ff22, 0x0000ff42, + 0x000013bf, 0x0000ab8f, 0x00001e7c, 0x00001e7d, + 0x00001ca9, 0x000010e9, 0x00001e64, 0x00001e65, + 0x000010ad, 0x00002d0d, 0x00000174, 0x00000175, + 0x0000a768, 0x0000a769, 0x000104ca, 0x000104f2, + 0x00000197, 0x00000268, 0x0000ff39, 0x0000ff59, + 0x000004e2, 0x000004e3, 0x000118a4, 0x000118c4, + 0x00001f5b, 0x00001f53, 0x0000a66c, 0x0000a66d, + 0x00010ca2, 0x00010ce2, 0x00000160, 0x00000161, + 0x00001cbd, 0x000010fd, 0x00002cb2, 0x00002cb3, + 0x0000040f, 0x0000045f, 0x00002c06, 0x00002c36, + 0x000013e1, 0x0000abb1, 0x00001f0f, 0x00001f07, + 0x00002c1c, 0x00002c4c, 0x00001e9e, 0x000000df, + 0x0000019f, 0x00000275, 0x00001f0e, 0x00001f06, + 0x00001eb0, 0x00001eb1, 0x00002c28, 0x00002c58, + 0x0000042a, 0x0000044a, 0x000013a3, 0x0000ab73, + 0x000104b4, 0x000104dc, 0x00000508, 0x00000509, + 0x00002cb6, 0x00002cb7, 0x000013a2, 0x0000ab72, + 0x00016e48, 0x00016e68, 0x00000126, 0x00000127, + 0x00001eae, 0x00001eaf, 0x00002c02, 0x00002c32, + 0x000013da, 0x0000abaa, 0x0000024e, 0x0000024f, + 0x00002c27, 0x00002c57, 0x00001e40, 0x00001e41, + 0x0000a742, 0x0000a743, 0x00010c86, 0x00010cc6, + 0x000000c3, 0x000000e3, 0x00001fcc, 0x00001fc3, + 0x00000053, 0x00000073, 0x000024bc, 0x000024d6, + 0x00002c09, 0x00002c39, 0x00001f2e, 0x00001f26, + 0x00010c9b, 0x00010cdb, 0x00001ec8, 0x00001ec9, + 0x00002c22, 0x00002c52, 0x00001f9b, 0x00001f93, + 0x0000020c, 0x0000020d, 0x000004e0, 0x000004e1, + 0x0000017b, 0x0000017c, 0x00002c18, 0x00002c48, + 0x000118bc, 0x000118dc, 0x00001efc, 0x00001efd, + 0x00002c6b, 0x00002c6c, 0x00001ec4, 0x00001ec5, + 0x000024bd, 0x000024d7, 0x000013de, 0x0000abae, + 0x00000398, 0x000003b8, 0x0000a74c, 0x0000a74d, + 0x00010422, 0x0001044a, 0x00002cda, 0x00002cdb, + 0x000004b4, 0x000004b5, 0x000003a0, 0x000003c0, + 0x000001e4, 0x000001e5, 0x00001f48, 0x00001f40, + 0x00000413, 0x00000433, 0x00002161, 0x00002171, + 0x0000038e, 0x000003cd, 0x00010c8c, 0x00010ccc, + 0x00000046, 0x00000066, 0x0000a7a8, 0x0000a7a9, + 0x00000543, 0x00000573, 0x00001ff9, 0x00001f79, + 0x0001e902, 0x0001e924, 0x00010409, 0x00010431, + 0x0000040b, 0x0000045b, 0x000104c7, 0x000104ef, + 0x0000041c, 0x0000043c, 0x0001e905, 0x0001e927, + 0x00010c96, 0x00010cd6, 0x0000a7ba, 0x0000a7bb, + 0x000000c1, 0x000000e1, 0x000003a3, 0x000003c3, + 0x000013db, 0x0000abab, 0x0000021e, 0x0000021f, + 0x0000023b, 0x0000023c, 0x00000546, 0x00000576, + 0x000013b5, 0x0000ab85, 0x000104d2, 0x000104fa, + 0x00002c84, 0x00002c85, 0x00001caf, 0x000010ef, + 0x00000533, 0x00000563, 0x0000010e, 0x0000010f, + 0x0000212a, 0x0000006b, 0x00001e22, 0x00001e23, + 0x00002c67, 0x00002c68, 0x0000a684, 0x0000a685, + 0x000013f3, 0x000013fb, 0x000010b4, 0x00002d14, + 0x0000015c, 0x0000015d, 0x0000a796, 0x0000a797, + 0x0000050c, 0x0000050d, 0x00000393, 0x000003b3, + 0x000013cf, 0x0000ab9f, 0x00001fe9, 0x00001fe1, + 0x000013df, 0x0000abaf, 0x000118a7, 0x000118c7, + 0x00002cc4, 0x00002cc5, 0x000000d9, 0x000000f9, + 0x0000048e, 0x0000048f, 0x00001e38, 0x00001e39, + 0x000010b5, 0x00002d15, 0x000001a2, 0x000001a3, + 0x000104ce, 0x000104f6, 0x000010aa, 0x00002d0a, + 0x0000a7bc, 0x0000a7bd, 0x00001e60, 0x00001e61, + 0x000004a0, 0x000004a1, 0x00002165, 0x00002175, + 0x000104b0, 0x000104d8, 0x00001e24, 0x00001e25, + 0x00001c98, 0x000010d8, 0x000013f2, 0x000013fa, + 0x00016e54, 0x00016e74, 0x00001e2e, 0x00001e2f, + 0x00001e44, 0x00001e45, 0x000024c8, 0x000024e2, + 0x000001af, 0x000001b0, 0x00010cae, 0x00010cee, + 0x00000196, 0x00000269, 0x00001eb6, 0x00001eb7, + 0x00001cac, 0x000010ec, 0x000013f1, 0x000013f9, + 0x000104b6, 0x000104de, 0x000010a8, 0x00002d08, + 0x00001eca, 0x00001ecb, 0x00002c26, 0x00002c56, + 0x00000466, 0x00000467, 0x0000ff26, 0x0000ff46, + 0x000013b1, 0x0000ab81, 0x0000a668, 0x0000a669, + 0x0000a698, 0x0000a699, 0x00000516, 0x00000517, + 0x00001e74, 0x00001e75, 0x00002c0f, 0x00002c3f, + 0x000104cb, 0x000104f3, 0x00002c14, 0x00002c44, + 0x0000047c, 0x0000047d, 0x00010c9f, 0x00010cdf, + 0x000001ac, 0x000001ad, 0x00010411, 0x00010439, + 0x00002cde, 0x00002cdf, 0x000013f5, 0x000013fd, + 0x000003da, 0x000003db, 0x00000204, 0x00000205, + 0x00010419, 0x00010441, 0x00002c62, 0x0000026b, + 0x000001a0, 0x000001a1, 0x0000019d, 0x00000272, + 0x00000043, 0x00000063, 0x00010407, 0x0001042f, + 0x00002cd0, 0x00002cd1, 0x000118ae, 0x000118ce, + 0x00010c9a, 0x00010cda, 0x000001ec, 0x000001ed, + 0x0001041b, 0x00010443, 0x00016e52, 0x00016e72, + 0x00001ee6, 0x00001ee7, 0x000013e7, 0x0000abb7, + 0x00000244, 0x00000289, 0x000013b4, 0x0000ab84, + 0x00000419, 0x00000439, 0x00000524, 0x00000525, + 0x000001d5, 0x000001d6, 0x000003a5, 0x000003c5, + 0x000001bc, 0x000001bd, 0x00001e82, 0x00001e83, + 0x00000531, 0x00000561, 0x00000386, 0x000003ac, + 0x00002cbc, 0x00002cbd, 0x00000052, 0x00000072, + 0x0000a7a6, 0x0000a7a7, 0x00000545, 0x00000575, + 0x00002c04, 0x00002c34, 0x0001e91a, 0x0001e93c, + 0x000004c3, 0x000004c4, 0x0000a75e, 0x0000a75f, + 0x00000114, 0x00000115, 0x000013e9, 0x0000abb9, + 0x0000a754, 0x0000a755, 0x000010a7, 0x00002d07, + 0x00001e90, 0x00001e91, 0x00001e62, 0x00001e63, + 0x000001c7, 0x000001c9, 0x000013e5, 0x0000abb5, + 0x00001e02, 0x00001e03, 0x00002c90, 0x00002c91, + 0x000118a1, 0x000118c1, 0x00001f3b, 0x00001f33, + 0x000003aa, 0x000003ca, 0x000000d6, 0x000000f6, + 0x0000a79e, 0x0000a79f, 0x00001ef4, 0x00001ef5, + 0x00002c82, 0x00002c83, 0x000000c2, 0x000000e2, + 0x00000130, 0x02000142, 0x000001b3, 0x000001b4, + 0x00002c1a, 0x00002c4a, 0x000013a6, 0x0000ab76, + 0x000118a6, 0x000118c6, 0x000010a9, 0x00002d09, + 0x00016e49, 0x00016e69, 0x00010c98, 0x00010cd8, + 0x00001e12, 0x00001e13, 0x00002c0d, 0x00002c3d, + 0x00002c2a, 0x00002c5a, 0x00002c63, 0x00001d7d, + 0x00000544, 0x00000574, 0x0000014e, 0x0000014f, + 0x000003ab, 0x000003cb, 0x00010c83, 0x00010cc3, + 0x00002c23, 0x00002c53, 0x00001e14, 0x00001e15, + 0x000013ea, 0x0000abba, 0x0000ff29, 0x0000ff49, + 0x000010a2, 0x00002d02, 0x00001c95, 0x000010d5, + 0x00001fc9, 0x00001f73, 0x0000a658, 0x0000a659, + 0x00002164, 0x00002174, 0x00002c6e, 0x00000271, + 0x00010418, 0x00010440, 0x00002c60, 0x00002c61, + 0x00001f6e, 0x00001f66, 0x0000a66a, 0x0000a66b, + 0x00001f9d, 0x00001f95, 0x00001e56, 0x00001e57, + 0x0000a75a, 0x0000a75b, 0x0000a64e, 0x0000a64f, + 0x0000010c, 0x0000010d, 0x00001fec, 0x00001fe5, + 0x00001eb8, 0x00001eb9, 0x0000a648, 0x0000a649, + 0x000013e8, 0x0000abb8, 0x00000190, 0x0000025b, + 0x0000a7f5, 0x0000a7f6, 0x00001cad, 0x000010ed, + 0x0000a64a, 0x0000a64b, 0x000104c9, 0x000104f1, + 0x00000415, 0x00000435, 0x000010b9, 0x00002d19, + 0x00001e1a, 0x00001e1b, 0x000024c0, 0x000024da, + 0x00010c95, 0x00010cd5, 0x000003ff, 0x0000037d, + 0x0000015e, 0x0000015f, 0x000004ea, 0x000004eb, + 0x00000417, 0x00000437, 0x000004ec, 0x000004ed, + 0x00000504, 0x00000505, 0x000001f7, 0x000001bf, + 0x00001e8a, 0x00001e8b, 0x000024b6, 0x000024d0, + 0x00000478, 0x00000479, 0x000013ac, 0x0000ab7c, + 0x00000158, 0x00000159, 0x000003e6, 0x000003e7, + 0x00002c94, 0x00002c95, 0x00001e66, 0x00001e67, + 0x00001e06, 0x00001e07, 0x00002c64, 0x0000027d, + 0x00000056, 0x00000076, 0x00002cba, 0x00002cbb, + 0x0000052c, 0x0000052d, 0x00001fae, 0x00001fa6, + 0x00010cb0, 0x00010cf0, 0x00001ea8, 0x00001ea9, + 0x00002c1d, 0x00002c4d, 0x00001e72, 0x00001e73, + 0x00002c03, 0x00002c33, 0x000000d1, 0x000000f1, + 0x00000048, 0x00000068, 0x00002cd4, 0x00002cd5, + 0x00001e1c, 0x00001e1d, 0x00001f1c, 0x00001f14, + 0x000000c6, 0x000000e6, 0x00010403, 0x0001042b, + 0x000024c9, 0x000024e3, 0x000004d2, 0x000004d3, + 0x00000392, 0x000003b2, 0x00000212, 0x00000213, + 0x0000ff23, 0x0000ff43, 0x00000216, 0x00000217, + 0x00016e50, 0x00016e70, 0x000003a6, 0x000003c6, + 0x000013a5, 0x0000ab75, 0x00001e52, 0x00001e53, + 0x00001c93, 0x000010d3, 0x000118a9, 0x000118c9, + 0x00002c0b, 0x00002c3b, 0x000001d1, 0x000001d2, + 0x0000048c, 0x0000048d, 0x0000a7a2, 0x0000a7a3, + 0x0000a734, 0x0000a735, 0x00000041, 0x00000061, + 0x00000206, 0x00000207, 0x00001ed8, 0x00001ed9, + 0x00016e47, 0x00016e67, 0x0000014a, 0x0000014b, + 0x00000416, 0x00000436, 0x00002c8e, 0x00002c8f, + 0x00010ca6, 0x00010ce6, 0x000004de, 0x000004df, + 0x00000402, 0x00000452, 0x00000470, 0x00000471, + 0x00002c6d, 0x00000251, 0x00000189, 0x00000256, + 0x00002126, 0x000003c9, 0x00001ca3, 0x000010e3, + 0x000003e8, 0x000003e9, 0x0000a7c9, 0x0000a7ca, + 0x00000156, 0x00000157, 0x00001e4a, 0x00001e4b, + 0x00000405, 0x00000455, 0x0001e90b, 0x0001e92d, + 0x0000ff33, 0x0000ff53, 0x000000da, 0x000000fa, + 0x00002c05, 0x00002c35, 0x00002c8c, 0x00002c8d, + 0x00000550, 0x00000580, 0x0000048a, 0x0000048b, + 0x00010425, 0x0001044d, 0x00001ebe, 0x00001ebf, + 0x0000a68e, 0x0000a68f, 0x000013e2, 0x0000abb2, + 0x00010ca4, 0x00010ce4, 0x00010caf, 0x00010cef, + 0x0000a7a4, 0x0000a7a5, 0x00002c12, 0x00002c42, + 0x000013a4, 0x0000ab74, 0x0000038f, 0x000003ce, + 0x000003f7, 0x000003f8, 0x0001e91f, 0x0001e941, + 0x000024c4, 0x000024de, 0x00000428, 0x00000448, + 0x00000226, 0x00000227, 0x00001f9a, 0x00001f92, + 0x00001ed6, 0x00001ed7, 0x00002c0e, 0x00002c3e, + 0x00000108, 0x00000109, 0x00000214, 0x00000215, + 0x00001fd8, 0x00001fd0, 0x00010427, 0x0001044f, + 0x00001ca2, 0x000010e2, 0x00002c7f, 0x00000240, + 0x00010c9e, 0x00010cde, 0x000010a6, 0x00002d06, + 0x00001e3e, 0x00001e3f, 0x00000220, 0x0000019e, + 0x00001c99, 0x000010d9, 0x0000ff32, 0x0000ff52, + 0x00000112, 0x00000113, 0x0000ff25, 0x0000ff45, + 0x0000a692, 0x0000a693, 0x00001f29, 0x00001f21, + 0x00001cb8, 0x000010f8, 0x00000172, 0x00000173, + 0x00016e58, 0x00016e78, 0x00002c9e, 0x00002c9f, + 0x00000480, 0x00000481, 0x00000372, 0x00000373, + 0x00002c6f, 0x00000250, 0x0000022e, 0x0000022f, + 0x00000045, 0x00000065, 0x000118b6, 0x000118d6, + 0x0000ff2f, 0x0000ff4f, 0x000001fa, 0x000001fb, + 0x000004d8, 0x000004d9, 0x00002cca, 0x00002ccb, + 0x00000464, 0x00000465, 0x00000396, 0x000003b6, + 0x00010c8a, 0x00010cca, 0x00001f4d, 0x00001f45, + 0x00000421, 0x00000441, 0x000010ae, 0x00002d0e, + 0x00010424, 0x0001044c, 0x000001fc, 0x000001fd, + 0x00001e18, 0x00001e19, 0x00016e4d, 0x00016e6d, + 0x00000411, 0x00000431, 0x00000388, 0x000003ad, + 0x00000518, 0x00000519, 0x00002c11, 0x00002c41, + 0x0000054f, 0x0000057f, 0x000003cf, 0x000003d7, + 0x0000039f, 0x000003bf, 0x00000400, 0x00000450, + 0x0001040a, 0x00010432, 0x0000a73c, 0x0000a73d, + 0x00000552, 0x00000582, 0x0000ff21, 0x0000ff41, + 0x000004c5, 0x000004c6, 0x00001f98, 0x00001f90, + 0x0000a7b8, 0x0000a7b9, 0x0000053b, 0x0000056b, + 0x000000c8, 0x000000e8, 0x00010c87, 0x00010cc7, + 0x00001f3e, 0x00001f36, 0x0000a660, 0x0000a661, + 0x000118b7, 0x000118d7, 0x0000042d, 0x0000044d, + 0x00000232, 0x00000233, 0x0001e921, 0x0001e943, + 0x00001f19, 0x00001f11, 0x00016e41, 0x00016e61, + 0x0000039b, 0x000003bb, 0x0000ff34, 0x0000ff54, + 0x00001fca, 0x00001f74, 0x000013af, 0x0000ab7f, + 0x000118b9, 0x000118d9, 0x000104bf, 0x000104e7, + 0x00000241, 0x00000242, 0x00001e0a, 0x00001e0b, + 0x00016e55, 0x00016e75, 0x000118b2, 0x000118d2, + 0x000004c9, 0x000004ca, 0x0000013f, 0x00000140, + 0x000010c7, 0x00002d27, 0x000024cf, 0x000024e9, + 0x0000054a, 0x0000057a, 0x00000370, 0x00000371, + 0x000013a1, 0x0000ab71, 0x00000120, 0x00000121, + 0x00016e5b, 0x00016e7b, 0x00016e42, 0x00016e62, + 0x0000041a, 0x0000043a, 0x0000ff2a, 0x0000ff4a, + 0x00001ca1, 0x000010e1, 0x00001f6a, 0x00001f62, + 0x00001eec, 0x00001eed, 0x000003e2, 0x000003e3, + 0x00016e5e, 0x00016e7e, 0x00001efe, 0x00001eff, + 0x0000022c, 0x0000022d, 0x0000a7b3, 0x0000ab53, + 0x0000a74e, 0x0000a74f, 0x00001e6a, 0x00001e6b, + 0x00001eb4, 0x00001eb5, 0x000004f4, 0x000004f5, + 0x000024b8, 0x000024d2, 0x0000216d, 0x0000217d, + 0x00010c94, 0x00010cd4, 0x00001ed4, 0x00001ed5, + 0x0001e91d, 0x0001e93f, 0x0000a65c, 0x0000a65d, + 0x00000426, 0x00000446, 0x00001e78, 0x00001e79, + 0x000004c7, 0x000004c8, 0x00001ec2, 0x00001ec3, + 0x0000a646, 0x0000a647, 0x0000042f, 0x0000044f, + 0x00001f6f, 0x00001f67, 0x000003fe, 0x0000037c, + 0x00000059, 0x00000079, 0x00001f3d, 0x00001f35, + 0x000013e6, 0x0000abb6, 0x00000208, 0x00000209, + 0x00000170, 0x00000171, 0x00002c17, 0x00002c47, + 0x00001ca5, 0x000010e5, 0x00000427, 0x00000447, + 0x0000ff2c, 0x0000ff4c, 0x00001ca0, 0x000010e0, + 0x0001040f, 0x00010437, 0x0000a68a, 0x0000a68b, + 0x000004b2, 0x000004b3, 0x0000ff35, 0x0000ff55, + 0x000004be, 0x000004bf, 0x00001ece, 0x00001ecf, + 0x00000406, 0x00000456, 0x00000110, 0x00000111, + 0x0000a7c7, 0x0000a7c8, 0x000010ba, 0x00002d1a, + 0x00010401, 0x00010429, 0x000024ba, 0x000024d4, + 0x0000053a, 0x0000056a, 0x0000ff2d, 0x0000ff4d, + 0x000001f4, 0x000001f5, 0x000013bb, 0x0000ab8b, + 0x000000d5, 0x000000f5, 0x00001ffc, 0x00001ff3, + 0x00000186, 0x00000254, 0x000004da, 0x000004db, + 0x00000403, 0x00000453, 0x00002c00, 0x00002c30, + 0x0000053c, 0x0000056c, 0x000013c9, 0x0000ab99, + 0x00010ca5, 0x00010ce5, 0x000104b1, 0x000104d9, + 0x0001e920, 0x0001e942, 0x00000537, 0x00000567, + 0x0000a75c, 0x0000a75d, 0x00001fcb, 0x00001f75, + 0x000000de, 0x000000fe, 0x0000a7a0, 0x0000a7a1, + 0x00001c9b, 0x000010db, 0x00000147, 0x00000148, + 0x000013ca, 0x0000ab9a, 0x00000182, 0x00000183, + 0x000013d9, 0x0000aba9, 0x00001c9c, 0x000010dc, + 0x0000011c, 0x0000011d, 0x000013b9, 0x0000ab89, + 0x00001f38, 0x00001f30, 0x00000408, 0x00000458, + 0x00000539, 0x00000569, 0x000010c3, 0x00002d23, + 0x00001fac, 0x00001fa4, 0x00000132, 0x00000133, + 0x0000a724, 0x0000a725, 0x000118b1, 0x000118d1, + 0x000001cb, 0x000001cc, 0x000013d1, 0x0000aba1, + 0x00001feb, 0x00001f7b, 0x00001e36, 0x00001e37, + 0x000118b8, 0x000118d8, 0x00000399, 0x000003b9, + 0x000118a0, 0x000118c0, 0x00001fc8, 0x00001f72, + 0x00000181, 0x00000253, 0x00000500, 0x00000501, + 0x00001f8b, 0x00001f83, 0x00002c75, 0x00002c76, + 0x000001e2, 0x000001e3, 0x0001e919, 0x0001e93b, + 0x000104c1, 0x000104e9, 0x0001e914, 0x0001e936, + 0x0000024a, 0x0000024b, 0x00000555, 0x00000585, + 0x00002c21, 0x00002c51, 0x000024ca, 0x000024e4, + 0x00001e5e, 0x00001e5f, 0x000003a7, 0x000003c7, + 0x00001f8c, 0x00001f84, 0x00001ea6, 0x00001ea7, + 0x00001cab, 0x000010eb, 0x000013b6, 0x0000ab86, + 0x00002183, 0x00002184, 0x00001cb1, 0x000010f1, + 0x00016e57, 0x00016e77, 0x000010cd, 0x00002d2d, + 0x00000468, 0x00000469, 0x00001cbe, 0x000010fe, + 0x00001fa8, 0x00001fa0, 0x00010412, 0x0001043a, + 0x000118be, 0x000118de, 0x00001e1e, 0x00001e1f, + 0x000000cd, 0x000000ed, 0x000104cf, 0x000104f7, + 0x0001e909, 0x0001e92b, 0x0000a76c, 0x0000a76d, + 0x0000a760, 0x0000a761, 0x00000049, 0x00000069, + 0x000010a5, 0x00002d05, 0x0000a784, 0x0000a785, + 0x0000a682, 0x0000a683, 0x000104c0, 0x000104e8, + 0x00002c2d, 0x00002c5d, 0x00000168, 0x00000169, + 0x000013e3, 0x0000abb3, 0x000118a2, 0x000118c2, + 0x00002c69, 0x00002c6a, 0x00001f69, 0x00001f61, + 0x00000128, 0x00000129, 0x00002ca2, 0x00002ca3, + 0x000024be, 0x000024d8, 0x000004b0, 0x000004b1, + 0x000013ad, 0x0000ab7d, 0x0000016e, 0x0000016f, + 0x00000051, 0x00000071, 0x00000230, 0x00000231, + 0x00000472, 0x00000473, 0x0000a652, 0x0000a653, + 0x000010c4, 0x00002d24, 0x0001e915, 0x0001e937, + 0x00002ccc, 0x00002ccd, 0x000118b4, 0x000118d4, + 0x000104d1, 0x000104f9, 0x00002c7e, 0x0000023f, + 0x00001ec6, 0x00001ec7, 0x00002c0c, 0x00002c3c, + 0x000013d2, 0x0000aba2, 0x00002c88, 0x00002c89, + 0x00000460, 0x00000461, 0x00010c88, 0x00010cc8, + 0x00001cb4, 0x000010f4, 0x00000534, 0x00000564, + 0x0000a790, 0x0000a791, 0x00010c85, 0x00010cc5, + 0x000004e6, 0x000004e7, 0x00002c16, 0x00002c46, + 0x0000053d, 0x0000056d, 0x0000019c, 0x0000026f, + 0x0000018e, 0x000001dd, 0x000000ce, 0x000000ee, + 0x0000a764, 0x0000a765, 0x00002c19, 0x00002c49, + 0x0001e91e, 0x0001e940, 0x00002c98, 0x00002c99, + 0x0000051c, 0x0000051d, 0x000024c3, 0x000024dd, + 0x00000535, 0x00000565, 0x0000041e, 0x0000043e, + 0x000104c4, 0x000104ec, 0x00010cad, 0x00010ced, + 0x00016e4f, 0x00016e6f, 0x0000a76e, 0x0000a76f, + 0x000003e0, 0x000003e1, 0x000001fe, 0x000001ff, + 0x0000051a, 0x0000051b, 0x00002c10, 0x00002c40, + 0x00000512, 0x00000513, 0x00000422, 0x00000442, + 0x000003fd, 0x0000037b, 0x00001f8e, 0x00001f86, + 0x00001e34, 0x00001e35, 0x0000014c, 0x0000014d, + 0x000013b8, 0x0000ab88, 0x00000122, 0x00000123, + 0x00001f59, 0x00001f51, 0x000013c4, 0x0000ab94, + 0x0000a696, 0x0000a697, 0x000001db, 0x000001dc, + 0x00010c93, 0x00010cd3, 0x000000d8, 0x000000f8, + 0x00001fbb, 0x00001f71, 0x000118b0, 0x000118d0, + 0x000013c3, 0x0000ab93, 0x0000ff31, 0x0000ff51, + 0x000001a4, 0x000001a5, 0x00002c01, 0x00002c31, + 0x00001ee2, 0x00001ee3, 0x00010420, 0x00010448, + 0x000104c5, 0x000104ed, 0x000001cd, 0x000001ce, + 0x0001e91b, 0x0001e93d, 0x000118bf, 0x000118df, + 0x00016e5a, 0x00016e7a, 0x00002ca6, 0x00002ca7, + 0x0000022a, 0x0000022b, 0x000003a9, 0x000003c9, + 0x00002c72, 0x00002c73, 0x00000139, 0x0000013a, + 0x00000246, 0x00000247, 0x0000041f, 0x0000043f, + 0x00016e5d, 0x00016e7d, 0x00000549, 0x00000579, + 0x00000424, 0x00000444, 0x00000106, 0x00000107, + 0x00001fe8, 0x00001fe0, 0x00001efa, 0x00001efb, + 0x000024c7, 0x000024e1, 0x000013ce, 0x0000ab9e, + 0x00016e44, 0x00016e64, 0x00001f99, 0x00001f91, + 0x0000a756, 0x0000a757, 0x0000040d, 0x0000045d, + 0x0000040e, 0x0000045e, 0x00016e4a, 0x00016e6a, + 0x000010b2, 0x00002d12, 0x0000018a, 0x00000257, + 0x00002cae, 0x00002caf, 0x00000502, 0x00000503, + 0x00010c9d, 0x00010cdd, 0x00001fdb, 0x00001f77, + 0x0000a7c5, 0x00000282, 0x0000a69a, 0x0000a69b, + 0x000004a8, 0x000004a9, 0x000010a3, 0x00002d03, + 0x00010ca8, 0x00010ce8, 0x00001e2c, 0x00001e2d, + 0x00001ca8, 0x000010e8, 0x00000540, 0x00000570, + 0x0000ff30, 0x0000ff50, 0x000000c9, 0x000000e9, + 0x00001e80, 0x00001e81, 0x0000a68c, 0x0000a68d, + 0x000004ae, 0x000004af, 0x0000ff38, 0x0000ff58, + 0x000013c2, 0x0000ab92, 0x00010416, 0x0001043e, + 0x00010402, 0x0001042a, 0x00001ef0, 0x00001ef1, + 0x00001e16, 0x00001e17, 0x0000a642, 0x0000a643, + 0x00001cb5, 0x000010f5, 0x00001e6e, 0x00001e6f, + 0x000118bb, 0x000118db, 0x0000ff3a, 0x0000ff5a, + 0x000001f8, 0x000001f9, 0x000104cc, 0x000104f4, + 0x0000a644, 0x0000a645, 0x000013d4, 0x0000aba4, + 0x000004cd, 0x000004ce, 0x00000200, 0x00000201, + 0x00000044, 0x00000064, 0x0000a779, 0x0000a77a, + 0x00001f5f, 0x00001f57, 0x000003d8, 0x000003d9, + 0x000001ee, 0x000001ef, 0x00010408, 0x00010430, + 0x000004dc, 0x000004dd, 0x000004d0, 0x000004d1, + 0x000013b0, 0x0000ab80, 0x00002c0a, 0x00002c3a, + 0x000001c4, 0x000001c6, 0x0000a79c, 0x0000a79d, + 0x000010b6, 0x00002d16, 0x000013eb, 0x0000abbb, + 0x000000cc, 0x000000ec, 0x00001ec0, 0x00001ec1, + 0x0000a64c, 0x0000a64d, 0x00001e10, 0x00001e11, + 0x000004cb, 0x000004cc, 0x000010be, 0x00002d1e, + 0x000104b7, 0x000104df, 0x0000a79a, 0x0000a79b, + 0x0000053e, 0x0000056e, 0x0000ff2b, 0x0000ff4b, + 0x0000a78b, 0x0000a78c, 0x00000514, 0x00000515, + 0x00002c9a, 0x00002c9b, 0x000118b5, 0x000118d5, + 0x0000046e, 0x0000046f, 0x0000013b, 0x0000013c, + 0x00001f8a, 0x00001f82, 0x00001e32, 0x00001e33, + 0x000118bd, 0x000118dd, 0x0000039e, 0x000003be, + 0x000001b7, 0x00000292, 0x0001e900, 0x0001e922, + 0x00002cd8, 0x00002cd9, 0x000118ab, 0x000118cb, + 0x000013a8, 0x0000ab78, 0x000013c8, 0x0000ab98, + 0x0000018b, 0x0000018c, 0x00001e4e, 0x00001e4f, + 0x00001edc, 0x00001edd, 0x000004e4, 0x000004e5, + 0x00000224, 0x00000225, 0x00010421, 0x00010449, + 0x0000a72c, 0x0000a72d, 0x000024cb, 0x000024e5, + 0x000001a9, 0x00000283, 0x00002c29, 0x00002c59, + 0x0000012e, 0x0000012f, 0x0000004d, 0x0000006d, + 0x00001cae, 0x000010ee, 0x0000042e, 0x0000044e, + 0x0000ff28, 0x0000ff48, 0x00000042, 0x00000062, + 0x0001e91c, 0x0001e93e, 0x000004fc, 0x000004fd, + 0x00001ef8, 0x00001ef9, 0x0000a72e, 0x0000a72f, + 0x00000162, 0x00000163, 0x0000049a, 0x0000049b, + 0x00001ca4, 0x000010e4, 0x000013d8, 0x0000aba8, + 0x00016e40, 0x00016e60, 0x00010423, 0x0001044b, + 0x0000a7b6, 0x0000a7b7, 0x000024bb, 0x000024d5, + 0x00010c89, 0x00010cc9, 0x000003f4, 0x000003b8, + 0x00000136, 0x00000137, 0x0001e913, 0x0001e935, + 0x00001faf, 0x00001fa7, 0x00000420, 0x00000440, + 0x000000c7, 0x000000e7, 0x00010c9c, 0x00010cdc, + 0x0001041a, 0x00010442, 0x00001eea, 0x00001eeb, + 0x00000423, 0x00000443, 0x00002cc2, 0x00002cc3, + 0x0000050a, 0x0000050b, 0x0001040b, 0x00010433, + 0x000013ba, 0x0000ab8a, 0x000013ef, 0x0000abbf, + 0x0000216c, 0x0000217c, 0x00002c9c, 0x00002c9d, + 0x00001ee8, 0x00001ee9, 0x00000245, 0x0000028c, + 0x000004c0, 0x000004cf, 0x00001f6d, 0x00001f65, + 0x00002ceb, 0x00002cec, 0x00001e04, 0x00001e05, + 0x0000a72a, 0x0000a72b, 0x0001e912, 0x0001e934, + 0x0001e907, 0x0001e929, 0x00000166, 0x00000167, + 0x00002caa, 0x00002cab, 0x00002cac, 0x00002cad, + 0x00002169, 0x00002179, 0x00002c25, 0x00002c55, + 0x00001ee0, 0x00001ee1, 0x0000004c, 0x0000006c, + 0x00001fab, 0x00001fa3, 0x00000538, 0x00000568, + 0x0000037f, 0x000003f3, 0x000000c4, 0x000000e4, + 0x00002ced, 0x00002cee, 0x000024b9, 0x000024d3, + 0x000013f0, 0x000013f8, 0x00000553, 0x00000583, + 0x0000a654, 0x0000a655, 0x00001f88, 0x00001f80, + 0x0000a728, 0x0000a729, 0x0000052e, 0x0000052f, + 0x00000391, 0x000003b1, 0x000001e6, 0x000001e7, + 0x00010410, 0x00010438, 0x0000212b, 0x000000e5, + 0x0000047a, 0x0000047b, 0x0001e90a, 0x0001e92c, + 0x00010c8d, 0x00010ccd, 0x00010cab, 0x00010ceb, + 0x000013c5, 0x0000ab95, 0x0000040c, 0x0000045c, + 0x0001e906, 0x0001e928, 0x000010bd, 0x00002d1d, + 0x00001f9c, 0x00001f94, 0x0001e90f, 0x0001e931, + 0x00000145, 0x00000146, 0x000001cf, 0x000001d0, + 0x0000a736, 0x0000a737, 0x000000d4, 0x000000f4, + 0x0000a76a, 0x0000a76b, 0x0000a650, 0x0000a651, + 0x000003dc, 0x000003dd, 0x000104be, 0x000104e6, + 0x00010ca3, 0x00010ce3, 0x00002cf2, 0x00002cf3, + 0x00001ca6, 0x000010e6, 0x00010c92, 0x00010cd2, + 0x000013cb, 0x0000ab9b, 0x0000023d, 0x0000019a, + 0x0000a7ab, 0x0000025c, 0x00001cb3, 0x000010f3, + 0x000004ba, 0x000004bb, 0x0000ff36, 0x0000ff56, + 0x00010c8b, 0x00010ccb, 0x000000c0, 0x000000e0, + 0x000118a3, 0x000118c3, 0x00001ea0, 0x00001ea1, + 0x00010c82, 0x00010cc2, 0x00000154, 0x00000155, + 0x00001e00, 0x00001e01, 0x00000522, 0x00000523, + 0x00000194, 0x00000263, 0x00000228, 0x00000229, + 0x00000520, 0x00000521, 0x00001f5d, 0x00001f55, + 0x00001c9e, 0x000010de, 0x00010cb2, 0x00010cf2, + 0x00010caa, 0x00010cea, 0x0000016c, 0x0000016d, + 0x00001e94, 0x00001e95, 0x00000141, 0x00000142, + 0x000013d3, 0x0000aba3, 0x00000248, 0x00000249, + 0x000000d0, 0x000000f0, 0x0000a7b4, 0x0000a7b5, + 0x00001eee, 0x00001eef, 0x000004a2, 0x000004a3, + 0x0000041b, 0x0000043b, 0x0001e910, 0x0001e932, + 0x00001e26, 0x00001e27, 0x00001cb6, 0x000010f6, + 0x000013d6, 0x0000aba6, 0x000003ec, 0x000003ed, + 0x0001e918, 0x0001e93a, 0x00001e4c, 0x00001e4d, + 0x0000a73e, 0x0000a73f, 0x00000476, 0x00000477, + 0x0000017d, 0x0000017e, 0x000104d0, 0x000104f8, + 0x000013c0, 0x0000ab90, 0x00000407, 0x00000457, + 0x00002163, 0x00002173, 0x000003ee, 0x000003ef, + 0x0000a752, 0x0000a753, 0x00000551, 0x00000581, + 0x00000376, 0x00000377, 0x000001ca, 0x000001cc, + 0x000003ea, 0x000003eb, 0x00001f2b, 0x00001f23, + 0x00001e8c, 0x00001e8d, 0x00002ce2, 0x00002ce3, + 0x00002c2b, 0x00002c5b, 0x000001d9, 0x000001da, + 0x0000020e, 0x0000020f, 0x00000057, 0x00000077, + 0x0000a78d, 0x00000265, 0x00016e46, 0x00016e66, + 0x000003a4, 0x000003c4, 0x0001e916, 0x0001e938, + 0x00000050, 0x00000070, 0x0000a722, 0x0000a723, + 0x000004a6, 0x000004a7, 0x0000a762, 0x0000a763, + 0x000013bd, 0x0000ab8d, 0x00001e68, 0x00001e69, + 0x0000a7c6, 0x00001d8e, 0x0001e908, 0x0001e92a, + 0x0000038c, 0x000003cc, 0x00001ffb, 0x00001f7d, + 0x000004bc, 0x000004bd, 0x00000547, 0x00000577, + 0x00000494, 0x00000495, 0x000003e4, 0x000003e5, + 0x00001cba, 0x000010fa, 0x00001ebc, 0x00001ebd, + 0x000024c1, 0x000024db, 0x00000409, 0x00000459, + 0x000003a1, 0x000003c1, 0x00002c15, 0x00002c45, + 0x00002c86, 0x00002c87, 0x00016e51, 0x00016e71, + 0x00000526, 0x00000527, 0x00000193, 0x00000260, + 0x000001f2, 0x000001f3, 0x000000ca, 0x000000ea, + 0x000010b3, 0x00002d13, 0x00000198, 0x00000199, + 0x00002c08, 0x00002c38, 0x000010c1, 0x00002d21, + 0x00001e7a, 0x00001e7b, 0x00001cb2, 0x000010f2, + 0x0000a65a, 0x0000a65b, 0x000013aa, 0x0000ab7a, + 0x00010c90, 0x00010cd0, 0x00001f3c, 0x00001f34, + 0x00002ca8, 0x00002ca9, 0x00001c9d, 0x000010dd, + 0x00000414, 0x00000434, 0x0000023e, 0x00002c66, + 0x0001041f, 0x00010447, 0x000010b0, 0x00002d10, + 0x00001f0a, 0x00001f02, 0x000013c6, 0x0000ab96, + 0x000013c1, 0x0000ab91, 0x0001e901, 0x0001e923, + 0x00002cd2, 0x00002cd3, 0x0000a690, 0x0000a691, + 0x000013ae, 0x0000ab7e, 0x000000d3, 0x000000f3, + 0x0000051e, 0x0000051f, 0x00001f2f, 0x00001f27, + 0x00000418, 0x00000438, 0x00001ea2, 0x00001ea3, + 0x0000a640, 0x0000a641, 0x00000100, 0x00000101, + 0x00001e46, 0x00001e47, 0x000024ce, 0x000024e8, + 0x00001cb9, 0x000010f9, 0x00000143, 0x00000144, + 0x00000176, 0x00000177, 0x00001e76, 0x00001e77, + 0x0000011e, 0x0000011f, 0x000001e0, 0x000001e1, + 0x0000004f, 0x0000006f, 0x000010c5, 0x00002d25, + 0x0000a7ac, 0x00000261, 0x00016e5c, 0x00016e7c, + 0x000004ac, 0x000004ad, 0x00002132, 0x0000214e, + 0x00001e54, 0x00001e55, 0x00001eaa, 0x00001eab, + 0x00001e5c, 0x00001e5d, 0x00000410, 0x00000430, + 0x0000a77b, 0x0000a77c, 0x0000016a, 0x0000016b, + 0x0000a7b2, 0x0000029d, 0x000104bc, 0x000104e4, + 0x00001e58, 0x00001e59, 0x00002166, 0x00002176, + 0x00000124, 0x00000125, 0x0000a7c4, 0x0000a794, + 0x00002ca0, 0x00002ca1, 0x00000490, 0x00000491, + 0x000010a1, 0x00002d01, 0x0000a746, 0x0000a747, + 0x00001e84, 0x00001e85, 0x000004fa, 0x000004fb, + 0x00001ef6, 0x00001ef7, 0x0000010a, 0x0000010b, + 0x00002c1f, 0x00002c4f, 0x0001041d, 0x00010445, + 0x0001e904, 0x0001e926, 0x000013b2, 0x0000ab82, + 0x00000191, 0x00000192, 0x00002c92, 0x00002c93, + 0x00000462, 0x00000463, 0x00000404, 0x00000454, + 0x00016e4c, 0x00016e6c, 0x0000ff2e, 0x0000ff4e, + 0x000010c2, 0x00002d22, 0x00010405, 0x0001042d, + 0x00002cdc, 0x00002cdd, 0x00010c91, 0x00010cd1, + 0x000104c2, 0x000104ea, 0x00000164, 0x00000165, + 0x00000055, 0x00000075, 0x00000496, 0x00000497, + 0x00001cb7, 0x000010f7, 0x000000dd, 0x000000fd, + 0x0000012c, 0x0000012d, 0x0000005a, 0x0000007a, + 0x000010b7, 0x00002d17, 0x000004f2, 0x000004f3, + 0x000013ed, 0x0000abbd, 0x000001f6, 0x00000195, + 0x00001f28, 0x00001f20, 0x00010c8f, 0x00010ccf, + 0x00001e0e, 0x00001e0f, 0x000013d5, 0x0000aba5, + 0x0000054e, 0x0000057e, 0x0001e90d, 0x0001e92f, + 0x00001f1d, 0x00001f15, 0x00001ffa, 0x00001f7c, + 0x00010ca1, 0x00010ce1, 0x000001e8, 0x000001e9, + 0x00010417, 0x0001043f, 0x00001fbc, 0x00001fb3, + 0x0000049c, 0x0000049d, 0x00016e56, 0x00016e76, + 0x00002167, 0x00002177, 0x000024cd, 0x000024e7, + 0x0000a726, 0x0000a727, 0x00000532, 0x00000562, + 0x00001e5a, 0x00001e5b, 0x000001b2, 0x0000028b, + 0x00002c96, 0x00002c97, 0x00000187, 0x00000188, + 0x00000541, 0x00000571, 0x00000425, 0x00000445, + 0x000010c0, 0x00002d20, 0x000000d2, 0x000000f2, + 0x00001ed0, 0x00001ed1, 0x00000542, 0x00000572, + 0x000104bd, 0x000104e5, 0x0000a77d, 0x00001d79, + 0x000104ba, 0x000104e2, 0x0000004b, 0x0000006b, + 0x000118b3, 0x000118d3, 0x00001f6b, 0x00001f63, + 0x0000023a, 0x00002c65, 0x0001e911, 0x0001e933, + 0x00001e2a, 0x00001e2b, 0x0000054c, 0x0000057c, + 0x00010c8e, 0x00010cce, 0x0000a786, 0x0000a787, + 0x00001fda, 0x00001f76, 0x0000a77e, 0x0000a77f, + 0x000118a5, 0x000118c5, 0x000003de, 0x000003df, + 0x0001041c, 0x00010444, 0x00001f49, 0x00001f41, + 0x00016e45, 0x00016e65, 0x0000a7ae, 0x0000026a, + 0x00001ea4, 0x00001ea5, 0x00000202, 0x00000203, + 0x00001fea, 0x00001f7a, 0x00001f18, 0x00001f10, + 0x00000184, 0x00000185, 0x000004b6, 0x000004b7, + 0x000013be, 0x0000ab8e, 0x00001f08, 0x00001f00, + 0x00001e30, 0x00001e31, 0x0000049e, 0x0000049f, + 0x00001f89, 0x00001f81, 0x0000a748, 0x0000a749, + 0x000010a0, 0x00002d00, 0x0001e917, 0x0001e939, + 0x00002cb4, 0x00002cb5, 0x0000018f, 0x00000259, + 0x0000a758, 0x0000a759, 0x00000134, 0x00000135, + 0x00001e86, 0x00001e87, 0x00001c90, 0x000010d0, + 0x0000042c, 0x0000044c, 0x00001f2d, 0x00001f25, + 0x00010426, 0x0001044e, 0x00001e8e, 0x00001e8f, + 0x00001caa, 0x000010ea, 0x00001f6c, 0x00001f64, + 0x00010400, 0x00010428, 0x00000556, 0x00000586, + 0x0001e903, 0x0001e925, 0x000024cc, 0x000024e6, + 0x000013a7, 0x0000ab77, 0x000001c5, 0x000001c6, + 0x00000178, 0x000000ff, 0x00001e42, 0x00001e43, + 0x000001b5, 0x000001b6, 0x00000429, 0x00000449, + 0x000013d0, 0x0000aba0, 0x000010bc, 0x00002d1c, + 0x00001e92, 0x00001e93, 0x00010cac, 0x00010cec, + 0x00001f8f, 0x00001f87, 0x00010c84, 0x00010cc4, + 0x00000179, 0x0000017a, 0x00001f39, 0x00001f31, + 0x00001ef2, 0x00001ef3, 0x0000047e, 0x0000047f, + 0x00001ed2, 0x00001ed3, 0x00002162, 0x00002172, + 0x00001f0c, 0x00001f04, 0x00002c24, 0x00002c54, + 0x000004a4, 0x000004a5, 0x00002cbe, 0x00002cbf, + 0x000104b5, 0x000104dd, 0x00016e59, 0x00016e79, + 0x0000a738, 0x0000a739, 0x0000046c, 0x0000046d, + 0x0000039a, 0x000003ba, 0x0000a7b1, 0x00000287, + 0x00000054, 0x00000074, 0x000004ee, 0x000004ef, + 0x00000536, 0x00000566, 0x00000047, 0x00000067, + 0x000010ab, 0x00002d0b }; static const unsigned _uccase_title_g_size = 35; @@ -4120,786 +4209,794 @@ static const unsigned _uccase_title_table[] = { 0x00001f93, 0x00001f9b }; -static const unsigned _uccase_fold_g_size = 272; +static const unsigned _uccase_fold_g_size = 293; static const short _uccase_fold_g[] = { - 5, 935, 2, -1389, 333, 697, 1, 37, - 32767, 4350, 16, 73, 776, -581, -820, 15914, - 395, 2544, 2279, 193, 5, 1241, 170, 4107, - 16, 4010, 589, 1862, 5283, 5219, 5, 72, - 194, 2028, 2, 8007, 293, 32767, 1454, 190, - 166, 2400, 201, 1652, 37, 3315, 3553, 8210, - 34, 426, 1805, 32767, 1580, 422, 543, 4945, - -405, 32767, 129, 3092, 259, 193, 48, 7089, - 9, 937, 3517, 163, 517, 306, -428, 32767, - 7, 2061, 2, 4457, 2535, 693, 12, 1605, - -966, 243, 35, 1749, 424, -1422, 4, 967, - 178, 32767, 538, 1098, 67, 1623, 32767, 1304, - 16, 7261, 2068, -769, 831, 385, 1, 1165, - 113, 324, 52, 2846, 538, 154, 2, 5621, - 781, 360, 6268, 20557, 7, 4466, 26246, 438, - 478, 1029, 53, 5769, 2321, 313, 2, 1687, - 180, 1661, 8, 1241, -1276, 5430, 1, 772, - 8, 32767, 1072, 1248, 489, 5116, -163, -1362, - 1574, 762, 692, 11591, 23, 1869, 1007, -796, - 2829, 630, 36, 913, -489, 32767, 2, 898, - 274, 792, 4164, 57, 57, 794, 7131, 612, - 328, 636, 886, -1319, 55, 1022, 3, -1194, - 5351, 201, 90, 589, 32767, 1186, 16, 2432, - 1294, -220, 1531, 5978, 5, 3540, 126, 43, - 508, 980, 32767, 1797, 3, 17682, 787, -315, - 6813, 20635, 10, 8475, 3011, 109, 295, 5917, - 614, 8830, 8, 542, 589, 921, 554, 1967, - 4, 37, -1057, 15388, 3, 3, 17, 32767, - 8479, 632, 276, 6344, 1125, -1350, 16, 3063, - 4683, 1305, 115, 2520, 187, 32767, 1665, 617, - 760, 2298, -784, 32767, 8, 1978, 1826, 2630, - 495, 691, 273, 69, 9638, 53, 48, 2209, - 10918, -1282, 1, 118, 140, -1032, 397, 1235, - 1, 1558, 32767, 176, 17, 866, 315, 3650 + 1037, 242, 3412, 136, 831, 111, 604, 271, + 435, 911, 126, 188, 59, 1613, -87, 4176, + 195, 88, 500, 263, 27, 2450, 1, 686, + 172, 340, 106, 1927, 106, 124, 370, 17, + 454, 11270, 262, 213, 152, 844, 132, -1391, + -193, 1438, 1271, -416, 226, 4695, 16, 519, + 1, 390, 511, 3, 3, 2, 1186, 873, + -1072, 104, 267, 370, 989, 3, 1642, 2, + 544, 1, 4656, 66, 6708, 515, 332, 321, + 121, 389, 56, 4817, 1578, 1795, 1246, 219, + 197, 32767, -885, 188, 1553, 344, 20214, 16, + 1239, 21, 172, 598, 798, 1, 58, 230, + 2, -1462, 170, -1148, 310, 129, 4, 506, + 2, 1141, 1, 2003, 2, 1254, 166, 366, + 259, 430, 410, 505, 2310, 3087, 1236, 886, + 326, 1760, 998, 32767, -841, 296, 576, -339, + 662, 3689, 23, 159, 1, 438, 1, 16, + 272, 1, 792, 456, -1153, 334, 1016, 611, + 192, 177, 872, 2, 46, 8, 22244, 3, + 191, 360, 66, 305, 16, 323, 7558, 1782, + 505, 1998, 741, 476, 3073, 32767, -925, 298, + 92, 887, 2917, 2, 1380, 565, 814, 648, + 173, 159, 11, 795, 302, 434, 269, 9879, + 71, 153, 64, 175, 2, 1679, 1, 1618, + 237, 959, 22, 410, 115, 7, 394, 463, + 3220, 874, 248, 1898, 157, 1092, 3500, 32767, + 179, 3803, 385, 289, 36, 260, 219, 549, + 1, 884, 2, 127, 851, 1, 769, 1305, + 371, 680, 585, 40, 15, 3, 561, 1, + 1016, 24, 532, 76, 1935, 300, 1613, 485, + 1047, 460, 28187, 766, 636, 1796, 2151, 1911, + -584, -703, 779, 349, 591, 266, 7995, 2, + 1917, 2, 1, 122, 2, 171, 2, 377, + 517, -888, -523, 1210, 99, 146, 7, 407, + 8, 857, 1, 3479, 1, 1576, 249, 573, + 278, 338, 3585, 286, 25102, 1614, 765, 134, + 1558, 542, -984, -816, 614 }; -static const unsigned _uccase_fold_table_size = 1480; +static const unsigned _uccase_fold_table_size = 1490; static const unsigned _uccase_fold_table[] = { - 0x000004a8, 0x000004a9, 0x00001fe2, 0x0300028c, - 0x0000ff2b, 0x0000ff4b, 0x00001e32, 0x00001e33, - 0x000004dc, 0x000004dd, 0x0000aba0, 0x000013d0, - 0x00010422, 0x0001044a, 0x0001e913, 0x0001e935, - 0x00000538, 0x00000568, 0x00016e46, 0x00016e66, - 0x000000c0, 0x000000e0, 0x00016e48, 0x00016e68, - 0x0000042c, 0x0000044c, 0x00001e9e, 0x020001b5, - 0x00000172, 0x00000173, 0x00001ed2, 0x00001ed3, - 0x0000abaa, 0x000013da, 0x00001e82, 0x00001e83, - 0x000010ab, 0x00002d0b, 0x0000aba5, 0x000013d5, - 0x00002cd6, 0x00002cd7, 0x00002ceb, 0x00002cec, - 0x00001fd7, 0x03000288, 0x0000a784, 0x0000a785, - 0x000003d8, 0x000003d9, 0x0000a74c, 0x0000a74d, - 0x000118bc, 0x000118dc, 0x000024c3, 0x000024dd, - 0x00002c26, 0x00002c56, 0x000118b1, 0x000118d1, - 0x00001f3e, 0x00001f36, 0x00010c8c, 0x00010ccc, - 0x0001e908, 0x0001e92a, 0x00000345, 0x000003b9, - 0x000004d2, 0x000004d3, 0x000024bc, 0x000024d6, - 0x0000021c, 0x0000021d, 0x000003d1, 0x000003b8, - 0x00000510, 0x00000511, 0x0001041f, 0x00010447, - 0x0000abbd, 0x000013ed, 0x000003f5, 0x000003b5, - 0x00000422, 0x00000442, 0x00001fb4, 0x0200025d, - 0x0000016c, 0x0000016d, 0x0001040c, 0x00010434, - 0x0000a722, 0x0000a723, 0x000004b4, 0x000004b5, - 0x000001c8, 0x000001c9, 0x000104c4, 0x000104ec, - 0x00000372, 0x00000373, 0x0000a724, 0x0000a725, - 0x00001fb8, 0x00001fb0, 0x0000a780, 0x0000a781, - 0x000010b1, 0x00002d11, 0x00010c89, 0x00010cc9, - 0x00000118, 0x00000119, 0x00000197, 0x00000268, - 0x000004e0, 0x000004e1, 0x00001cb1, 0x000010f1, - 0x00001f08, 0x00001f00, 0x00001fe4, 0x02000294, - 0x00000196, 0x00000269, 0x0000216b, 0x0000217b, - 0x000004da, 0x000004db, 0x000118a4, 0x000118c4, - 0x00000212, 0x00000213, 0x0000ff27, 0x0000ff47, - 0x00001e58, 0x00001e59, 0x0000a7b4, 0x0000a7b5, - 0x00000543, 0x00000573, 0x0000a78b, 0x0000a78c, - 0x0000042a, 0x0000044a, 0x00001fa4, 0x02000233, - 0x00000162, 0x00000163, 0x00000419, 0x00000439, - 0x0000a736, 0x0000a737, 0x00001e84, 0x00001e85, - 0x00001e70, 0x00001e71, 0x00001e3e, 0x00001e3f, - 0x0000053d, 0x0000056d, 0x000010c1, 0x00002d21, - 0x00001fb6, 0x02000260, 0x000003dc, 0x000003dd, - 0x0000a686, 0x0000a687, 0x0000042e, 0x0000044e, - 0x000003a6, 0x000003c6, 0x00001eee, 0x00001eef, - 0x000104b0, 0x000104d8, 0x0000a664, 0x0000a665, - 0x00010c8f, 0x00010ccf, 0x00001fec, 0x00001fe5, - 0x00000149, 0x02000195, 0x00000389, 0x000003ae, - 0x00001e12, 0x00001e13, 0x00001f9e, 0x02000221, - 0x0000021a, 0x0000021b, 0x0000ab82, 0x000013b2, - 0x00001e56, 0x00001e57, 0x00001f3c, 0x00001f34, - 0x0000a73e, 0x0000a73f, 0x000000cd, 0x000000ed, - 0x00001fe7, 0x0300029a, 0x0000a796, 0x0000a797, - 0x0000016a, 0x0000016b, 0x0000ff33, 0x0000ff53, - 0x0000aba6, 0x000013d6, 0x00001e8c, 0x00001e8d, - 0x00010c9c, 0x00010cdc, 0x0000021e, 0x0000021f, - 0x00001cb2, 0x000010f2, 0x00001ec6, 0x00001ec7, - 0x0000ab8d, 0x000013bd, 0x0001e917, 0x0001e939, - 0x0000a758, 0x0000a759, 0x0000011c, 0x0000011d, - 0x00000470, 0x00000471, 0x0000016e, 0x0000016f, - 0x00010c85, 0x00010cc5, 0x00001e16, 0x00001e17, - 0x00000542, 0x00000572, 0x00001e60, 0x00001e61, - 0x0000019f, 0x00000275, 0x00001c83, 0x00000441, - 0x00000520, 0x00000521, 0x00016e5f, 0x00016e7f, - 0x000104d1, 0x000104f9, 0x00001eb4, 0x00001eb5, - 0x00010c99, 0x00010cd9, 0x00001f2c, 0x00001f24, - 0x000024cf, 0x000024e9, 0x00000055, 0x00000075, - 0x00000476, 0x00000477, 0x00001e78, 0x00001e79, - 0x000010b0, 0x00002d10, 0x00002c1f, 0x00002c4f, - 0x00000498, 0x00000499, 0x00002cd0, 0x00002cd1, - 0x000010bd, 0x00002d1d, 0x0000fb04, 0x030002be, - 0x00002cde, 0x00002cdf, 0x0001e910, 0x0001e932, - 0x00001ed6, 0x00001ed7, 0x000000cf, 0x000000ef, - 0x00001f4d, 0x00001f45, 0x0000a762, 0x0000a763, - 0x00000418, 0x00000438, 0x000104b9, 0x000104e1, - 0x00002c2e, 0x00002c5e, 0x00001fd8, 0x00001fd0, - 0x00000549, 0x00000579, 0x0000017f, 0x00000073, - 0x00001ca3, 0x000010e3, 0x0000fb13, 0x020002c8, - 0x0000a786, 0x0000a787, 0x0000216c, 0x0000217c, - 0x00002126, 0x000003c9, 0x000104c1, 0x000104e9, - 0x00010caf, 0x00010cef, 0x00001ed4, 0x00001ed5, - 0x000118a0, 0x000118c0, 0x000004cb, 0x000004cc, - 0x00002c0f, 0x00002c3f, 0x00016e5b, 0x00016e7b, - 0x00001fa7, 0x0200023c, 0x000104b5, 0x000104dd, - 0x000004ae, 0x000004af, 0x00010ca5, 0x00010ce5, - 0x00001f6a, 0x00001f62, 0x0000abb3, 0x000013e3, - 0x0000ab78, 0x000013a8, 0x000104be, 0x000104e6, - 0x00001fc6, 0x02000273, 0x00016e5c, 0x00016e7c, - 0x000003fe, 0x0000037c, 0x000004a4, 0x000004a5, - 0x00001eba, 0x00001ebb, 0x000010c2, 0x00002d22, - 0x000003f7, 0x000003f8, 0x00000051, 0x00000071, - 0x00000056, 0x00000076, 0x00001f54, 0x030001bf, - 0x00000398, 0x000003b8, 0x00001f0f, 0x00001f07, - 0x00001e0a, 0x00001e0b, 0x000024c2, 0x000024dc, - 0x0000023b, 0x0000023c, 0x0000ab88, 0x000013b8, - 0x00001e66, 0x00001e67, 0x00016e50, 0x00016e70, - 0x000001d3, 0x000001d4, 0x000004c0, 0x000004cf, - 0x00001feb, 0x00001f7b, 0x0000053e, 0x0000056e, - 0x00001f98, 0x0200020f, 0x0000abb1, 0x000013e1, - 0x00001f3d, 0x00001f35, 0x00000524, 0x00000525, - 0x000001ee, 0x000001ef, 0x00000410, 0x00000430, - 0x00001caa, 0x000010ea, 0x0000a680, 0x0000a681, - 0x00001ff9, 0x00001f79, 0x0000ab83, 0x000013b3, - 0x00001f6d, 0x00001f65, 0x0000a7ae, 0x0000026a, - 0x00001e8e, 0x00001e8f, 0x000001e4, 0x000001e5, - 0x0001e91c, 0x0001e93e, 0x00001f56, 0x030001c3, - 0x00001f49, 0x00001f41, 0x0000ff38, 0x0000ff58, - 0x000010a7, 0x00002d07, 0x00000504, 0x00000505, - 0x000000d8, 0x000000f8, 0x000118bf, 0x000118df, - 0x00000502, 0x00000503, 0x00002c6e, 0x00000271, - 0x00010c9f, 0x00010cdf, 0x00002c75, 0x00002c76, - 0x00016e5a, 0x00016e7a, 0x00002c0d, 0x00002c3d, - 0x00000206, 0x00000207, 0x000000dd, 0x000000fd, - 0x000004c1, 0x000004c2, 0x00001f9b, 0x02000218, - 0x0000049e, 0x0000049f, 0x00010ca0, 0x00010ce0, - 0x00001e90, 0x00001e91, 0x000003a4, 0x000003c4, - 0x00010c98, 0x00010cd8, 0x00010cae, 0x00010cee, - 0x00001f81, 0x020001ca, 0x0000a744, 0x0000a745, - 0x00001f83, 0x020001d0, 0x0000a768, 0x0000a769, - 0x000024c6, 0x000024e0, 0x000010c4, 0x00002d24, - 0x00001f96, 0x02000209, 0x000001db, 0x000001dc, - 0x00001fd9, 0x00001fd1, 0x00001ff2, 0x0200029e, - 0x000024cb, 0x000024e5, 0x0001040e, 0x00010436, - 0x000004ee, 0x000004ef, 0x00000104, 0x00000105, - 0x000104cb, 0x000104f3, 0x00000112, 0x00000113, - 0x00000550, 0x00000580, 0x00000116, 0x00000117, - 0x00000490, 0x00000491, 0x00001f92, 0x020001fd, - 0x0000a650, 0x0000a651, 0x00000194, 0x00000263, - 0x00001e36, 0x00001e37, 0x000104c0, 0x000104e8, - 0x0000aba8, 0x000013d8, 0x00001e92, 0x00001e93, - 0x000001de, 0x000001df, 0x00000545, 0x00000575, - 0x0000038e, 0x000003cd, 0x000004de, 0x000004df, - 0x00001f69, 0x00001f61, 0x00002c6f, 0x00000250, - 0x000003f0, 0x000003ba, 0x0000048e, 0x0000048f, - 0x00001eb6, 0x00001eb7, 0x00000053, 0x00000073, - 0x0000004d, 0x0000006d, 0x00002163, 0x00002173, - 0x00001f2a, 0x00001f22, 0x0000a658, 0x0000a659, - 0x0000a652, 0x0000a653, 0x00000041, 0x00000061, - 0x00001e06, 0x00001e07, 0x000024c8, 0x000024e2, - 0x0000022e, 0x0000022f, 0x0000017d, 0x0000017e, - 0x00000552, 0x00000582, 0x00000402, 0x00000452, - 0x00000400, 0x00000450, 0x00001c82, 0x0000043e, - 0x00010cb1, 0x00010cf1, 0x0000a68c, 0x0000a68d, - 0x00000427, 0x00000447, 0x000104c9, 0x000104f1, - 0x0000ab73, 0x000013a3, 0x0000ab9b, 0x000013cb, - 0x000004b0, 0x000004b1, 0x0000fb01, 0x020002b4, - 0x00001ca6, 0x000010e6, 0x0000fb16, 0x020002d1, - 0x000000ce, 0x000000ee, 0x0001e915, 0x0001e937, - 0x0000aba9, 0x000013d9, 0x00002cb0, 0x00002cb1, - 0x00000130, 0x02000192, 0x000104d3, 0x000104fb, - 0x00001ffb, 0x00001f7d, 0x000001fc, 0x000001fd, - 0x0000a766, 0x0000a767, 0x0000ff34, 0x0000ff54, - 0x000010b6, 0x00002d16, 0x00002c00, 0x00002c30, - 0x00000049, 0x00000069, 0x00010423, 0x0001044b, - 0x00001f4b, 0x00001f43, 0x0000014c, 0x0000014d, - 0x00001e6e, 0x00001e6f, 0x00001c93, 0x000010d3, - 0x000024b7, 0x000024d1, 0x0001e91e, 0x0001e940, - 0x00000492, 0x00000493, 0x00000512, 0x00000513, - 0x00001e9b, 0x00001e61, 0x00016e54, 0x00016e74, - 0x000118af, 0x000118cf, 0x0000047e, 0x0000047f, - 0x000104c6, 0x000104ee, 0x00010c95, 0x00010cd5, - 0x00001c95, 0x000010d5, 0x00000462, 0x00000463, - 0x000118a8, 0x000118c8, 0x00010409, 0x00010431, - 0x00001f8d, 0x020001ee, 0x00002cb6, 0x00002cb7, - 0x00000132, 0x00000133, 0x000010be, 0x00002d1e, - 0x00001f91, 0x020001fa, 0x000001fe, 0x000001ff, - 0x00000059, 0x00000079, 0x00001ff8, 0x00001f78, - 0x00002c27, 0x00002c57, 0x00002c06, 0x00002c36, - 0x000024bf, 0x000024d9, 0x0000a7b8, 0x0000a7b9, - 0x0000015e, 0x0000015f, 0x0000014e, 0x0000014f, - 0x000010c5, 0x00002d25, 0x00001f48, 0x00001f40, - 0x00001e02, 0x00001e03, 0x000118b2, 0x000118d2, - 0x00001fd6, 0x02000285, 0x0000052c, 0x0000052d, - 0x0000020e, 0x0000020f, 0x0000216e, 0x0000217e, - 0x0000abae, 0x000013de, 0x00001e98, 0x020001ac, - 0x000010a6, 0x00002d06, 0x0000fb14, 0x020002cb, - 0x00000425, 0x00000445, 0x000003ff, 0x0000037d, - 0x00001fe9, 0x00001fe1, 0x000001a2, 0x000001a3, - 0x000118be, 0x000118de, 0x000004e4, 0x000004e5, - 0x00001cad, 0x000010ed, 0x0000040b, 0x0000045b, - 0x000104c7, 0x000104ef, 0x0000a660, 0x0000a661, - 0x0000013d, 0x0000013e, 0x000010a0, 0x00002d00, - 0x000010bf, 0x00002d1f, 0x00001fc3, 0x0200026d, - 0x000004e8, 0x000004e9, 0x00010425, 0x0001044d, - 0x000010a5, 0x00002d05, 0x00002c2d, 0x00002c5d, - 0x00010c9b, 0x00010cdb, 0x00000042, 0x00000062, - 0x00002c03, 0x00002c33, 0x00001c88, 0x0000a64b, - 0x00010c88, 0x00010cc8, 0x00000514, 0x00000515, - 0x000001d9, 0x000001da, 0x00000421, 0x00000441, - 0x00002c80, 0x00002c81, 0x00001eae, 0x00001eaf, - 0x00010ca6, 0x00010ce6, 0x000001b5, 0x000001b6, - 0x00000388, 0x000003ad, 0x00000464, 0x00000465, - 0x000000d5, 0x000000f5, 0x0000013f, 0x00000140, - 0x00010c80, 0x00010cc0, 0x00016e42, 0x00016e62, - 0x00001ca0, 0x000010e0, 0x00000224, 0x00000225, - 0x00000409, 0x00000459, 0x0000a666, 0x0000a667, - 0x00002ce0, 0x00002ce1, 0x0000a65e, 0x0000a65f, - 0x00010cac, 0x00010cec, 0x00000424, 0x00000444, - 0x000004e6, 0x000004e7, 0x00000174, 0x00000175, - 0x00000228, 0x00000229, 0x00001c94, 0x000010d4, - 0x00010cab, 0x00010ceb, 0x0000053f, 0x0000056f, - 0x0001e914, 0x0001e936, 0x00001c9a, 0x000010da, - 0x0000a648, 0x0000a649, 0x0000051c, 0x0000051d, - 0x00000178, 0x000000ff, 0x00016e59, 0x00016e79, - 0x00002c82, 0x00002c83, 0x00000556, 0x00000586, - 0x00001f68, 0x00001f60, 0x00000553, 0x00000583, - 0x00000386, 0x000003ac, 0x0000046c, 0x0000046d, - 0x000000c8, 0x000000e8, 0x000001a4, 0x000001a5, - 0x00000395, 0x000003b5, 0x00001ee0, 0x00001ee1, - 0x000010a9, 0x00002d09, 0x000104cd, 0x000104f5, - 0x00000170, 0x00000171, 0x000024c1, 0x000024db, - 0x0000a73a, 0x0000a73b, 0x0000a690, 0x0000a691, - 0x00000506, 0x00000507, 0x00001e30, 0x00001e31, - 0x00001e08, 0x00001e09, 0x00000164, 0x00000165, - 0x00000226, 0x00000227, 0x00002c60, 0x00002c61, - 0x00016e53, 0x00016e73, 0x00000044, 0x00000064, - 0x0000004f, 0x0000006f, 0x000001cb, 0x000001cc, - 0x00001fd2, 0x0300027d, 0x0000050c, 0x0000050d, - 0x00000176, 0x00000177, 0x000118ad, 0x000118cd, - 0x0000a78d, 0x00000265, 0x00001fdb, 0x00001f77, - 0x00001fc8, 0x00001f72, 0x0000abab, 0x000013db, - 0x00001ca8, 0x000010e8, 0x000104c5, 0x000104ed, - 0x000000c6, 0x000000e6, 0x000001ac, 0x000001ad, - 0x00001f59, 0x00001f51, 0x00002cb8, 0x00002cb9, - 0x000004b6, 0x000004b7, 0x00001fa0, 0x02000227, - 0x000010b2, 0x00002d12, 0x00000230, 0x00000231, - 0x00000045, 0x00000065, 0x00002c9c, 0x00002c9d, - 0x00002ca4, 0x00002ca5, 0x00002c08, 0x00002c38, - 0x000004e2, 0x000004e3, 0x00001ef0, 0x00001ef1, - 0x00002c6d, 0x00000251, 0x0000050a, 0x0000050b, - 0x00010c97, 0x00010cd7, 0x0000004c, 0x0000006c, - 0x000010cd, 0x00002d2d, 0x00001f0d, 0x00001f05, - 0x00000460, 0x00000461, 0x00001e40, 0x00001e41, - 0x000024cd, 0x000024e7, 0x0000024c, 0x0000024d, - 0x0001e921, 0x0001e943, 0x00001f9a, 0x02000215, - 0x000010ae, 0x00002d0e, 0x000104ca, 0x000104f2, - 0x000003b0, 0x0300019f, 0x0000abb6, 0x000013e6, - 0x0000054a, 0x0000057a, 0x00010ca2, 0x00010ce2, - 0x0000ab8b, 0x000013bb, 0x00001ee2, 0x00001ee3, - 0x00001e96, 0x020001a6, 0x00001fa6, 0x02000239, - 0x00001ca9, 0x000010e9, 0x00001f87, 0x020001dc, - 0x0000049a, 0x0000049b, 0x00002c9e, 0x00002c9f, - 0x00001e00, 0x00001e01, 0x0000053c, 0x0000056c, - 0x000004f6, 0x000004f7, 0x00001ef6, 0x00001ef7, - 0x00000222, 0x00000223, 0x0000a7a2, 0x0000a7a3, - 0x000003ea, 0x000003eb, 0x00016e55, 0x00016e75, - 0x00000208, 0x00000209, 0x00001edc, 0x00001edd, - 0x0000a68a, 0x0000a68b, 0x00001e46, 0x00001e47, - 0x000001a0, 0x000001a1, 0x00000150, 0x00000151, - 0x00002c9a, 0x00002c9b, 0x000004f0, 0x000004f1, - 0x00001f6e, 0x00001f66, 0x000118a9, 0x000118c9, - 0x00000396, 0x000003b6, 0x0000a692, 0x0000a693, - 0x000000c2, 0x000000e2, 0x0000a642, 0x0000a643, - 0x000024bb, 0x000024d5, 0x00010ca4, 0x00010ce4, - 0x0000ab95, 0x000013c5, 0x0000ff24, 0x0000ff44, - 0x000004c5, 0x000004c6, 0x0000a668, 0x0000a669, - 0x000004aa, 0x000004ab, 0x00000532, 0x00000562, - 0x00002c0b, 0x00002c3b, 0x0000a65c, 0x0000a65d, - 0x00001e0e, 0x00001e0f, 0x0000ab85, 0x000013b5, - 0x0000ff28, 0x0000ff48, 0x00002c19, 0x00002c49, - 0x00010c96, 0x00010cd6, 0x00001f1d, 0x00001f15, - 0x0000012a, 0x0000012b, 0x00001ede, 0x00001edf, - 0x00002c98, 0x00002c99, 0x0000041a, 0x0000043a, - 0x00000186, 0x00000254, 0x000024ce, 0x000024e8, - 0x00002c28, 0x00002c58, 0x0000050e, 0x0000050f, - 0x00001ec8, 0x00001ec9, 0x00010c8b, 0x00010ccb, - 0x00001cae, 0x000010ee, 0x0000ab90, 0x000013c0, - 0x000000d6, 0x000000f6, 0x00000114, 0x00000115, - 0x0000041d, 0x0000043d, 0x00010c86, 0x00010cc6, - 0x00001ec0, 0x00001ec1, 0x0001e904, 0x0001e926, - 0x00000544, 0x00000574, 0x0000a73c, 0x0000a73d, - 0x0000fb03, 0x030002ba, 0x0000ff29, 0x0000ff49, - 0x000001ea, 0x000001eb, 0x0000039f, 0x000003bf, - 0x0000a7aa, 0x00000266, 0x000000d0, 0x000000f0, - 0x0000ff26, 0x0000ff46, 0x000118a7, 0x000118c7, - 0x0000a760, 0x0000a761, 0x0000a698, 0x0000a699, - 0x00010421, 0x00010449, 0x00001cb6, 0x000010f6, - 0x00000401, 0x00000451, 0x00000522, 0x00000523, - 0x000003e0, 0x000003e1, 0x00002160, 0x00002170, - 0x0001040f, 0x00010437, 0x00001cb9, 0x000010f9, - 0x0000004e, 0x0000006e, 0x00001f85, 0x020001d6, - 0x0000a64a, 0x0000a64b, 0x00000472, 0x00000473, - 0x00000546, 0x00000576, 0x00000551, 0x00000581, - 0x00016e4d, 0x00016e6d, 0x00001f8b, 0x020001e8, - 0x00001ec2, 0x00001ec3, 0x00001e8a, 0x00001e8b, - 0x0000a7b2, 0x0000029d, 0x000003c2, 0x000003c3, - 0x00000496, 0x00000497, 0x00002c23, 0x00002c53, - 0x00002c13, 0x00002c43, 0x0001e912, 0x0001e934, - 0x0000a79a, 0x0000a79b, 0x00002cae, 0x00002caf, - 0x00002c67, 0x00002c68, 0x000003a8, 0x000003c8, - 0x000003e6, 0x000003e7, 0x00001f50, 0x020001b8, - 0x000013f9, 0x000013f1, 0x00016e56, 0x00016e76, - 0x000004f8, 0x000004f9, 0x00001fa1, 0x0200022a, - 0x00000122, 0x00000123, 0x0001e91b, 0x0001e93d, - 0x00000124, 0x00000125, 0x00001ea0, 0x00001ea1, - 0x00002c72, 0x00002c73, 0x00010c91, 0x00010cd1, - 0x00001e76, 0x00001e77, 0x00001f82, 0x020001cd, - 0x00000189, 0x00000256, 0x000001b2, 0x0000028b, - 0x0000fb06, 0x020002c5, 0x00010c90, 0x00010cd0, - 0x00001c99, 0x000010d9, 0x00001fa8, 0x0200023f, - 0x00000191, 0x00000192, 0x0000ab98, 0x000013c8, - 0x00001e72, 0x00001e73, 0x00000102, 0x00000103, - 0x00001e99, 0x020001af, 0x00001f93, 0x02000200, - 0x000004fe, 0x000004ff, 0x00001ef8, 0x00001ef9, - 0x0000ff22, 0x0000ff42, 0x00001e22, 0x00001e23, - 0x000003d5, 0x000003c6, 0x00000052, 0x00000072, - 0x00000126, 0x00000127, 0x00001c90, 0x000010d0, - 0x0000ab76, 0x000013a6, 0x00001e48, 0x00001e49, - 0x00001fe3, 0x03000290, 0x00001e04, 0x00001e05, - 0x00002c2c, 0x00002c5c, 0x000003a7, 0x000003c7, - 0x00016e4e, 0x00016e6e, 0x00016e5d, 0x00016e7d, - 0x0000039e, 0x000003be, 0x0000a764, 0x0000a765, - 0x0000a696, 0x0000a697, 0x00002c62, 0x0000026b, - 0x00002132, 0x0000214e, 0x00002ccc, 0x00002ccd, - 0x0000042f, 0x0000044f, 0x00001c81, 0x00000434, - 0x00001fb3, 0x0200025a, 0x00010411, 0x00010439, - 0x0000a646, 0x0000a647, 0x00001ca4, 0x000010e4, - 0x000001c5, 0x000001c6, 0x00002c1c, 0x00002c4c, - 0x0000017b, 0x0000017c, 0x00001e3a, 0x00001e3b, - 0x0000023e, 0x00002c66, 0x00002c70, 0x00000252, - 0x0000a7b6, 0x0000a7b7, 0x00001f2e, 0x00001f26, - 0x000104c8, 0x000104f0, 0x00010420, 0x00010448, - 0x000000cb, 0x000000eb, 0x00000528, 0x00000529, - 0x0000018e, 0x000001dd, 0x0001e902, 0x0001e924, - 0x000104ba, 0x000104e2, 0x00002c94, 0x00002c95, - 0x00001f8a, 0x020001e5, 0x00000243, 0x00000180, - 0x000104ce, 0x000104f6, 0x00000478, 0x00000479, - 0x000000de, 0x000000fe, 0x000118b3, 0x000118d3, - 0x0000fb02, 0x020002b7, 0x0000216f, 0x0000217f, - 0x00001eda, 0x00001edb, 0x00010cb2, 0x00010cf2, - 0x00002cc0, 0x00002cc1, 0x0000ff36, 0x0000ff56, - 0x0000a756, 0x0000a757, 0x000024c4, 0x000024de, - 0x000001d7, 0x000001d8, 0x00001ea2, 0x00001ea3, - 0x00001e2a, 0x00001e2b, 0x000003a3, 0x000003c3, - 0x00002c10, 0x00002c40, 0x000104bd, 0x000104e5, - 0x0000a782, 0x0000a783, 0x000104c2, 0x000104ea, - 0x00002ca6, 0x00002ca7, 0x00001f90, 0x020001f7, - 0x00001f80, 0x020001c7, 0x0000053a, 0x0000056a, - 0x00001f88, 0x020001df, 0x0001040d, 0x00010435, - 0x0001e918, 0x0001e93a, 0x0000a742, 0x0000a743, - 0x00000190, 0x0000025b, 0x0000054b, 0x0000057b, - 0x00002165, 0x00002175, 0x0000a72c, 0x0000a72d, - 0x00001ed8, 0x00001ed9, 0x000001b8, 0x000001b9, - 0x00000415, 0x00000435, 0x00002cca, 0x00002ccb, - 0x00001e68, 0x00001e69, 0x000010ad, 0x00002d0d, - 0x0000041e, 0x0000043e, 0x000003da, 0x000003db, - 0x0000fb00, 0x020002b1, 0x00000108, 0x00000109, - 0x0000a68e, 0x0000a68f, 0x00002c1a, 0x00002c4a, - 0x00001e1a, 0x00001e1b, 0x00001c9b, 0x000010db, - 0x000013fb, 0x000013f3, 0x00002c11, 0x00002c41, - 0x00000143, 0x00000144, 0x00000058, 0x00000078, - 0x000024b6, 0x000024d0, 0x0000ab8e, 0x000013be, - 0x00002c25, 0x00002c55, 0x00000391, 0x000003b1, - 0x000001a9, 0x00000283, 0x0000a694, 0x0000a695, - 0x00000120, 0x00000121, 0x0000ab81, 0x000013b1, - 0x00010c93, 0x00010cd3, 0x0000a7ad, 0x0000026c, - 0x000010c7, 0x00002d27, 0x0000abb4, 0x000013e4, - 0x00000548, 0x00000578, 0x00002cac, 0x00002cad, - 0x00010424, 0x0001044c, 0x00002cd4, 0x00002cd5, - 0x0000041c, 0x0000043c, 0x00001ff4, 0x020002a4, - 0x00000047, 0x00000067, 0x0000a75a, 0x0000a75b, - 0x0000ff31, 0x0000ff51, 0x0000011a, 0x0000011b, - 0x000024b8, 0x000024d2, 0x00002c24, 0x00002c54, - 0x00000541, 0x00000571, 0x000013fd, 0x000013f5, - 0x000118a1, 0x000118c1, 0x00001f5f, 0x00001f57, - 0x000003e8, 0x000003e9, 0x000104b2, 0x000104da, - 0x000003cf, 0x000003d7, 0x00002c17, 0x00002c47, - 0x00001c80, 0x00000432, 0x000013f8, 0x000013f0, - 0x00001e26, 0x00001e27, 0x000000d1, 0x000000f1, - 0x000003e2, 0x000003e3, 0x000118b5, 0x000118d5, - 0x0001e90a, 0x0001e92c, 0x0000abbb, 0x000013eb, - 0x0000020c, 0x0000020d, 0x0000a72a, 0x0000a72b, - 0x000001f6, 0x00000195, 0x00010c9a, 0x00010cda, - 0x00001f19, 0x00001f11, 0x00002cd2, 0x00002cd3, - 0x00000468, 0x00000469, 0x00002c8c, 0x00002c8d, - 0x00002c09, 0x00002c39, 0x0000a76e, 0x0000a76f, - 0x0000ab94, 0x000013c4, 0x00000200, 0x00000201, - 0x00001fc9, 0x00001f73, 0x00002c22, 0x00002c52, - 0x00001faf, 0x02000254, 0x00002c7f, 0x00000240, - 0x00001fe6, 0x02000297, 0x00010419, 0x00010441, - 0x0000a69a, 0x0000a69b, 0x000004d0, 0x000004d1, - 0x00000128, 0x00000129, 0x00001f97, 0x0200020c, - 0x00000158, 0x00000159, 0x00001ff3, 0x020002a1, - 0x000001d1, 0x000001d2, 0x00000533, 0x00000563, - 0x00002c8e, 0x00002c8f, 0x00000420, 0x00000440, - 0x00001f1c, 0x00001f14, 0x00016e58, 0x00016e78, - 0x000104b8, 0x000104e0, 0x0000a734, 0x0000a735, - 0x00001e86, 0x00001e87, 0x000118a5, 0x000118c5, - 0x0000ab77, 0x000013a7, 0x00000370, 0x00000371, - 0x00001e6c, 0x00001e6d, 0x00001fbc, 0x02000267, - 0x00010408, 0x00010430, 0x0000a684, 0x0000a685, - 0x00001f89, 0x020001e2, 0x00000179, 0x0000017a, - 0x00010401, 0x00010429, 0x00010c82, 0x00010cc2, - 0x00016e57, 0x00016e77, 0x00001f0c, 0x00001f04, - 0x000118a6, 0x000118c6, 0x00001fb7, 0x03000263, - 0x00010403, 0x0001042b, 0x000004d6, 0x000004d7, - 0x000010c3, 0x00002d23, 0x00000210, 0x00000211, - 0x00002cdc, 0x00002cdd, 0x00001e5c, 0x00001e5d, - 0x00000048, 0x00000068, 0x0001e911, 0x0001e933, - 0x000001d5, 0x000001d6, 0x00000426, 0x00000446, - 0x00000043, 0x00000063, 0x00000160, 0x00000161, - 0x0000216d, 0x0000217d, 0x0000a732, 0x0000a733, - 0x0000054e, 0x0000057e, 0x00010c94, 0x00010cd4, - 0x0000abad, 0x000013dd, 0x00000376, 0x00000377, - 0x00000241, 0x00000242, 0x00002c92, 0x00002c93, - 0x0000004b, 0x0000006b, 0x0000a682, 0x0000a683, - 0x00000408, 0x00000458, 0x00000202, 0x00000203, - 0x000104bb, 0x000104e3, 0x00010413, 0x0001043b, - 0x0000ab7f, 0x000013af, 0x0000aba4, 0x000013d4, - 0x00001f29, 0x00001f21, 0x0000041b, 0x0000043b, - 0x000003ee, 0x000003ef, 0x0000015a, 0x0000015b, - 0x0000a65a, 0x0000a65b, 0x00000216, 0x00000217, - 0x0000046e, 0x0000046f, 0x00010ca7, 0x00010ce7, - 0x00001c97, 0x000010d7, 0x00001c96, 0x000010d6, - 0x0000ab89, 0x000013b9, 0x00010407, 0x0001042f, - 0x00001e3c, 0x00001e3d, 0x00000166, 0x00000167, - 0x00001ee6, 0x00001ee7, 0x000004a6, 0x000004a7, - 0x00010ca1, 0x00010ce1, 0x000104b4, 0x000104dc, - 0x0000ab75, 0x000013a5, 0x00002cda, 0x00002cdb, - 0x0000a7b0, 0x0000029e, 0x00001fba, 0x00001f70, - 0x0000ff30, 0x0000ff50, 0x0000039d, 0x000003bd, - 0x000004a0, 0x000004a1, 0x00010404, 0x0001042c, - 0x00010406, 0x0001042e, 0x00002c2a, 0x00002c5a, - 0x00001f9c, 0x0200021b, 0x00001f0a, 0x00001f02, - 0x00001fda, 0x00001f76, 0x0001e900, 0x0001e922, - 0x000000d9, 0x000000f9, 0x000003d6, 0x000003c0, - 0x0000012e, 0x0000012f, 0x00016e4b, 0x00016e6b, - 0x0000ab87, 0x000013b7, 0x00001e5a, 0x00001e5b, - 0x000001ae, 0x00000288, 0x0000023d, 0x0000019a, - 0x00010c8d, 0x00010ccd, 0x00016e4a, 0x00016e6a, - 0x00010c84, 0x00010cc4, 0x00000393, 0x000003b3, - 0x0000a779, 0x0000a77a, 0x0000abac, 0x000013dc, - 0x00010ca3, 0x00010ce3, 0x000001e6, 0x000001e7, - 0x0000ab7b, 0x000013ab, 0x0000ab96, 0x000013c6, - 0x00001f38, 0x00001f30, 0x00001fc4, 0x02000270, - 0x00000539, 0x00000569, 0x00000531, 0x00000561, - 0x000004a2, 0x000004a3, 0x00000136, 0x00000137, - 0x000001e0, 0x000001e1, 0x00010414, 0x0001043c, - 0x00001fe8, 0x00001fe0, 0x00010c9e, 0x00010cde, - 0x0000ff3a, 0x0000ff5a, 0x00000139, 0x0000013a, - 0x0000a7a6, 0x0000a7a7, 0x00001e14, 0x00001e15, - 0x0000ab91, 0x000013c1, 0x00000390, 0x0300019b, - 0x0000ab8a, 0x000013ba, 0x00001e64, 0x00001e65, - 0x00002c07, 0x00002c37, 0x000104c3, 0x000104eb, - 0x00016e47, 0x00016e67, 0x0000a77d, 0x00001d79, - 0x00002c90, 0x00002c91, 0x0000ff35, 0x0000ff55, - 0x00001eb0, 0x00001eb1, 0x00000480, 0x00000481, - 0x00016e44, 0x00016e64, 0x00002c1d, 0x00002c4d, - 0x000000b5, 0x000003bc, 0x00001cb4, 0x000010f4, - 0x00016e4f, 0x00016e6f, 0x00001fc2, 0x0200026a, - 0x0000ff37, 0x0000ff57, 0x000003d0, 0x000003b2, - 0x0000ab86, 0x000013b6, 0x00000534, 0x00000564, - 0x000001e2, 0x000001e3, 0x000118b0, 0x000118d0, - 0x00010c92, 0x00010cd2, 0x00000555, 0x00000585, - 0x00001fcb, 0x00001f75, 0x00016e40, 0x00016e60, - 0x0000ff23, 0x0000ff43, 0x000004d8, 0x000004d9, - 0x000104d2, 0x000104fa, 0x000024ba, 0x000024d4, - 0x00001f3b, 0x00001f33, 0x00001e62, 0x00001e63, - 0x00001f1b, 0x00001f13, 0x000004bc, 0x000004bd, - 0x0000ab80, 0x000013b0, 0x00000428, 0x00000448, - 0x0000a79e, 0x0000a79f, 0x0000004a, 0x0000006a, - 0x00001e20, 0x00001e21, 0x00002cb4, 0x00002cb5, - 0x00001e28, 0x00001e29, 0x0000040c, 0x0000045c, - 0x00000414, 0x00000434, 0x00002c64, 0x0000027d, - 0x00001ece, 0x00001ecf, 0x00001ffc, 0x020002ae, - 0x00001ed0, 0x00001ed1, 0x0000216a, 0x0000217a, - 0x0000a76a, 0x0000a76b, 0x00000110, 0x00000111, - 0x00001eb2, 0x00001eb3, 0x000104bc, 0x000104e4, - 0x00001e1e, 0x00001e1f, 0x00000404, 0x00000454, - 0x00000245, 0x0000028c, 0x0000fb15, 0x020002ce, - 0x00000220, 0x0000019e, 0x000118ae, 0x000118ce, - 0x000024c7, 0x000024e1, 0x00000218, 0x00000219, - 0x0000abba, 0x000013ea, 0x0000040f, 0x0000045f, - 0x00001fcc, 0x0200027a, 0x000004be, 0x000004bf, - 0x0000fb17, 0x020002d4, 0x00002caa, 0x00002cab, - 0x00000397, 0x000003b7, 0x00000168, 0x00000169, - 0x00002c05, 0x00002c35, 0x0000ab8c, 0x000013bc, - 0x000010b5, 0x00002d15, 0x0000040e, 0x0000045e, - 0x0000ab9e, 0x000013ce, 0x00002cc4, 0x00002cc5, - 0x00001ca2, 0x000010e2, 0x000000c9, 0x000000e9, - 0x000104b1, 0x000104d9, 0x00001cbf, 0x000010ff, - 0x000004ba, 0x000004bb, 0x00001eaa, 0x00001eab, - 0x0000ff39, 0x0000ff59, 0x00002c14, 0x00002c44, - 0x000104b3, 0x000104db, 0x0001e90f, 0x0001e931, - 0x00010c81, 0x00010cc1, 0x0000053b, 0x0000056b, - 0x0000040a, 0x0000045a, 0x000004d4, 0x000004d5, - 0x000024ca, 0x000024e4, 0x0000212a, 0x0000006b, - 0x00001fc7, 0x03000276, 0x0000a64e, 0x0000a64f, - 0x000118b7, 0x000118d7, 0x00002c01, 0x00002c31, - 0x0000042b, 0x0000044b, 0x000118a2, 0x000118c2, - 0x00002c1b, 0x00002c4b, 0x00001f99, 0x02000212, - 0x00001c86, 0x0000044a, 0x0000a7ab, 0x0000025c, - 0x00001f86, 0x020001d9, 0x0000ab93, 0x000013c3, - 0x0000a7a0, 0x0000a7a1, 0x00001c9e, 0x000010de, - 0x0000a7a8, 0x0000a7a9, 0x00001fca, 0x00001f74, - 0x0001040b, 0x00010433, 0x000118ba, 0x000118da, - 0x0000a75e, 0x0000a75f, 0x00001f8f, 0x020001f4, - 0x000001fa, 0x000001fb, 0x00002c04, 0x00002c34, - 0x00000403, 0x00000453, 0x00001f1a, 0x00001f12, - 0x00001ff7, 0x030002aa, 0x000010bb, 0x00002d1b, - 0x00002c12, 0x00002c42, 0x00001e7e, 0x00001e7f, - 0x0000014a, 0x0000014b, 0x00000214, 0x00000215, - 0x0000037f, 0x000003f3, 0x00001e6a, 0x00001e6b, - 0x00001eec, 0x00001eed, 0x0000abb9, 0x000013e9, - 0x00001fa5, 0x02000236, 0x0000038f, 0x000003ce, - 0x00000535, 0x00000565, 0x00001fd3, 0x03000281, - 0x0000ab8f, 0x000013bf, 0x00001c9c, 0x000010dc, - 0x00001e97, 0x020001a9, 0x00001f6c, 0x00001f64, - 0x00010417, 0x0001043f, 0x00002162, 0x00002172, - 0x00002c88, 0x00002c89, 0x00010415, 0x0001043d, - 0x000104b6, 0x000104de, 0x00001caf, 0x000010ef, - 0x00002cbc, 0x00002cbd, 0x00001ebc, 0x00001ebd, - 0x00002c15, 0x00002c45, 0x000001cf, 0x000001d0, - 0x00002167, 0x00002177, 0x0000ab9a, 0x000013ca, - 0x00001ffa, 0x00001f7c, 0x0000020a, 0x0000020b, - 0x00002c0c, 0x00002c3c, 0x00001e0c, 0x00001e0d, - 0x000010a8, 0x00002d08, 0x00000147, 0x00000148, - 0x0000ff2f, 0x0000ff4f, 0x00001e7c, 0x00001e7d, - 0x00001f4a, 0x00001f42, 0x0000a7ac, 0x00000261, - 0x00001c87, 0x00000463, 0x00000474, 0x00000475, - 0x00000406, 0x00000456, 0x000024cc, 0x000024e6, - 0x00001fab, 0x02000248, 0x0001e905, 0x0001e927, - 0x00001e9a, 0x020001b2, 0x000010a4, 0x00002d04, - 0x0000054d, 0x0000057d, 0x00001cac, 0x000010ec, - 0x0000ff25, 0x0000ff45, 0x00001e24, 0x00001e25, - 0x00000411, 0x00000431, 0x0000abb5, 0x000013e5, - 0x00002cb2, 0x00002cb3, 0x00001ca5, 0x000010e5, - 0x000118a3, 0x000118c3, 0x00002164, 0x00002174, - 0x000003a1, 0x000003c1, 0x0000a74e, 0x0000a74f, - 0x000118b8, 0x000118d8, 0x0000ff2e, 0x0000ff4e, - 0x00002c02, 0x00002c32, 0x0000054f, 0x0000057f, - 0x00010427, 0x0001044f, 0x0000a740, 0x0000a741, - 0x000000c5, 0x000000e5, 0x00001f84, 0x020001d3, - 0x000010b9, 0x00002d19, 0x0001e91f, 0x0001e941, - 0x000024c9, 0x000024e3, 0x0000013b, 0x0000013c, - 0x00000516, 0x00000517, 0x0000a654, 0x0000a655, - 0x0000a656, 0x0000a657, 0x00000405, 0x00000455, - 0x00002c29, 0x00002c59, 0x000010a2, 0x00002d02, - 0x00000540, 0x00000570, 0x000010a3, 0x00002d03, - 0x00000466, 0x00000467, 0x00001fb9, 0x00001fb1, - 0x00010416, 0x0001043e, 0x0000ab97, 0x000013c7, - 0x00002cba, 0x00002cbb, 0x00001ef4, 0x00001ef5, - 0x000003e4, 0x000003e5, 0x000004c9, 0x000004ca, - 0x0000a66c, 0x0000a66d, 0x00000054, 0x00000074, - 0x00000246, 0x00000247, 0x0000ab7a, 0x000013aa, - 0x00002c0a, 0x00002c3a, 0x000004ec, 0x000004ed, - 0x0001e90e, 0x0001e930, 0x000000d3, 0x000000f3, - 0x00001fa9, 0x02000242, 0x00001f2b, 0x00001f23, - 0x0000fb05, 0x020002c2, 0x00002c6b, 0x00002c6c, - 0x00000537, 0x00000567, 0x000010b7, 0x00002d17, - 0x0000a77e, 0x0000a77f, 0x00010cad, 0x00010ced, - 0x0000040d, 0x0000045d, 0x00002c0e, 0x00002c3e, - 0x00000547, 0x00000577, 0x00001f4c, 0x00001f44, - 0x000003a5, 0x000003c5, 0x0000038c, 0x000003cc, - 0x00001cb7, 0x000010f7, 0x00001eea, 0x00001eeb, - 0x000001a6, 0x00000280, 0x00001fad, 0x0200024e, - 0x00002c8a, 0x00002c8b, 0x00000134, 0x00000135, - 0x00010418, 0x00010440, 0x00010c87, 0x00010cc7, - 0x0000a662, 0x0000a663, 0x000001b3, 0x000001b4, - 0x0000015c, 0x0000015d, 0x000118b9, 0x000118d9, - 0x00000500, 0x00000501, 0x00010c8a, 0x00010cca, - 0x000010ac, 0x00002d0c, 0x0000022c, 0x0000022d, - 0x00001fbb, 0x00001f71, 0x00001e54, 0x00001e55, - 0x00000046, 0x00000066, 0x00002161, 0x00002171, - 0x00001cba, 0x000010fa, 0x0000051a, 0x0000051b, - 0x000001e8, 0x000001e9, 0x000118b4, 0x000118d4, - 0x00001f0b, 0x00001f03, 0x00001f8c, 0x020001eb, - 0x0000ab99, 0x000013c9, 0x00001e74, 0x00001e75, - 0x000003a0, 0x000003c0, 0x000010a1, 0x00002d01, - 0x00001f5d, 0x00001f55, 0x000000cc, 0x000000ec, - 0x0000041f, 0x0000043f, 0x0000aba1, 0x000013d1, - 0x00001ee4, 0x00001ee5, 0x00001f28, 0x00001f20, - 0x00001fb2, 0x02000257, 0x000000df, 0x0200018f, - 0x0000a66a, 0x0000a66b, 0x000010b3, 0x00002d13, - 0x0001e90b, 0x0001e92d, 0x00001e2c, 0x00001e2d, - 0x00001e34, 0x00001e35, 0x000004ea, 0x000004eb, - 0x0001041b, 0x00010443, 0x0000018f, 0x00000259, - 0x000001f0, 0x02000198, 0x00001e44, 0x00001e45, - 0x00002ca8, 0x00002ca9, 0x00000412, 0x00000432, - 0x000000c3, 0x000000e3, 0x0000052e, 0x0000052f, - 0x00001e52, 0x00001e53, 0x0000ab9d, 0x000013cd, - 0x00002168, 0x00002178, 0x00001f8e, 0x020001f1, - 0x00016e51, 0x00016e71, 0x000010aa, 0x00002d0a, - 0x000118ab, 0x000118cb, 0x0000038a, 0x000003af, - 0x0000aba7, 0x000013d7, 0x00000554, 0x00000584, - 0x000001cd, 0x000001ce, 0x00000193, 0x00000260, - 0x00000518, 0x00000519, 0x00001f6f, 0x00001f67, - 0x00001fac, 0x0200024b, 0x00001c91, 0x000010d1, - 0x00010426, 0x0001044e, 0x000001f4, 0x000001f5, - 0x00016e41, 0x00016e61, 0x00001e2e, 0x00001e2f, - 0x00002c2b, 0x00002c5b, 0x000004f4, 0x000004f5, - 0x00001efc, 0x00001efd, 0x0000022a, 0x0000022b, - 0x00002cd8, 0x00002cd9, 0x000003f4, 0x000003b8, - 0x00001e18, 0x00001e19, 0x000118bd, 0x000118dd, - 0x0000abb7, 0x000013e7, 0x000024c5, 0x000024df, - 0x00001e4c, 0x00001e4d, 0x000001c4, 0x000001c6, - 0x000004cd, 0x000004ce, 0x00002c84, 0x00002c85, - 0x00001ea8, 0x00001ea9, 0x000010bc, 0x00002d1c, - 0x0000ff2d, 0x0000ff4d, 0x00000394, 0x000003b4, - 0x00016e45, 0x00016e65, 0x000000ca, 0x000000ea, - 0x00000416, 0x00000436, 0x0001e91a, 0x0001e93c, - 0x00001cb8, 0x000010f8, 0x00001cb3, 0x000010f3, - 0x00001fa2, 0x0200022d, 0x0000abaf, 0x000013df, - 0x00001ca1, 0x000010e1, 0x0000010e, 0x0000010f, - 0x00016e43, 0x00016e63, 0x00002ca0, 0x00002ca1, - 0x0000ab79, 0x000013a9, 0x000004f2, 0x000004f3, - 0x00001ef2, 0x00001ef3, 0x000004ac, 0x000004ad, - 0x00000429, 0x00000449, 0x00010c9d, 0x00010cdd, - 0x0000a750, 0x0000a751, 0x0001e90d, 0x0001e92f, - 0x00001c98, 0x000010d8, 0x00010402, 0x0001042a, - 0x00001e42, 0x00001e43, 0x00000184, 0x00000185, - 0x00000154, 0x00000155, 0x0000ab84, 0x000013b4, - 0x00001e80, 0x00001e81, 0x00001c92, 0x000010d2, - 0x0001e90c, 0x0001e92e, 0x00000392, 0x000003b2, - 0x00001f2f, 0x00001f27, 0x000000d4, 0x000000f4, - 0x00000050, 0x00000070, 0x0001041a, 0x00010442, - 0x00000156, 0x00000157, 0x00001fea, 0x00001f7a, - 0x00001faa, 0x02000245, 0x00001cb5, 0x000010f5, - 0x0000039b, 0x000003bb, 0x0000a738, 0x0000a739, - 0x00000100, 0x00000101, 0x0000042d, 0x0000044d, - 0x0001040a, 0x00010432, 0x00001f3a, 0x00001f32, - 0x00001efa, 0x00001efb, 0x00000232, 0x00000233, - 0x00002c7e, 0x0000023f, 0x000001ec, 0x000001ed, - 0x00002c69, 0x00002c6a, 0x00010412, 0x0001043a, - 0x00001ca7, 0x000010e7, 0x0000047c, 0x0000047d, - 0x00001e4a, 0x00001e4b, 0x00000182, 0x00000183, - 0x00000423, 0x00000443, 0x000000c7, 0x000000e7, - 0x00000526, 0x00000527, 0x00001f09, 0x00001f01, - 0x000118b6, 0x000118d6, 0x00001f52, 0x030001bb, - 0x000004fc, 0x000004fd, 0x000000d2, 0x000000f2, - 0x0000018b, 0x0000018c, 0x000001b1, 0x0000028a, - 0x00002cce, 0x00002ccf, 0x00001e4e, 0x00001e4f, - 0x00001f18, 0x00001f10, 0x00010410, 0x00010438, - 0x00010400, 0x00010428, 0x0000048a, 0x0000048b, - 0x000000db, 0x000000fb, 0x00002ca2, 0x00002ca3, - 0x00002c1e, 0x00002c4e, 0x00001ea4, 0x00001ea5, - 0x00001eca, 0x00001ecb, 0x000004b2, 0x000004b3, - 0x0000039c, 0x000003bc, 0x000003de, 0x000003df, - 0x00001e88, 0x00001e89, 0x0000abbc, 0x000013ec, - 0x0000ff2c, 0x0000ff4c, 0x00002cbe, 0x00002cbf, - 0x00001e7a, 0x00001e7b, 0x000001bc, 0x000001bd, - 0x00002ce2, 0x00002ce3, 0x00000417, 0x00000437, - 0x0000a7b3, 0x0000ab53, 0x00001c85, 0x00000442, - 0x0001e920, 0x0001e942, 0x000118ac, 0x000118cc, - 0x0000abbe, 0x000013ee, 0x0000046a, 0x0000046b, - 0x00001c9d, 0x000010dd, 0x000004c7, 0x000004c8, - 0x00002ced, 0x00002cee, 0x0000048c, 0x0000048d, - 0x00001ff6, 0x020002a7, 0x000010b4, 0x00002d14, - 0x00001f3f, 0x00001f37, 0x00001f5b, 0x00001f53, - 0x000024b9, 0x000024d3, 0x000001ca, 0x000001cc, - 0x000004b8, 0x000004b9, 0x000004fa, 0x000004fb, - 0x00000106, 0x00000107, 0x0000ff2a, 0x0000ff4a, - 0x000001a7, 0x000001a8, 0x000001f2, 0x000001f3, - 0x000000dc, 0x000000fc, 0x0000011e, 0x0000011f, - 0x0000212b, 0x000000e5, 0x0000a688, 0x0000a689, - 0x000013fc, 0x000013f4, 0x00010ca8, 0x00010ce8, - 0x0001e907, 0x0001e929, 0x00000181, 0x00000253, - 0x00001eb8, 0x00001eb9, 0x00002183, 0x00002184, - 0x00001ee8, 0x00001ee9, 0x0000039a, 0x000003ba, - 0x0000a72e, 0x0000a72f, 0x0000054c, 0x0000057c, - 0x000118aa, 0x000118ca, 0x0000a7b1, 0x00000287, - 0x00001cbd, 0x000010fd, 0x00000248, 0x00000249, - 0x00001e38, 0x00001e39, 0x0000a79c, 0x0000a79d, - 0x0000ab7d, 0x000013ad, 0x0000049c, 0x0000049d, - 0x000118bb, 0x000118db, 0x000010af, 0x00002d0f, - 0x0001e916, 0x0001e938, 0x00002cf2, 0x00002cf3, - 0x000001f8, 0x000001f9, 0x0000023a, 0x00002c65, - 0x00000587, 0x020001a3, 0x000003ec, 0x000003ed, - 0x0000a74a, 0x0000a74b, 0x00002c21, 0x00002c51, - 0x0000a640, 0x0000a641, 0x0000ab72, 0x000013a2, - 0x0000052a, 0x0000052b, 0x0000018a, 0x00000257, - 0x000024bd, 0x000024d7, 0x00010cb0, 0x00010cf0, - 0x0000a746, 0x0000a747, 0x00001c9f, 0x000010df, - 0x000003fd, 0x0000037b, 0x0000ab71, 0x000013a1, - 0x0000047a, 0x0000047b, 0x000000da, 0x000000fa, - 0x000001b7, 0x00000292, 0x0001e901, 0x0001e923, - 0x00001f9f, 0x02000224, 0x00001ec4, 0x00001ec5, - 0x0000ab9c, 0x000013cc, 0x00002166, 0x00002176, - 0x00001e50, 0x00001e51, 0x00010caa, 0x00010cea, - 0x0000aba2, 0x000013d2, 0x00002c63, 0x00001d7d, - 0x0000ab7e, 0x000013ae, 0x0000abbf, 0x000013ef, - 0x00001f39, 0x00001f31, 0x00000536, 0x00000566, - 0x00001f9d, 0x0200021e, 0x0000a64c, 0x0000a64d, - 0x00000057, 0x00000077, 0x0000012c, 0x0000012d, - 0x00001cbe, 0x000010fe, 0x00000145, 0x00000146, - 0x000013fa, 0x000013f2, 0x0000019c, 0x0000026f, - 0x00016e49, 0x00016e69, 0x0000ab92, 0x000013c2, - 0x00002169, 0x00002179, 0x0001e903, 0x0001e925, - 0x0001e906, 0x0001e928, 0x0000ab9f, 0x000013cf, - 0x0000abb0, 0x000013e0, 0x0000024a, 0x0000024b, - 0x0000019d, 0x00000272, 0x00000413, 0x00000433, - 0x00002cc8, 0x00002cc9, 0x00001e94, 0x00001e95, - 0x000010c0, 0x00002d20, 0x00000407, 0x00000457, - 0x0000abb8, 0x000013e8, 0x0000a752, 0x0000a753, - 0x0000010a, 0x0000010b, 0x000004c3, 0x000004c4, - 0x00002c18, 0x00002c48, 0x000003a9, 0x000003c9, - 0x00016e4c, 0x00016e6c, 0x0000024e, 0x0000024f, - 0x000001c7, 0x000001c9, 0x000003aa, 0x000003ca, - 0x0000005a, 0x0000007a, 0x000003f1, 0x000003c1, - 0x00001f94, 0x02000203, 0x0000ab74, 0x000013a4, - 0x0000051e, 0x0000051f, 0x0000a77b, 0x0000a77c, - 0x0001e919, 0x0001e93b, 0x0000ff21, 0x0000ff41, - 0x00001ebe, 0x00001ebf, 0x00001eac, 0x00001ead, - 0x0000ff32, 0x0000ff52, 0x00001c84, 0x00000442, - 0x0000abb2, 0x000013e2, 0x00010c8e, 0x00010cce, - 0x000001f1, 0x000001f3, 0x00000508, 0x00000509, - 0x00002cc6, 0x00002cc7, 0x00010c83, 0x00010cc3, - 0x00001fbe, 0x000003b9, 0x000003ab, 0x000003cb, - 0x000003fa, 0x000003fb, 0x0000a76c, 0x0000a76d, - 0x00000141, 0x00000142, 0x00016e52, 0x00016e72, - 0x00002c16, 0x00002c46, 0x000104b7, 0x000104df, - 0x00001f0e, 0x00001f06, 0x0001e909, 0x0001e92b, - 0x00016e5e, 0x00016e7e, 0x00001f6b, 0x00001f63, - 0x0000a790, 0x0000a791, 0x0001041d, 0x00010445, - 0x000104cc, 0x000104f4, 0x0000ab7c, 0x000013ac, - 0x00001e5e, 0x00001e5f, 0x00001fae, 0x02000251, - 0x000001af, 0x000001b0, 0x00002c86, 0x00002c87, - 0x0000a798, 0x0000a799, 0x00001ea6, 0x00001ea7, - 0x0001041c, 0x00010444, 0x00001ecc, 0x00001ecd, - 0x0000a728, 0x0000a729, 0x00001efe, 0x00001eff, - 0x000010ba, 0x00002d1a, 0x000001f7, 0x000001bf, - 0x00001e10, 0x00001e11, 0x00002c20, 0x00002c50, - 0x00000494, 0x00000495, 0x00001e1c, 0x00001e1d, - 0x000104bf, 0x000104e7, 0x0000a754, 0x0000a755, - 0x000024be, 0x000024d8, 0x000104cf, 0x000104f7, - 0x0000aba3, 0x000013d3, 0x00000198, 0x00000199, - 0x00001f2d, 0x00001f25, 0x00000152, 0x00000153, - 0x00000187, 0x00000188, 0x0000a748, 0x0000a749, - 0x0000a792, 0x0000a793, 0x0000010c, 0x0000010d, - 0x00001cb0, 0x000010f0, 0x000000c1, 0x000000e1, - 0x00001fa3, 0x02000230, 0x0001e91d, 0x0001e93f, - 0x00001f95, 0x02000206, 0x00000244, 0x00000289, - 0x00002c96, 0x00002c97, 0x0000a644, 0x0000a645, - 0x00000399, 0x000003b9, 0x000104d0, 0x000104f8, - 0x0000a726, 0x0000a727, 0x000000c4, 0x000000e4, - 0x000024c0, 0x000024da, 0x00010405, 0x0001042d, - 0x00002cc2, 0x00002cc3, 0x00001cab, 0x000010eb, - 0x00010ca9, 0x00010ce9, 0x000010b8, 0x00002d18, - 0x0001041e, 0x00010446, 0x0000a75c, 0x0000a75d, - 0x00000204, 0x00000205, 0x000003f9, 0x000003f2, - 0x0000ab70, 0x000013a0, 0x0000a7a4, 0x0000a7a5 + 0x000004a2, 0x000004a3, 0x00000474, 0x00000475, + 0x000004ec, 0x000004ed, 0x0000a7ab, 0x0000025c, + 0x0000a796, 0x0000a797, 0x0000a64c, 0x0000a64d, + 0x0000abb0, 0x000013e0, 0x000118a0, 0x000118c0, + 0x00001f2b, 0x00001f23, 0x0000a766, 0x0000a767, + 0x00010cac, 0x00010cec, 0x0000ff38, 0x0000ff58, + 0x0000abad, 0x000013dd, 0x00002161, 0x00002171, + 0x00010cae, 0x00010cee, 0x00000200, 0x00000201, + 0x00001f69, 0x00001f61, 0x00001fc3, 0x0200026d, + 0x00010417, 0x0001043f, 0x00001e0a, 0x00001e0b, + 0x00001e08, 0x00001e09, 0x00000415, 0x00000435, + 0x000001de, 0x000001df, 0x00001e3e, 0x00001e3f, + 0x00000545, 0x00000575, 0x00001e96, 0x020001a6, + 0x00016e4f, 0x00016e6f, 0x0000053f, 0x0000056f, + 0x00001e58, 0x00001e59, 0x00001e30, 0x00001e31, + 0x00002cd6, 0x00002cd7, 0x00002c98, 0x00002c99, + 0x00000556, 0x00000586, 0x00002c2e, 0x00002c5e, + 0x000000df, 0x0200018f, 0x0000a72c, 0x0000a72d, + 0x00002c7f, 0x00000240, 0x00002c20, 0x00002c50, + 0x0000053a, 0x0000056a, 0x000003e0, 0x000003e1, + 0x00001e9b, 0x00001e61, 0x0000abbe, 0x000013ee, + 0x00001edc, 0x00001edd, 0x0000a696, 0x0000a697, + 0x0000216f, 0x0000217f, 0x00000398, 0x000003b8, + 0x00000245, 0x0000028c, 0x00010c80, 0x00010cc0, + 0x000001b7, 0x00000292, 0x00001cb6, 0x000010f6, + 0x0001e910, 0x0001e932, 0x0001e902, 0x0001e924, + 0x00002c02, 0x00002c32, 0x00001f3b, 0x00001f33, + 0x00002c09, 0x00002c39, 0x0000a7a4, 0x0000a7a5, + 0x00000132, 0x00000133, 0x00001fa2, 0x0200022d, + 0x00001f6c, 0x00001f64, 0x00001f2e, 0x00001f26, + 0x000000ce, 0x000000ee, 0x00000110, 0x00000111, + 0x00001e8a, 0x00001e8b, 0x000000d3, 0x000000f3, + 0x00002c05, 0x00002c35, 0x00000524, 0x00000525, + 0x00002ca6, 0x00002ca7, 0x0000fb00, 0x020002b1, + 0x0000042d, 0x0000044d, 0x000004f6, 0x000004f7, + 0x000001a0, 0x000001a1, 0x0000048a, 0x0000048b, + 0x00001cb4, 0x000010f4, 0x00002c72, 0x00002c73, + 0x00010c94, 0x00010cd4, 0x0000a7ac, 0x00000261, + 0x0000abb4, 0x000013e4, 0x0000042e, 0x0000044e, + 0x000003f7, 0x000003f8, 0x000104ce, 0x000104f6, + 0x0000a72e, 0x0000a72f, 0x0000a732, 0x0000a733, + 0x0000ff39, 0x0000ff59, 0x000001f7, 0x000001bf, + 0x0000ab79, 0x000013a9, 0x000010a5, 0x00002d05, + 0x0000aba5, 0x000013d5, 0x00000202, 0x00000203, + 0x00016e52, 0x00016e72, 0x000010a3, 0x00002d03, + 0x0000053b, 0x0000056b, 0x00000226, 0x00000227, + 0x000001e2, 0x000001e3, 0x000001bc, 0x000001bd, + 0x00001ff8, 0x00001f78, 0x00001fa3, 0x02000230, + 0x0000011c, 0x0000011d, 0x00001eca, 0x00001ecb, + 0x00002c00, 0x00002c30, 0x00001e3a, 0x00001e3b, + 0x000000d5, 0x000000f5, 0x000118a8, 0x000118c8, + 0x00000528, 0x00000529, 0x00001eec, 0x00001eed, + 0x00002cf2, 0x00002cf3, 0x000004d0, 0x000004d1, + 0x00002c8e, 0x00002c8f, 0x0000fb13, 0x020002c8, + 0x0000050e, 0x0000050f, 0x00001e7e, 0x00001e7f, + 0x000004a0, 0x000004a1, 0x0000ab9d, 0x000013cd, + 0x0000ab8e, 0x000013be, 0x0000a640, 0x0000a641, + 0x0000038e, 0x000003cd, 0x0000a642, 0x0000a643, + 0x00001ca3, 0x000010e3, 0x00000128, 0x00000129, + 0x000010a8, 0x00002d08, 0x0000a654, 0x0000a655, + 0x00000246, 0x00000247, 0x00002c21, 0x00002c51, + 0x00010c89, 0x00010cc9, 0x000010af, 0x00002d0f, + 0x0000054f, 0x0000057f, 0x00000218, 0x00000219, + 0x00016e59, 0x00016e79, 0x00001fb8, 0x00001fb0, + 0x00000164, 0x00000165, 0x00001f4d, 0x00001f45, + 0x00001f18, 0x00001f10, 0x0000054b, 0x0000057b, + 0x00016e47, 0x00016e67, 0x000118a6, 0x000118c6, + 0x0000ab81, 0x000013b1, 0x00000134, 0x00000135, + 0x00016e46, 0x00016e66, 0x00010405, 0x0001042d, + 0x00002c06, 0x00002c36, 0x00001fab, 0x02000248, + 0x00002cc4, 0x00002cc5, 0x00001c9b, 0x000010db, + 0x0000a750, 0x0000a751, 0x00000516, 0x00000517, + 0x0000041b, 0x0000043b, 0x000004ac, 0x000004ad, + 0x0000a784, 0x0000a785, 0x0001041f, 0x00010447, + 0x00000406, 0x00000456, 0x000003d8, 0x000003d9, + 0x00002167, 0x00002177, 0x00000050, 0x00000070, + 0x00000553, 0x00000583, 0x00002c67, 0x00002c68, + 0x0000a658, 0x0000a659, 0x0000a764, 0x0000a765, + 0x00010ca9, 0x00010ce9, 0x00002183, 0x00002184, + 0x000010a4, 0x00002d04, 0x000001d5, 0x000001d6, + 0x00000106, 0x00000107, 0x00001e78, 0x00001e79, + 0x00001fbb, 0x00001f71, 0x00002c0e, 0x00002c3e, + 0x00001ca1, 0x000010e1, 0x00001fba, 0x00001f70, + 0x0000010a, 0x0000010b, 0x0001e91c, 0x0001e93e, + 0x00010419, 0x00010441, 0x000118bd, 0x000118dd, + 0x00001caf, 0x000010ef, 0x0001e909, 0x0001e92b, + 0x000001f8, 0x000001f9, 0x00000043, 0x00000063, + 0x00002c29, 0x00002c59, 0x00002cd0, 0x00002cd1, + 0x00000520, 0x00000521, 0x0000a7b1, 0x00000287, + 0x0000a780, 0x0000a781, 0x00001cab, 0x000010eb, + 0x000004ba, 0x000004bb, 0x000104b4, 0x000104dc, + 0x00002c7e, 0x0000023f, 0x00002cb8, 0x00002cb9, + 0x000000ca, 0x000000ea, 0x0000a738, 0x0000a739, + 0x00001eda, 0x00001edb, 0x00001f49, 0x00001f41, + 0x000003f4, 0x000003b8, 0x0000a664, 0x0000a665, + 0x0000a758, 0x0000a759, 0x0000ff2c, 0x0000ff4c, + 0x00001eb8, 0x00001eb9, 0x00001c92, 0x000010d2, + 0x00000535, 0x00000565, 0x0000ff29, 0x0000ff49, + 0x00000166, 0x00000167, 0x000024c3, 0x000024dd, + 0x00010c8d, 0x00010ccd, 0x00002c63, 0x00001d7d, + 0x0000ab8d, 0x000013bd, 0x00001fda, 0x00001f76, + 0x00001fa7, 0x0200023c, 0x0000012a, 0x0000012b, + 0x00001f2c, 0x00001f24, 0x00000041, 0x00000061, + 0x00001ed0, 0x00001ed1, 0x00001c83, 0x00000441, + 0x0000ab9b, 0x000013cb, 0x00002ceb, 0x00002cec, + 0x00002cd4, 0x00002cd5, 0x00002cbc, 0x00002cbd, + 0x00000508, 0x00000509, 0x000104b2, 0x000104da, + 0x00000492, 0x00000493, 0x00002cb4, 0x00002cb5, + 0x00010409, 0x00010431, 0x00000537, 0x00000567, + 0x0000a7c4, 0x0000a794, 0x00001ca0, 0x000010e0, + 0x0000a752, 0x0000a753, 0x00000466, 0x00000467, + 0x00001e04, 0x00001e05, 0x0000041f, 0x0000043f, + 0x0000abaf, 0x000013df, 0x00000392, 0x000003b2, + 0x0000a644, 0x0000a645, 0x00001fb6, 0x02000260, + 0x0000abae, 0x000013de, 0x00000210, 0x00000211, + 0x0000ab96, 0x000013c6, 0x00010c82, 0x00010cc2, + 0x000003f9, 0x000003f2, 0x00001e0c, 0x00001e0d, + 0x0001041e, 0x00010446, 0x00000058, 0x00000078, + 0x00001f4b, 0x00001f43, 0x00001f8b, 0x020001e8, + 0x000010a6, 0x00002d06, 0x0000018a, 0x00000257, + 0x00001e18, 0x00001e19, 0x00000120, 0x00000121, + 0x00001e20, 0x00001e21, 0x00000422, 0x00000442, + 0x0000a7b3, 0x0000ab53, 0x0001e904, 0x0001e926, + 0x00001e46, 0x00001e47, 0x00000170, 0x00000171, + 0x00000055, 0x00000075, 0x00002162, 0x00002172, + 0x0000048c, 0x0000048d, 0x00001f9e, 0x02000221, + 0x0000ff3a, 0x0000ff5a, 0x00002c18, 0x00002c48, + 0x000004d8, 0x000004d9, 0x00016e5b, 0x00016e7b, + 0x00000472, 0x00000473, 0x0000a78b, 0x0000a78c, + 0x00000404, 0x00000454, 0x000104c0, 0x000104e8, + 0x000013fb, 0x000013f3, 0x00010420, 0x00010448, + 0x000104cc, 0x000104f4, 0x00000555, 0x00000585, + 0x0000a65a, 0x0000a65b, 0x000003b0, 0x0300019f, + 0x00000162, 0x00000163, 0x0000012c, 0x0000012d, + 0x0000216a, 0x0000217a, 0x00010422, 0x0001044a, + 0x0000ab7d, 0x000013ad, 0x00001ff2, 0x0200029e, + 0x00000397, 0x000003b7, 0x00010c85, 0x00010cc5, + 0x00001f59, 0x00001f51, 0x00001f1c, 0x00001f14, + 0x00001ef8, 0x00001ef9, 0x00016e45, 0x00016e65, + 0x000104cb, 0x000104f3, 0x00001fd2, 0x0300027d, + 0x00001ef6, 0x00001ef7, 0x0001e901, 0x0001e923, + 0x000000de, 0x000000fe, 0x00010406, 0x0001042e, + 0x000000c8, 0x000000e8, 0x00002cc8, 0x00002cc9, + 0x00001c9c, 0x000010dc, 0x0000054e, 0x0000057e, + 0x00002c28, 0x00002c58, 0x000004e4, 0x000004e5, + 0x0000041c, 0x0000043c, 0x0000047a, 0x0000047b, + 0x00001f0e, 0x00001f06, 0x00000410, 0x00000430, + 0x0000a68e, 0x0000a68f, 0x000003a6, 0x000003c6, + 0x0000abb6, 0x000013e6, 0x0000216e, 0x0000217e, + 0x0000a690, 0x0000a691, 0x0000a75e, 0x0000a75f, + 0x0000a7a2, 0x0000a7a3, 0x000024b9, 0x000024d3, + 0x000010be, 0x00002d1e, 0x00010c99, 0x00010cd9, + 0x0000040d, 0x0000045d, 0x00010c9e, 0x00010cde, + 0x00010c97, 0x00010cd7, 0x00010413, 0x0001043b, + 0x00001f93, 0x02000200, 0x00000056, 0x00000076, + 0x00010415, 0x0001043d, 0x00000214, 0x00000215, + 0x00000149, 0x02000195, 0x000001d7, 0x000001d8, + 0x00000179, 0x0000017a, 0x00000141, 0x00000142, + 0x00001eee, 0x00001eef, 0x000010b5, 0x00002d15, + 0x00001e82, 0x00001e83, 0x00000500, 0x00000501, + 0x0001e91d, 0x0001e93f, 0x00002c9e, 0x00002c9f, + 0x00000136, 0x00000137, 0x00002c84, 0x00002c85, + 0x00001e00, 0x00001e01, 0x00002caa, 0x00002cab, + 0x00002c6e, 0x00000271, 0x000004bc, 0x000004bd, + 0x0000041e, 0x0000043e, 0x000104bb, 0x000104e3, + 0x0000216d, 0x0000217d, 0x00001f94, 0x02000203, + 0x0000ab7e, 0x000013ae, 0x00001c96, 0x000010d6, + 0x000104c1, 0x000104e9, 0x000003ea, 0x000003eb, + 0x000000db, 0x000000fb, 0x00010c96, 0x00010cd6, + 0x000001f1, 0x000001f3, 0x0000aba3, 0x000013d3, + 0x00010ca7, 0x00010ce7, 0x0000ff22, 0x0000ff42, + 0x000003d5, 0x000003c6, 0x00000403, 0x00000453, + 0x0000ab76, 0x000013a6, 0x00000502, 0x00000503, + 0x00000220, 0x0000019e, 0x00001fb9, 0x00001fb1, + 0x00001f92, 0x020001fd, 0x00001f3e, 0x00001f36, + 0x00001f0b, 0x00001f03, 0x00001ed4, 0x00001ed5, + 0x00002c0c, 0x00002c3c, 0x00001e6a, 0x00001e6b, + 0x00001e34, 0x00001e35, 0x00002cde, 0x00002cdf, + 0x0001e91b, 0x0001e93d, 0x00000108, 0x00000109, + 0x00000054, 0x00000074, 0x00001e62, 0x00001e63, + 0x0000ab87, 0x000013b7, 0x00002c82, 0x00002c83, + 0x00000044, 0x00000064, 0x0000a7b2, 0x0000029d, + 0x0001e920, 0x0001e942, 0x0000a746, 0x0000a747, + 0x0000046a, 0x0000046b, 0x00001fea, 0x00001f7a, + 0x0000aba0, 0x000013d0, 0x0000019f, 0x00000275, + 0x000024bb, 0x000024d5, 0x0000ab84, 0x000013b4, + 0x00001cb8, 0x000010f8, 0x00001e32, 0x00001e33, + 0x00010423, 0x0001044b, 0x00010ca3, 0x00010ce3, + 0x00001ca6, 0x000010e6, 0x0001e906, 0x0001e928, + 0x00000143, 0x00000144, 0x0000018f, 0x00000259, + 0x0000020a, 0x0000020b, 0x00002c69, 0x00002c6a, + 0x00001fb7, 0x03000263, 0x00001e70, 0x00001e71, + 0x00001fe7, 0x0300029a, 0x00000230, 0x00000231, + 0x00001e12, 0x00001e13, 0x00000046, 0x00000066, + 0x00001e52, 0x00001e53, 0x0000ff30, 0x0000ff50, + 0x000001af, 0x000001b0, 0x00001f48, 0x00001f40, + 0x000000c7, 0x000000e7, 0x00000181, 0x00000253, + 0x0000051e, 0x0000051f, 0x000004c1, 0x000004c2, + 0x00002c0d, 0x00002c3d, 0x00000546, 0x00000576, + 0x0001e915, 0x0001e937, 0x000004dc, 0x000004dd, + 0x00002c6b, 0x00002c6c, 0x00000468, 0x00000469, + 0x000104c3, 0x000104eb, 0x0000050a, 0x0000050b, + 0x000003d6, 0x000003c0, 0x0000abbc, 0x000013ec, + 0x00001cb9, 0x000010f9, 0x00010ca2, 0x00010ce2, + 0x00001e84, 0x00001e85, 0x000003aa, 0x000003ca, + 0x0000a64a, 0x0000a64b, 0x00000413, 0x00000433, + 0x00000541, 0x00000571, 0x000010b3, 0x00002d13, + 0x0000ab97, 0x000013c7, 0x00010cad, 0x00010ced, + 0x0000aba1, 0x000013d1, 0x0000ab85, 0x000013b5, + 0x00001e80, 0x00001e81, 0x00001f56, 0x030001c3, + 0x00001fc6, 0x02000273, 0x0000ab93, 0x000013c3, + 0x000001db, 0x000001dc, 0x000118bb, 0x000118db, + 0x00001f90, 0x020001f7, 0x00001e2c, 0x00001e2d, + 0x00001ec0, 0x00001ec1, 0x00001e98, 0x020001ac, + 0x00001e5a, 0x00001e5b, 0x000118bc, 0x000118dc, + 0x0001e91e, 0x0001e940, 0x00002c96, 0x00002c97, + 0x00000420, 0x00000440, 0x00002c2c, 0x00002c5c, + 0x000004fe, 0x000004ff, 0x000004b2, 0x000004b3, + 0x00010c84, 0x00010cc4, 0x0000aba7, 0x000013d7, + 0x000004b8, 0x000004b9, 0x000003de, 0x000003df, + 0x0001040b, 0x00010433, 0x000118b1, 0x000118d1, + 0x000118b7, 0x000118d7, 0x0000a694, 0x0000a695, + 0x000024c7, 0x000024e1, 0x00002132, 0x0000214e, + 0x000104bf, 0x000104e7, 0x000010aa, 0x00002d0a, + 0x00000042, 0x00000062, 0x00010c88, 0x00010cc8, + 0x0000aba6, 0x000013d6, 0x00001f54, 0x030001bf, + 0x00010c87, 0x00010cc7, 0x00001f85, 0x020001d6, + 0x00001c86, 0x0000044a, 0x00000243, 0x00000180, + 0x0000016e, 0x0000016f, 0x00000386, 0x000003ac, + 0x000001b3, 0x000001b4, 0x00000178, 0x000000ff, + 0x00001f9d, 0x0200021e, 0x0000011a, 0x0000011b, + 0x000000dd, 0x000000fd, 0x000003cf, 0x000003d7, + 0x0000015c, 0x0000015d, 0x000104b0, 0x000104d8, + 0x00002ce0, 0x00002ce1, 0x0000ab70, 0x000013a0, + 0x00010411, 0x00010439, 0x000004f2, 0x000004f3, + 0x00010404, 0x0001042c, 0x00010416, 0x0001043e, + 0x00000542, 0x00000572, 0x00001f6d, 0x00001f65, + 0x00001e74, 0x00001e75, 0x00000496, 0x00000497, + 0x0000a748, 0x0000a749, 0x0000042c, 0x0000044c, + 0x0000aba8, 0x000013d8, 0x0000a66a, 0x0000a66b, + 0x00010ca8, 0x00010ce8, 0x00001cb2, 0x000010f2, + 0x000024cb, 0x000024e5, 0x000004c5, 0x000004c6, + 0x000001a6, 0x00000280, 0x0000abb3, 0x000013e3, + 0x0000abb1, 0x000013e1, 0x0001e90e, 0x0001e930, + 0x000001c5, 0x000001c6, 0x000010a2, 0x00002d02, + 0x0001e900, 0x0001e922, 0x00000224, 0x00000225, + 0x00001f97, 0x0200020c, 0x00010c8f, 0x00010ccf, + 0x00000184, 0x00000185, 0x00001f1d, 0x00001f15, + 0x0000011e, 0x0000011f, 0x00001ea2, 0x00001ea3, + 0x000104b9, 0x000104e1, 0x00001e38, 0x00001e39, + 0x00000426, 0x00000446, 0x0000039b, 0x000003bb, + 0x00000190, 0x0000025b, 0x00000540, 0x00000570, + 0x00010402, 0x0001042a, 0x00002cba, 0x00002cbb, + 0x00002cac, 0x00002cad, 0x00002c08, 0x00002c38, + 0x00001c9f, 0x000010df, 0x00000464, 0x00000465, + 0x00000421, 0x00000441, 0x00001f9c, 0x0200021b, + 0x00002160, 0x00002170, 0x0000a79a, 0x0000a79b, + 0x0000a75a, 0x0000a75b, 0x00000390, 0x0300019b, + 0x0000ab74, 0x000013a4, 0x0000abba, 0x000013ea, + 0x0000fb06, 0x020002c5, 0x0000a64e, 0x0000a64f, + 0x0000a76a, 0x0000a76b, 0x0000054d, 0x0000057d, + 0x000010a1, 0x00002d01, 0x00000208, 0x00000209, + 0x000000c6, 0x000000e6, 0x0000ab8c, 0x000013bc, + 0x0000024e, 0x0000024f, 0x00010ca6, 0x00010ce6, + 0x00001f80, 0x020001c7, 0x0000ff26, 0x0000ff46, + 0x00001f1b, 0x00001f13, 0x00001ee2, 0x00001ee3, + 0x00001ebe, 0x00001ebf, 0x0000019c, 0x0000026f, + 0x00000116, 0x00000117, 0x00001f96, 0x02000209, + 0x00001e06, 0x00001e07, 0x00001e92, 0x00001e93, + 0x00001fe3, 0x03000290, 0x00001fe4, 0x02000294, + 0x00002cc6, 0x00002cc7, 0x00001c99, 0x000010d9, + 0x00000552, 0x00000582, 0x00000514, 0x00000515, + 0x000004e8, 0x000004e9, 0x000004aa, 0x000004ab, + 0x000004c9, 0x000004ca, 0x0000a7a8, 0x0000a7a9, + 0x00000424, 0x00000444, 0x00010c91, 0x00010cd1, + 0x000003a0, 0x000003c0, 0x000104d2, 0x000104fa, + 0x0000ab7c, 0x000013ac, 0x0000a768, 0x0000a769, + 0x00010c9d, 0x00010cdd, 0x0000a7a6, 0x0000a7a7, + 0x000004cb, 0x000004cc, 0x0000a7ad, 0x0000026c, + 0x00002c2d, 0x00002c5d, 0x0000041d, 0x0000043d, + 0x00000241, 0x00000242, 0x00001f89, 0x020001e2, + 0x00000216, 0x00000217, 0x00001f8f, 0x020001f4, + 0x0000ab9f, 0x000013cf, 0x00001f88, 0x020001df, + 0x000010ac, 0x00002d0c, 0x00016e4b, 0x00016e6b, + 0x00001c87, 0x00000463, 0x0001e913, 0x0001e935, + 0x0000013f, 0x00000140, 0x0001e907, 0x0001e929, + 0x000000c1, 0x000000e1, 0x0000aba4, 0x000013d4, + 0x00001e24, 0x00001e25, 0x00002cce, 0x00002ccf, + 0x000104cd, 0x000104f5, 0x00002c64, 0x0000027d, + 0x00000522, 0x00000523, 0x00000051, 0x00000071, + 0x000004f4, 0x000004f5, 0x00000198, 0x00000199, + 0x0000a76c, 0x0000a76d, 0x00000416, 0x00000436, + 0x00001cbd, 0x000010fd, 0x00002166, 0x00002176, + 0x00001e1c, 0x00001e1d, 0x00010c90, 0x00010cd0, + 0x00001ea8, 0x00001ea9, 0x0000a662, 0x0000a663, + 0x0000a7c9, 0x0000a7ca, 0x00002c27, 0x00002c57, + 0x00010ca5, 0x00010ce5, 0x000118aa, 0x000118ca, + 0x00010410, 0x00010438, 0x000010a0, 0x00002d00, + 0x00001c88, 0x0000a64b, 0x00001f52, 0x030001bb, + 0x00001fe2, 0x0300028c, 0x00000244, 0x00000289, + 0x000104c9, 0x000104f1, 0x00001fd8, 0x00001fd0, + 0x0000abaa, 0x000013da, 0x00001f6e, 0x00001f66, + 0x00001f38, 0x00001f30, 0x00000399, 0x000003b9, + 0x00001eaa, 0x00001eab, 0x000000dc, 0x000000fc, + 0x00000405, 0x00000455, 0x000000d8, 0x000000f8, + 0x00001faa, 0x02000245, 0x00016e56, 0x00016e76, + 0x0000052c, 0x0000052d, 0x00001e2a, 0x00001e2b, + 0x00000059, 0x00000079, 0x000001a4, 0x000001a5, + 0x0000a75c, 0x0000a75d, 0x00001ee6, 0x00001ee7, + 0x0000a7ba, 0x0000a7bb, 0x0000fb15, 0x020002ce, + 0x0000a728, 0x0000a729, 0x00001f1a, 0x00001f12, + 0x0000ab80, 0x000013b0, 0x000003fa, 0x000003fb, + 0x00000417, 0x00000437, 0x0000023d, 0x0000019a, + 0x0000a648, 0x0000a649, 0x00000394, 0x000003b4, + 0x00001e42, 0x00001e43, 0x00001ca7, 0x000010e7, + 0x00000587, 0x020001a3, 0x0001040a, 0x00010432, + 0x0000ab71, 0x000013a1, 0x000000c0, 0x000000e0, + 0x00000189, 0x00000256, 0x00010412, 0x0001043a, + 0x0000022a, 0x0000022b, 0x000001f2, 0x000001f3, + 0x000001ae, 0x00000288, 0x00000182, 0x00000183, + 0x00001e48, 0x00001e49, 0x00000124, 0x00000125, + 0x000001c4, 0x000001c6, 0x00001e64, 0x00001e65, + 0x0001e91f, 0x0001e941, 0x0000042f, 0x0000044f, + 0x00001eb0, 0x00001eb1, 0x00000049, 0x00000069, + 0x00001cad, 0x000010ed, 0x00001ec8, 0x00001ec9, + 0x00002cbe, 0x00002cbf, 0x00002c80, 0x00002c81, + 0x0000a740, 0x0000a741, 0x00002c1e, 0x00002c4e, + 0x000004da, 0x000004db, 0x00000539, 0x00000569, + 0x0000046c, 0x0000046d, 0x00010401, 0x00010429, + 0x0000ff21, 0x0000ff41, 0x0000a79c, 0x0000a79d, + 0x0000a736, 0x0000a737, 0x00002c07, 0x00002c37, + 0x000104ba, 0x000104e2, 0x00001f82, 0x020001cd, + 0x0000aba2, 0x000013d2, 0x0000ab98, 0x000013c8, + 0x00001fcc, 0x0200027a, 0x000010c2, 0x00002d22, + 0x000004c3, 0x000004c4, 0x000024cc, 0x000024e6, + 0x000003ff, 0x0000037d, 0x0000024c, 0x0000024d, + 0x00010caa, 0x00010cea, 0x00001f84, 0x020001d3, + 0x00001cb0, 0x000010f0, 0x00001f19, 0x00001f11, + 0x00001ee4, 0x00001ee5, 0x00001e02, 0x00001e03, + 0x00002cae, 0x00002caf, 0x00000114, 0x00000115, + 0x0000abb5, 0x000013e5, 0x00000100, 0x00000101, + 0x00001e7a, 0x00001e7b, 0x00010407, 0x0001042f, + 0x00002c01, 0x00002c31, 0x00002c04, 0x00002c34, + 0x00002c90, 0x00002c91, 0x0000054c, 0x0000057c, + 0x00002c2a, 0x00002c5a, 0x000004e2, 0x000004e3, + 0x000004b6, 0x000004b7, 0x00000478, 0x00000479, + 0x0000a7c2, 0x0000a7c3, 0x0000040e, 0x0000045e, + 0x00000370, 0x00000371, 0x000003a4, 0x000003c4, + 0x00001f9a, 0x02000215, 0x0000a7c6, 0x00001d8e, + 0x0000a692, 0x0000a693, 0x00000139, 0x0000013a, + 0x0000a680, 0x0000a681, 0x0000212b, 0x000000e5, + 0x000118a7, 0x000118c7, 0x00001c90, 0x000010d0, + 0x000104b1, 0x000104d9, 0x000024c8, 0x000024e2, + 0x00001ffb, 0x00001f7d, 0x00001e44, 0x00001e45, + 0x000010c1, 0x00002d21, 0x0000ab8f, 0x000013bf, + 0x0000ff2b, 0x0000ff4b, 0x0000021e, 0x0000021f, + 0x000003d1, 0x000003b8, 0x000001a9, 0x00000283, + 0x0000014c, 0x0000014d, 0x0000013b, 0x0000013c, + 0x0000010e, 0x0000010f, 0x00016e42, 0x00016e62, + 0x000118a9, 0x000118c9, 0x0001e912, 0x0001e934, + 0x00000057, 0x00000077, 0x00002c9c, 0x00002c9d, + 0x00000550, 0x00000580, 0x000001cb, 0x000001cc, + 0x00000053, 0x00000073, 0x000118a4, 0x000118c4, + 0x00002cd8, 0x00002cd9, 0x00001e16, 0x00001e17, + 0x00010425, 0x0001044d, 0x00001fd9, 0x00001fd1, + 0x0000ff32, 0x0000ff52, 0x0000abb8, 0x000013e8, + 0x0000ff2f, 0x0000ff4f, 0x0000a69a, 0x0000a69b, + 0x0000a7aa, 0x00000266, 0x000003a9, 0x000003c9, + 0x000003fd, 0x0000037b, 0x00001ca9, 0x000010e9, + 0x00001f2d, 0x00001f25, 0x00002168, 0x00002178, + 0x0000038a, 0x000003af, 0x000104c6, 0x000104ee, + 0x000024bf, 0x000024d9, 0x00001f99, 0x02000212, + 0x00016e44, 0x00016e64, 0x000024c2, 0x000024dc, + 0x00000222, 0x00000223, 0x00001fa6, 0x02000239, + 0x0000fb01, 0x020002b4, 0x00001f3c, 0x00001f34, + 0x00002c12, 0x00002c42, 0x00001ed2, 0x00001ed3, + 0x00001eba, 0x00001ebb, 0x0001e918, 0x0001e93a, + 0x00001ebc, 0x00001ebd, 0x00000534, 0x00000564, + 0x00002ca0, 0x00002ca1, 0x0000039f, 0x000003bf, + 0x00000102, 0x00000103, 0x0000004d, 0x0000006d, + 0x00002cb0, 0x00002cb1, 0x000104ca, 0x000104f2, + 0x000004fc, 0x000004fd, 0x0000a7ae, 0x0000026a, + 0x000004d2, 0x000004d3, 0x0000a7bc, 0x0000a7bd, + 0x0000046e, 0x0000046f, 0x000013fd, 0x000013f5, + 0x0000fb16, 0x020002d1, 0x000104b6, 0x000104de, + 0x0000ff28, 0x0000ff48, 0x0000ab90, 0x000013c0, + 0x0000ab78, 0x000013a8, 0x000010b9, 0x00002d19, + 0x0000fb17, 0x020002d4, 0x0000ab95, 0x000013c5, + 0x00000193, 0x00000260, 0x00010c98, 0x00010cd8, + 0x00010ca0, 0x00010ce0, 0x000001fc, 0x000001fd, + 0x000024ba, 0x000024d4, 0x00001fe6, 0x02000297, + 0x00010cb1, 0x00010cf1, 0x00001f68, 0x00001f60, + 0x0000018e, 0x000001dd, 0x00000156, 0x00000157, + 0x00000118, 0x00000119, 0x00001cb7, 0x000010f7, + 0x000118ae, 0x000118ce, 0x00000158, 0x00000159, + 0x0001041d, 0x00010445, 0x00001f9b, 0x02000218, + 0x00001e90, 0x00001e91, 0x000024b8, 0x000024d2, + 0x00002c75, 0x00002c76, 0x00000197, 0x00000268, + 0x0001040d, 0x00010435, 0x000118ad, 0x000118cd, + 0x00002c22, 0x00002c52, 0x0000a7c7, 0x0000a7c8, + 0x000004a4, 0x000004a5, 0x0000053d, 0x0000056d, + 0x00002c6f, 0x00000250, 0x0000216c, 0x0000217c, + 0x000003d0, 0x000003b2, 0x00001e9a, 0x020001b2, + 0x00001c9d, 0x000010dd, 0x000104be, 0x000104e6, + 0x0000a68a, 0x0000a68b, 0x0001e908, 0x0001e92a, + 0x000010b2, 0x00002d12, 0x0000004a, 0x0000006a, + 0x000118b3, 0x000118d3, 0x000013fc, 0x000013f4, + 0x0000ab92, 0x000013c2, 0x00000401, 0x00000451, + 0x00001c91, 0x000010d1, 0x00001fbe, 0x000003b9, + 0x000001b2, 0x0000028b, 0x00001eac, 0x00001ead, + 0x00001fb3, 0x0200025a, 0x00001ee8, 0x00001ee9, + 0x00000147, 0x00000148, 0x00016e41, 0x00016e61, + 0x00001f28, 0x00001f20, 0x000118b2, 0x000118d2, + 0x00001ec2, 0x00001ec3, 0x00001f0d, 0x00001f05, + 0x0000052e, 0x0000052f, 0x000118b8, 0x000118d8, + 0x00002cc2, 0x00002cc3, 0x00002c94, 0x00002c95, + 0x0000a790, 0x0000a791, 0x0000051a, 0x0000051b, + 0x0000a786, 0x0000a787, 0x000004b0, 0x000004b1, + 0x0000a73e, 0x0000a73f, 0x00002c70, 0x00000252, + 0x00001fac, 0x0200024b, 0x000003dc, 0x000003dd, + 0x00001fd3, 0x03000281, 0x00001c94, 0x000010d4, + 0x00010c93, 0x00010cd3, 0x0000a688, 0x0000a689, + 0x0000a65c, 0x0000a65d, 0x0000a72a, 0x0000a72b, + 0x000004cd, 0x000004ce, 0x000024c6, 0x000024e0, + 0x000001c7, 0x000001c9, 0x0000a756, 0x0000a757, + 0x0000ab83, 0x000013b3, 0x00001cb1, 0x000010f1, + 0x00001fc9, 0x00001f73, 0x00001f91, 0x020001fa, + 0x00001f5f, 0x00001f57, 0x000118b4, 0x000118d4, + 0x000118af, 0x000118cf, 0x000001e0, 0x000001e1, + 0x0001041c, 0x00010444, 0x00010cb0, 0x00010cf0, + 0x00000145, 0x00000146, 0x00016e53, 0x00016e73, + 0x0000016c, 0x0000016d, 0x000001b5, 0x000001b6, + 0x00010427, 0x0001044f, 0x00002c15, 0x00002c45, + 0x00016e50, 0x00016e70, 0x0001041b, 0x00010443, + 0x00000409, 0x00000459, 0x00001f0c, 0x00001f04, + 0x000004b4, 0x000004b5, 0x0000049c, 0x0000049d, + 0x00002ced, 0x00002cee, 0x000004f0, 0x000004f1, + 0x00002164, 0x00002174, 0x0000ab88, 0x000013b8, + 0x00001e97, 0x020001a9, 0x00000498, 0x00000499, + 0x00001c9a, 0x000010da, 0x0000a668, 0x0000a669, + 0x000104c8, 0x000104f0, 0x0000ff31, 0x0000ff51, + 0x00001caa, 0x000010ea, 0x000104bc, 0x000104e4, + 0x0000ab99, 0x000013c9, 0x00001c93, 0x000010d3, + 0x000024c0, 0x000024da, 0x00001ca5, 0x000010e5, + 0x000001cd, 0x000001ce, 0x00016e4c, 0x00016e6c, + 0x00010c8a, 0x00010cca, 0x00010cab, 0x00010ceb, + 0x000001ec, 0x000001ed, 0x00010414, 0x0001043c, + 0x00000186, 0x00000254, 0x00001f0a, 0x00001f02, + 0x000001b1, 0x0000028a, 0x00001ea0, 0x00001ea1, + 0x0001e916, 0x0001e938, 0x00001e36, 0x00001e37, + 0x00010c8c, 0x00010ccc, 0x0000a77d, 0x00001d79, + 0x00001ef0, 0x00001ef1, 0x0000037f, 0x000003f3, + 0x000010b0, 0x00002d10, 0x000104b7, 0x000104df, + 0x0000abbb, 0x000013eb, 0x00001c81, 0x00000434, + 0x00002c17, 0x00002c47, 0x0000a77e, 0x0000a77f, + 0x0000ab7a, 0x000013aa, 0x0000a760, 0x0000a761, + 0x0000abac, 0x000013dc, 0x000001fa, 0x000001fb, + 0x0000a762, 0x0000a763, 0x00000396, 0x000003b6, + 0x0000a726, 0x0000a727, 0x000010a9, 0x00002d09, + 0x000000c3, 0x000000e3, 0x000104d3, 0x000104fb, + 0x00000345, 0x000003b9, 0x0000023a, 0x00002c65, + 0x0000022c, 0x0000022d, 0x000024ca, 0x000024e4, + 0x000104bd, 0x000104e5, 0x00001c95, 0x000010d5, + 0x00001fe8, 0x00001fe0, 0x000010bd, 0x00002d1d, + 0x00001f83, 0x020001d0, 0x00001f4a, 0x00001f42, + 0x0000ab89, 0x000013b9, 0x000104d0, 0x000104f8, + 0x00001e4e, 0x00001e4f, 0x000001e4, 0x000001e5, + 0x000000d0, 0x000000f0, 0x00001efa, 0x00001efb, + 0x000003a5, 0x000003c5, 0x000000c5, 0x000000e5, + 0x0000019d, 0x00000272, 0x000000c2, 0x000000e2, + 0x00002cc0, 0x00002cc1, 0x00010c86, 0x00010cc6, + 0x0000a7b0, 0x0000029e, 0x00000512, 0x00000513, + 0x000004d6, 0x000004d7, 0x000004a8, 0x000004a9, + 0x0000a7b8, 0x0000a7b9, 0x00000411, 0x00000431, + 0x00000408, 0x00000458, 0x00001ffc, 0x020002ae, + 0x00000388, 0x000003ad, 0x0000ab8a, 0x000013ba, + 0x000118ba, 0x000118da, 0x00001f3d, 0x00001f35, + 0x000118b9, 0x000118d9, 0x0001e917, 0x0001e939, + 0x0000020c, 0x0000020d, 0x00010c9b, 0x00010cdb, + 0x000118a3, 0x000118c3, 0x000024cf, 0x000024e9, + 0x000024c4, 0x000024de, 0x00001ff7, 0x030002aa, + 0x00010c83, 0x00010cc3, 0x000001f4, 0x000001f5, + 0x000118b5, 0x000118d5, 0x00016e4e, 0x00016e6e, + 0x00000212, 0x00000213, 0x0000a686, 0x0000a687, + 0x000001a7, 0x000001a8, 0x000010b7, 0x00002d17, + 0x00001e1a, 0x00001e1b, 0x0001e905, 0x0001e927, + 0x00001e8c, 0x00001e8d, 0x00010408, 0x00010430, + 0x00001e26, 0x00001e27, 0x00002ccc, 0x00002ccd, + 0x00001f9f, 0x02000224, 0x00002c62, 0x0000026b, + 0x00002c26, 0x00002c56, 0x00000429, 0x00000449, + 0x000004f8, 0x000004f9, 0x0000047e, 0x0000047f, + 0x00001c80, 0x00000432, 0x00000414, 0x00000434, + 0x00001cbe, 0x000010fe, 0x00002163, 0x00002173, + 0x0000a74c, 0x0000a74d, 0x00001e66, 0x00001e67, + 0x000003e4, 0x000003e5, 0x0000a660, 0x0000a661, + 0x000003c2, 0x000003c3, 0x000024c1, 0x000024db, + 0x000010c7, 0x00002d27, 0x00001c82, 0x0000043e, + 0x00000204, 0x00000205, 0x000010cd, 0x00002d2d, + 0x0000ab72, 0x000013a2, 0x00000248, 0x00000249, + 0x000010c4, 0x00002d24, 0x00001e40, 0x00001e41, + 0x00010c8b, 0x00010ccb, 0x00001ed8, 0x00001ed9, + 0x00001fa0, 0x02000227, 0x00000126, 0x00000127, + 0x0000017f, 0x00000073, 0x00002c1b, 0x00002c4b, + 0x000104b8, 0x000104e0, 0x00016e43, 0x00016e63, + 0x00001fd6, 0x02000285, 0x00001fa9, 0x02000242, + 0x00002cda, 0x00002cdb, 0x00001eb2, 0x00001eb3, + 0x00016e4a, 0x00016e6a, 0x0000052a, 0x0000052b, + 0x00001e99, 0x020001af, 0x000004be, 0x000004bf, + 0x0000a73c, 0x0000a73d, 0x00002ca8, 0x00002ca9, + 0x00002c14, 0x00002c44, 0x00010cb2, 0x00010cf2, + 0x0000a742, 0x0000a743, 0x00000462, 0x00000463, + 0x00000428, 0x00000448, 0x0000212a, 0x0000006b, + 0x00002126, 0x000003c9, 0x000104d1, 0x000104f9, + 0x0000ff37, 0x0000ff57, 0x00010c9f, 0x00010cdf, + 0x00001c84, 0x00000442, 0x000010bb, 0x00002d1b, + 0x0000040b, 0x0000045b, 0x00002c6d, 0x00000251, + 0x0000ab7b, 0x000013ab, 0x000104c7, 0x000104ef, + 0x00000191, 0x00000192, 0x0001040f, 0x00010437, + 0x0000021c, 0x0000021d, 0x000001f0, 0x02000198, + 0x00001fc4, 0x02000270, 0x000003a7, 0x000003c7, + 0x00000150, 0x00000151, 0x00001ecc, 0x00001ecd, + 0x00001ede, 0x00001edf, 0x00001e6e, 0x00001e6f, + 0x00001e1e, 0x00001e1f, 0x0001e921, 0x0001e943, + 0x00016e58, 0x00016e78, 0x00001cb5, 0x000010f5, + 0x00001e56, 0x00001e57, 0x0000a744, 0x0000a745, + 0x00002ca2, 0x00002ca3, 0x00002c86, 0x00002c87, + 0x000118a2, 0x000118c2, 0x00001e4a, 0x00001e4b, + 0x000004d4, 0x000004d5, 0x00001fc8, 0x00001f72, + 0x00000504, 0x00000505, 0x0000a650, 0x0000a651, + 0x0000041a, 0x0000043a, 0x0000ff2a, 0x0000ff4a, + 0x0000039a, 0x000003ba, 0x000003f1, 0x000003c1, + 0x00001c85, 0x00000442, 0x0000fb05, 0x020002c2, + 0x0001e90b, 0x0001e92d, 0x0000ab9a, 0x000013ca, + 0x00000395, 0x000003b5, 0x00010c9c, 0x00010cdc, + 0x000003e6, 0x000003e7, 0x000024cd, 0x000024e7, + 0x0000abbd, 0x000013ed, 0x00001fec, 0x00001fe5, + 0x000001cf, 0x000001d0, 0x00001f81, 0x020001ca, + 0x00001f4c, 0x00001f44, 0x00001f86, 0x020001d9, + 0x00001ff4, 0x020002a4, 0x00001eae, 0x00001eaf, + 0x000104cf, 0x000104f7, 0x00000168, 0x00000169, + 0x0000014a, 0x0000014b, 0x00001e60, 0x00001e61, + 0x000000cb, 0x000000eb, 0x00000543, 0x00000573, + 0x00001faf, 0x02000254, 0x0000022e, 0x0000022f, + 0x00002c92, 0x00002c93, 0x0000054a, 0x0000057a, + 0x00002c24, 0x00002c54, 0x000004e0, 0x000004e1, + 0x000001ca, 0x000001cc, 0x00000476, 0x00000477, + 0x0000a79e, 0x0000a79f, 0x0000040c, 0x0000045c, + 0x000003f0, 0x000003ba, 0x000010bc, 0x00002d1c, + 0x00016e40, 0x00016e60, 0x0000ff2d, 0x0000ff4d, + 0x0000a68c, 0x0000a68d, 0x000003e8, 0x000003e9, + 0x00001ca8, 0x000010e8, 0x00000160, 0x00000161, + 0x0000fb02, 0x020002b7, 0x000013f9, 0x000013f1, + 0x000010c5, 0x00002d25, 0x000010b6, 0x00002d16, + 0x00001f87, 0x020001dc, 0x00001f6f, 0x00001f67, + 0x000001e8, 0x000001e9, 0x00001f5b, 0x00001f53, + 0x00001e7c, 0x00001e7d, 0x00000228, 0x00000229, + 0x0000ff24, 0x0000ff44, 0x00002c03, 0x00002c33, + 0x00000176, 0x00000177, 0x000010ab, 0x00002d0b, + 0x00016e4d, 0x00016e6d, 0x00001efe, 0x00001eff, + 0x000001d3, 0x000001d4, 0x00001efc, 0x00001efd, + 0x000001fe, 0x000001ff, 0x00002c9a, 0x00002c9b, + 0x0000053c, 0x0000056c, 0x00002cdc, 0x00002cdd, + 0x000004ee, 0x000004ef, 0x00000425, 0x00000445, + 0x000004c0, 0x000004cf, 0x00001f6a, 0x00001f62, + 0x00002ca4, 0x00002ca5, 0x000003e2, 0x000003e3, + 0x00002169, 0x00002179, 0x00001fa5, 0x02000236, + 0x0000042b, 0x0000044b, 0x0000a698, 0x0000a699, + 0x0000a66c, 0x0000a66d, 0x0000a77b, 0x0000a77c, + 0x00000427, 0x00000447, 0x00000389, 0x000003ae, + 0x000024c9, 0x000024e3, 0x00002c23, 0x00002c53, + 0x000010ad, 0x00002d0d, 0x0000ab7f, 0x000013af, + 0x0000ab77, 0x000013a7, 0x00000547, 0x00000577, + 0x0000ab9c, 0x000013cc, 0x000024be, 0x000024d8, + 0x00001fdb, 0x00001f77, 0x00001fa4, 0x02000233, + 0x000003ab, 0x000003cb, 0x00001f3a, 0x00001f32, + 0x0000004e, 0x0000006e, 0x00001ec6, 0x00001ec7, + 0x00001f8c, 0x020001eb, 0x000001d1, 0x000001d2, + 0x00001e22, 0x00001e23, 0x00001fa1, 0x0200022a, + 0x0000016a, 0x0000016b, 0x000000b5, 0x000003bc, + 0x000003a3, 0x000003c3, 0x0000004f, 0x0000006f, + 0x00002c1d, 0x00002c4d, 0x0000048e, 0x0000048f, + 0x0000fb14, 0x020002cb, 0x0000a754, 0x0000a755, + 0x00010400, 0x00010428, 0x0000049a, 0x0000049b, + 0x0000ff25, 0x0000ff45, 0x0000a798, 0x0000a799, + 0x00000232, 0x00000233, 0x0000a7f5, 0x0000a7f6, + 0x0000a7a0, 0x0000a7a1, 0x0000015e, 0x0000015f, + 0x000024bd, 0x000024d7, 0x0001040e, 0x00010436, + 0x00000533, 0x00000563, 0x0001040c, 0x00010434, + 0x00016e5f, 0x00016e7f, 0x00000194, 0x00000263, + 0x0001e91a, 0x0001e93c, 0x0000aba9, 0x000013d9, + 0x000024b7, 0x000024d1, 0x0000024a, 0x0000024b, + 0x000001f6, 0x00000195, 0x00001fd7, 0x03000288, + 0x00001e4c, 0x00001e4d, 0x00000154, 0x00000155, + 0x00001e54, 0x00001e55, 0x00001fa8, 0x0200023f, + 0x0001e914, 0x0001e936, 0x00000187, 0x00000188, + 0x00010c8e, 0x00010cce, 0x00001fca, 0x00001f74, + 0x0000013d, 0x0000013e, 0x00001e5e, 0x00001e5f, + 0x00002cb2, 0x00002cb3, 0x000118a1, 0x000118c1, + 0x00002c8a, 0x00002c8b, 0x00002c0b, 0x00002c3b, + 0x0000050c, 0x0000050d, 0x00010426, 0x0001044e, + 0x000004a6, 0x000004a7, 0x000010ae, 0x00002d0e, + 0x0000a76e, 0x0000a76f, 0x00000544, 0x00000574, + 0x000104c4, 0x000104ec, 0x0000a646, 0x0000a647, + 0x0000ff27, 0x0000ff47, 0x00010caf, 0x00010cef, + 0x00010c95, 0x00010cd5, 0x0000a652, 0x0000a653, + 0x0000012e, 0x0000012f, 0x00016e54, 0x00016e74, + 0x00001f98, 0x0200020f, 0x00000045, 0x00000065, + 0x000003ec, 0x000003ed, 0x00000393, 0x000003b3, + 0x00001fcb, 0x00001f75, 0x0000abb9, 0x000013e9, + 0x00001f8d, 0x020001ee, 0x00001f50, 0x020001b8, + 0x00001ffa, 0x00001f7c, 0x00016e55, 0x00016e75, + 0x0000017d, 0x0000017e, 0x0000010c, 0x0000010d, + 0x00001f2a, 0x00001f22, 0x000004c7, 0x000004c8, + 0x00000112, 0x00000113, 0x000000cc, 0x000000ec, + 0x00001eb6, 0x00001eb7, 0x00000047, 0x00000067, + 0x00001cac, 0x000010ec, 0x00002c88, 0x00002c89, + 0x0000a7b4, 0x0000a7b5, 0x00000518, 0x00000519, + 0x0001e90f, 0x0001e931, 0x000004ae, 0x000004af, + 0x0000a74e, 0x0000a74f, 0x000118ac, 0x000118cc, + 0x00000418, 0x00000438, 0x000003da, 0x000003db, + 0x000000d2, 0x000000f2, 0x000010b1, 0x00002d11, + 0x00001e0e, 0x00001e0f, 0x0000a792, 0x0000a793, + 0x0000a65e, 0x0000a65f, 0x0000ab73, 0x000013a3, + 0x0000023b, 0x0000023c, 0x0000a7be, 0x0000a7bf, + 0x000010bf, 0x00002d1f, 0x00016e5e, 0x00016e7e, + 0x000104b3, 0x000104db, 0x00001ff9, 0x00001f79, + 0x00001fc7, 0x03000276, 0x00001e10, 0x00001e11, + 0x00001cba, 0x000010fa, 0x00000419, 0x00000439, + 0x000104b5, 0x000104dd, 0x000001ea, 0x000001eb, + 0x0000039d, 0x000003bd, 0x00001e3c, 0x00001e3d, + 0x00001c98, 0x000010d8, 0x00016e51, 0x00016e71, + 0x000000da, 0x000000fa, 0x00001ca2, 0x000010e2, + 0x00000554, 0x00000584, 0x00002cd2, 0x00002cd3, + 0x00000531, 0x00000561, 0x00002c0a, 0x00002c3a, + 0x00000532, 0x00000562, 0x00010418, 0x00010440, + 0x00000423, 0x00000443, 0x00000052, 0x00000072, + 0x00000538, 0x00000568, 0x00000400, 0x00000450, + 0x000010b8, 0x00002d18, 0x0000a73a, 0x0000a73b, + 0x0000abb2, 0x000013e2, 0x0000a734, 0x0000a735, + 0x00001e72, 0x00001e73, 0x0000a666, 0x0000a667, + 0x0000038c, 0x000003cc, 0x0000ff33, 0x0000ff53, + 0x00000376, 0x00000377, 0x000024c5, 0x000024df, + 0x00002c2b, 0x00002c5b, 0x00000372, 0x00000373, + 0x000003a1, 0x000003c1, 0x00016e48, 0x00016e68, + 0x00001c97, 0x000010d7, 0x00000536, 0x00000566, + 0x0000023e, 0x00002c66, 0x00001cb3, 0x000010f3, + 0x000001ee, 0x000001ef, 0x00000048, 0x00000068, + 0x00001f3f, 0x00001f37, 0x00001f08, 0x00001f00, + 0x00001ec4, 0x00001ec5, 0x00001e9e, 0x020001b5, + 0x00001e68, 0x00001e69, 0x0001e911, 0x0001e933, + 0x00001e88, 0x00001e89, 0x000104c5, 0x000104ed, + 0x0000fb04, 0x030002be, 0x00001e2e, 0x00001e2f, + 0x00001e76, 0x00001e77, 0x00002cb6, 0x00002cb7, + 0x000004fa, 0x000004fb, 0x0001041a, 0x00010442, + 0x00016e5a, 0x00016e7a, 0x0000004c, 0x0000006c, + 0x0000049e, 0x0000049f, 0x00000460, 0x00000461, + 0x00000494, 0x00000495, 0x000003fe, 0x0000037c, + 0x000000d6, 0x000000f6, 0x00001ff6, 0x020002a7, + 0x0000ab82, 0x000013b2, 0x0000ab86, 0x000013b6, + 0x0000ab94, 0x000013c4, 0x0000fb03, 0x030002ba, + 0x000024ce, 0x000024e8, 0x000003f5, 0x000003b5, + 0x00010ca4, 0x00010ce4, 0x0000ab9e, 0x000013ce, + 0x00000391, 0x000003b1, 0x000013f8, 0x000013f0, + 0x00001feb, 0x00001f7b, 0x00001fb2, 0x02000257, + 0x000000cd, 0x000000ed, 0x000003ee, 0x000003ef, + 0x0000015a, 0x0000015b, 0x00000122, 0x00000123, + 0x00002c1f, 0x00002c4f, 0x00001eea, 0x00001eeb, + 0x00002c19, 0x00002c49, 0x0000ff36, 0x0000ff56, + 0x00010c9a, 0x00010cda, 0x0000005a, 0x0000007a, + 0x00001e5c, 0x00001e5d, 0x0000004b, 0x0000006b, + 0x000001d9, 0x000001da, 0x00016e5d, 0x00016e7d, + 0x00002c16, 0x00002c46, 0x00000510, 0x00000511, + 0x00000490, 0x00000491, 0x00001fad, 0x0200024e, + 0x00000470, 0x00000471, 0x0000053e, 0x0000056e, + 0x0000040a, 0x0000045a, 0x0000a684, 0x0000a685, + 0x0000039c, 0x000003bc, 0x00002165, 0x00002175, + 0x00002c13, 0x00002c43, 0x0000a7c5, 0x00000282, + 0x0000a656, 0x0000a657, 0x00001ca4, 0x000010e4, + 0x0000ff2e, 0x0000ff4e, 0x00000206, 0x00000207, + 0x000001a2, 0x000001a3, 0x000001c8, 0x000001c9, + 0x00000172, 0x00000173, 0x0000ff23, 0x0000ff43, + 0x00001eb4, 0x00001eb5, 0x00001f8a, 0x020001e5, + 0x000001e6, 0x000001e7, 0x00001ee0, 0x00001ee1, + 0x00016e49, 0x00016e69, 0x00000174, 0x00000175, + 0x000010c0, 0x00002d20, 0x000010a7, 0x00002d07, + 0x00001ef4, 0x00001ef5, 0x0001e903, 0x0001e925, + 0x00001e8e, 0x00001e8f, 0x000118a5, 0x000118c5, + 0x0000ab91, 0x000013c1, 0x00002cca, 0x00002ccb, + 0x00002c0f, 0x00002c3f, 0x00002c60, 0x00002c61, + 0x00001f6b, 0x00001f63, 0x000004e6, 0x000004e7, + 0x0001e90c, 0x0001e92e, 0x0000047c, 0x0000047d, + 0x00002c10, 0x00002c40, 0x00000412, 0x00000432, + 0x00001ea6, 0x00001ea7, 0x000003a8, 0x000003c8, + 0x000118be, 0x000118de, 0x000118b6, 0x000118d6, + 0x0000a682, 0x0000a683, 0x00010ca1, 0x00010ce1, + 0x0000038f, 0x000003ce, 0x00001cbf, 0x000010ff, + 0x000010b4, 0x00002d14, 0x000000c4, 0x000000e4, + 0x000024bc, 0x000024d6, 0x0000a722, 0x0000a723, + 0x000010ba, 0x00002d1a, 0x00001ff3, 0x020002a1, + 0x00001f95, 0x02000206, 0x00001f5d, 0x00001f55, + 0x000118b0, 0x000118d0, 0x00001f2f, 0x00001f27, + 0x0000017b, 0x0000017c, 0x000001ac, 0x000001ad, + 0x00002c25, 0x00002c55, 0x0000014e, 0x0000014f, + 0x00016e57, 0x00016e77, 0x000000d9, 0x000000f9, + 0x0000020e, 0x0000020f, 0x00001f29, 0x00001f21, + 0x000118ab, 0x000118cb, 0x00001c9e, 0x000010de, + 0x00000104, 0x00000105, 0x00000526, 0x00000527, + 0x000004ea, 0x000004eb, 0x00002c1c, 0x00002c4c, + 0x00000480, 0x00000481, 0x00001f39, 0x00001f31, + 0x0000216b, 0x0000217b, 0x00001ece, 0x00001ecf, + 0x00001e50, 0x00001e51, 0x00001fc2, 0x0200026a, + 0x00000506, 0x00000507, 0x00001f09, 0x00001f01, + 0x0000ab8b, 0x000013bb, 0x00010403, 0x0001042b, + 0x0000ff35, 0x0000ff55, 0x00001cae, 0x000010ee, + 0x0000abbf, 0x000013ef, 0x0000ab75, 0x000013a5, + 0x0000abb7, 0x000013e7, 0x00010c92, 0x00010cd2, + 0x00001fae, 0x02000251, 0x0000a779, 0x0000a77a, + 0x000024b6, 0x000024d0, 0x000000d1, 0x000000f1, + 0x00010421, 0x00010449, 0x00001ea4, 0x00001ea5, + 0x000001b8, 0x000001b9, 0x0000040f, 0x0000045f, + 0x00000152, 0x00000153, 0x00001ed6, 0x00001ed7, + 0x00001e86, 0x00001e87, 0x00001e6c, 0x00001e6d, + 0x00001e28, 0x00001e29, 0x00002ce2, 0x00002ce3, + 0x0000018b, 0x0000018c, 0x00000549, 0x00000579, + 0x0000a7b6, 0x0000a7b7, 0x000104c2, 0x000104ea, + 0x000013fa, 0x000013f2, 0x00002c11, 0x00002c41, + 0x0000a782, 0x0000a783, 0x00002c1a, 0x00002c4a, + 0x0000ff34, 0x0000ff54, 0x0000a74a, 0x0000a74b, + 0x0000042a, 0x0000044a, 0x00010424, 0x0001044c, + 0x00000402, 0x00000452, 0x00001f8e, 0x020001f1, + 0x0000039e, 0x000003be, 0x00000407, 0x00000457, + 0x00016e5c, 0x00016e7c, 0x000010c3, 0x00002d23, + 0x0000a724, 0x0000a725, 0x0000a78d, 0x00000265, + 0x000118bf, 0x000118df, 0x00000551, 0x00000581, + 0x0000abab, 0x000013db, 0x000000cf, 0x000000ef, + 0x0000021a, 0x0000021b, 0x00001fe9, 0x00001fe1, + 0x00001fb4, 0x0200025d, 0x00010c81, 0x00010cc1, + 0x00001e14, 0x00001e15, 0x00001fbc, 0x02000267, + 0x00001ef2, 0x00001ef3, 0x0001e90d, 0x0001e92f, + 0x00000130, 0x02000192, 0x000000d4, 0x000000f4, + 0x0001e919, 0x0001e93b, 0x00001f0f, 0x00001f07, + 0x000000c9, 0x000000e9, 0x00001e94, 0x00001e95, + 0x00000196, 0x00000269, 0x0001e90a, 0x0001e92c, + 0x00002c8c, 0x00002c8d, 0x00000548, 0x00000578, + 0x0000051c, 0x0000051d, 0x000004de, 0x000004df }; static const unsigned _uccase_extra_table[] = { From 2dddab01ae6a5427d9f6f38770cea4553e93b033 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 12 Mar 2020 16:31:24 +0300 Subject: [PATCH 197/201] Avoid "Anonymous class wasn't preloaded" error by lazely loading of not preloaded part of a preloaded script --- Zend/zend.c | 1 + Zend/zend.h | 3 +++ Zend/zend_compile.c | 16 +++++++++++++--- Zend/zend_vm_def.h | 13 +++++++++++-- Zend/zend_vm_execute.h | 13 +++++++++++-- ext/opcache/ZendAccelerator.c | 30 ++++++++++++++++++++++++++++++ ext/opcache/tests/bug78937_1.phpt | 5 ++--- ext/opcache/tests/bug78937_4.phpt | 4 ++-- 8 files changed, 73 insertions(+), 12 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index 97ac3327cab02..a9ae03e624272 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -81,6 +81,7 @@ ZEND_API char *(*zend_getenv)(char *name, size_t name_len); ZEND_API zend_string *(*zend_resolve_path)(const char *filename, size_t filename_len); ZEND_API int (*zend_post_startup_cb)(void) = NULL; ZEND_API void (*zend_post_shutdown_cb)(void) = NULL; +ZEND_API int (*zend_preload_autoload)(zend_string *filename) = NULL; void (*zend_on_timeout)(int seconds); diff --git a/Zend/zend.h b/Zend/zend.h index 9aefc8d26a337..94fd9a35597f1 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -292,6 +292,9 @@ extern ZEND_API zend_string *(*zend_resolve_path)(const char *filename, size_t f extern ZEND_API int (*zend_post_startup_cb)(void); extern ZEND_API void (*zend_post_shutdown_cb)(void); +/* Callback for loading of not preloaded part of the script */ +extern ZEND_API int (*zend_preload_autoload)(zend_string *filename); + ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); /* If filename is NULL the default filename is used. */ diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 5661f26439663..970011ac08852 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1072,11 +1072,21 @@ ZEND_API int do_bind_class(zval *lcname, zend_string *lc_parent_name) /* {{{ */ ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(lcname)); if (ce) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare %s %s, because the name is already in use", zend_get_object_type(ce), ZSTR_VAL(ce->name)); + return FAILURE; } else { - ZEND_ASSERT(EG(current_execute_data)->func->op_array.fn_flags & ZEND_ACC_PRELOADED); - zend_error_noreturn(E_ERROR, "Class %s wasn't preloaded", Z_STRVAL_P(lcname)); + do { + if (zend_preload_autoload + && zend_preload_autoload(EG(current_execute_data)->func->op_array.filename) == SUCCESS) { + zv = zend_hash_find_ex(EG(class_table), Z_STR_P(rtd_key), 1); + if (EXPECTED(zv != NULL)) { + break; + } + } + ZEND_ASSERT(EG(current_execute_data)->func->op_array.fn_flags & ZEND_ACC_PRELOADED); + zend_error_noreturn(E_ERROR, "Class %s wasn't preloaded", Z_STRVAL_P(lcname)); + return FAILURE; + } while (0); } - return FAILURE; } /* Register the derived class */ diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 0282c3c584f61..bb6a300a60177 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -7317,8 +7317,17 @@ ZEND_VM_HANDLER(146, ZEND_DECLARE_ANON_CLASS, ANY, ANY, CACHE_SLOT) zv = zend_hash_find_ex(EG(class_table), rtd_key, 1); if (UNEXPECTED(zv == NULL)) { SAVE_OPLINE(); - ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED); - zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded"); + do { + if (zend_preload_autoload + && zend_preload_autoload(EX(func)->op_array.filename) == SUCCESS) { + zv = zend_hash_find_ex(EG(class_table), rtd_key, 1); + if (EXPECTED(zv != NULL)) { + break; + } + } + ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED); + zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded"); + } while (0); } ZEND_ASSERT(zv != NULL); ce = Z_CE_P(zv); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index d79bdb1c1f21a..722053bbdc012 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2449,8 +2449,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLE zv = zend_hash_find_ex(EG(class_table), rtd_key, 1); if (UNEXPECTED(zv == NULL)) { SAVE_OPLINE(); - ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED); - zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded"); + do { + if (zend_preload_autoload + && zend_preload_autoload(EX(func)->op_array.filename) == SUCCESS) { + zv = zend_hash_find_ex(EG(class_table), rtd_key, 1); + if (EXPECTED(zv != NULL)) { + break; + } + } + ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED); + zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded"); + } while (0); } ZEND_ASSERT(zv != NULL); ce = Z_CE_P(zv); diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 758f8fc4bff51..3319f719ec410 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4242,6 +4242,34 @@ static void preload_load(void) } } +static int preload_autoload(zend_string *filename) +{ + zend_persistent_script *persistent_script; + zend_op_array *op_array; + + if (zend_hash_exists(&EG(included_files), filename)) { + return FAILURE; + } + + persistent_script = zend_accel_hash_find(&ZCSG(hash), filename); + if (!persistent_script) { + return FAILURE; + } + + op_array = zend_accel_load_script(persistent_script, 1); + if (!op_array) { + return FAILURE; + } + + // TODO: we may need to execute this in some special context ??? + zend_execute(op_array, NULL); + + destroy_op_array(op_array); + efree_size(op_array, sizeof(zend_op_array)); + + return SUCCESS; +} + static int accel_preload(const char *config) { zend_file_handle file_handle; @@ -4534,6 +4562,8 @@ static int accel_preload(const char *config) HANDLE_UNBLOCK_INTERRUPTIONS(); zend_shared_alloc_destroy_xlat_table(); + + zend_preload_autoload = preload_autoload; } else { CG(map_ptr_last) = orig_map_ptr_last; } diff --git a/ext/opcache/tests/bug78937_1.phpt b/ext/opcache/tests/bug78937_1.phpt index bc285f107b98d..2745fde72cae9 100644 --- a/ext/opcache/tests/bug78937_1.phpt +++ b/ext/opcache/tests/bug78937_1.phpt @@ -20,6 +20,5 @@ var_dump(foo()); Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78937.inc on line 6 Warning: Can't preload unlinked class class@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 - -Fatal error: Anonymous class wasn't preloaded in %spreload_bug78937.inc on line 3 - +object(class@anonymous)#%d (0) { +} diff --git a/ext/opcache/tests/bug78937_4.phpt b/ext/opcache/tests/bug78937_4.phpt index 2ad86870de85b..3652d6de52d59 100644 --- a/ext/opcache/tests/bug78937_4.phpt +++ b/ext/opcache/tests/bug78937_4.phpt @@ -21,5 +21,5 @@ var_dump(new Foo); Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78937.inc on line 6 Warning: Can't preload unlinked class class@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 - -Fatal error: Class foo wasn't preloaded in %spreload_bug78937.inc on line 6 +object(Foo)#%d (0) { +} From c9db32271a8083721582c5ec1dd09c4d4f562c74 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 28 Feb 2020 12:13:03 +0100 Subject: [PATCH 198/201] Remove deprecated (real) cast Closes GH-5220 --- Zend/tests/real_cast_deprecation.phpt | 11 ----------- Zend/zend_language_scanner.l | 2 +- ext/tokenizer/tests/token_get_all_variation8.phpt | 2 +- ext/tokenizer/tokenizer_data.c | 4 ++-- 4 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 Zend/tests/real_cast_deprecation.phpt diff --git a/Zend/tests/real_cast_deprecation.phpt b/Zend/tests/real_cast_deprecation.phpt deleted file mode 100644 index a73517c504c56..0000000000000 --- a/Zend/tests/real_cast_deprecation.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -The (real) cast is deprecated ---FILE-- - ---EXPECTF-- -Deprecated: The (real) cast is deprecated, use (float) instead in %s on line %d -float(42) diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index a4e8b6f7bec03..285ade26df7b2 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1496,7 +1496,7 @@ NEWLINE ("\r"|"\n"|"\r\n") "("{TABS_AND_SPACES}"real"{TABS_AND_SPACES}")" { if (PARSER_MODE()) { - zend_error(E_DEPRECATED, "The (real) cast is deprecated, use (float) instead"); + zend_throw_exception(zend_ce_parse_error, "The (real) cast has been removed, use (float) instead", 0); } RETURN_TOKEN(T_DOUBLE_CAST); } diff --git a/ext/tokenizer/tests/token_get_all_variation8.phpt b/ext/tokenizer/tests/token_get_all_variation8.phpt index 015e60d6e332c..14a051955ef5d 100644 --- a/ext/tokenizer/tests/token_get_all_variation8.phpt +++ b/ext/tokenizer/tests/token_get_all_variation8.phpt @@ -18,7 +18,7 @@ Test token_get_all() function : usage variations - with type casting operators echo "*** Testing token_get_all() : 'source' string with different type casting operators ***\n"; -// type casting operators : (int), (integer), (float), (real), (double), (string), (array), (object), (bool), (boolean),(unset) +// type casting operators : (int), (integer), (float), (double), (string), (array), (object), (bool), (boolean),(unset) $source = ' Date: Thu, 12 Mar 2020 22:19:47 +0300 Subject: [PATCH 199/201] Call global code of preloaded script in global context --- ext/opcache/ZendAccelerator.c | 47 ++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 3319f719ec410..9657c1ec17c9f 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4246,6 +4246,10 @@ static int preload_autoload(zend_string *filename) { zend_persistent_script *persistent_script; zend_op_array *op_array; + zend_execute_data *old_execute_data; + zend_class_entry *old_fake_scope; + zend_bool do_bailout = 0; + int ret = SUCCESS; if (zend_hash_exists(&EG(included_files), filename)) { return FAILURE; @@ -4256,18 +4260,55 @@ static int preload_autoload(zend_string *filename) return FAILURE; } + zend_hash_add_empty_element(&EG(included_files), filename); + + if (persistent_script->ping_auto_globals_mask) { + zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask); + } + op_array = zend_accel_load_script(persistent_script, 1); if (!op_array) { return FAILURE; } - // TODO: we may need to execute this in some special context ??? - zend_execute(op_array, NULL); + /* Execute in global context */ + old_execute_data = EG(current_execute_data); + EG(current_execute_data) = NULL; + old_fake_scope = EG(fake_scope); + EG(fake_scope) = NULL; + zend_exception_save(); + + zend_try { + zend_execute(op_array, NULL); + } zend_catch { + do_bailout = 1; + } zend_end_try(); + + if (EG(exception)) { + ret = FAILURE; + } + + zend_exception_restore(); + EG(fake_scope) = old_fake_scope; + EG(current_execute_data) = old_execute_data; + while (old_execute_data) { + if (old_execute_data->func && (ZEND_CALL_INFO(old_execute_data) & ZEND_CALL_HAS_SYMBOL_TABLE)) { + if (old_execute_data->symbol_table == &EG(symbol_table)) { + zend_attach_symbol_table(old_execute_data); + } + break; + } + old_execute_data = old_execute_data->prev_execute_data; + } destroy_op_array(op_array); efree_size(op_array, sizeof(zend_op_array)); - return SUCCESS; + if (do_bailout) { + zend_bailout(); + } + + return ret; } static int accel_preload(const char *config) From b6492b44532f4083ace7bfb28fe8807d78ff6606 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 12 Mar 2020 22:26:16 +0300 Subject: [PATCH 200/201] identation fix --- ext/opcache/ZendAccelerator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 9657c1ec17c9f..b0b27d79758ac 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4244,7 +4244,7 @@ static void preload_load(void) static int preload_autoload(zend_string *filename) { - zend_persistent_script *persistent_script; + zend_persistent_script *persistent_script; zend_op_array *op_array; zend_execute_data *old_execute_data; zend_class_entry *old_fake_scope; From c5159b383218968be307fb96f9fd19b2b6e17c90 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 12 Mar 2020 22:26:30 +0300 Subject: [PATCH 201/201] Check asserts early --- Zend/zend_compile.c | 2 +- Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 970011ac08852..0f948e000b438 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1075,6 +1075,7 @@ ZEND_API int do_bind_class(zval *lcname, zend_string *lc_parent_name) /* {{{ */ return FAILURE; } else { do { + ZEND_ASSERT(EG(current_execute_data)->func->op_array.fn_flags & ZEND_ACC_PRELOADED); if (zend_preload_autoload && zend_preload_autoload(EG(current_execute_data)->func->op_array.filename) == SUCCESS) { zv = zend_hash_find_ex(EG(class_table), Z_STR_P(rtd_key), 1); @@ -1082,7 +1083,6 @@ ZEND_API int do_bind_class(zval *lcname, zend_string *lc_parent_name) /* {{{ */ break; } } - ZEND_ASSERT(EG(current_execute_data)->func->op_array.fn_flags & ZEND_ACC_PRELOADED); zend_error_noreturn(E_ERROR, "Class %s wasn't preloaded", Z_STRVAL_P(lcname)); return FAILURE; } while (0); diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index bb6a300a60177..900c21c3d3469 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -7318,6 +7318,7 @@ ZEND_VM_HANDLER(146, ZEND_DECLARE_ANON_CLASS, ANY, ANY, CACHE_SLOT) if (UNEXPECTED(zv == NULL)) { SAVE_OPLINE(); do { + ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED); if (zend_preload_autoload && zend_preload_autoload(EX(func)->op_array.filename) == SUCCESS) { zv = zend_hash_find_ex(EG(class_table), rtd_key, 1); @@ -7325,7 +7326,6 @@ ZEND_VM_HANDLER(146, ZEND_DECLARE_ANON_CLASS, ANY, ANY, CACHE_SLOT) break; } } - ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED); zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded"); } while (0); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 722053bbdc012..2fce1be298f07 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2450,6 +2450,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLE if (UNEXPECTED(zv == NULL)) { SAVE_OPLINE(); do { + ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED); if (zend_preload_autoload && zend_preload_autoload(EX(func)->op_array.filename) == SUCCESS) { zv = zend_hash_find_ex(EG(class_table), rtd_key, 1); @@ -2457,7 +2458,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLE break; } } - ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED); zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded"); } while (0); }