Compare commits

..
1100 changed files with 142237 additions and 61517 deletions

No files matched your search

+4 -4
View File
@@ -101,7 +101,7 @@ define dump_bt
____print_str $zvalue->value.str->val $zvalue->value.str->len
end
if $type == 7
printf "array(%d)[%p]", $zvalue->value.arr->nNumOfElements, $zvalue
printf "array(%d)[%p]", $zvalue->value.arr->ht->nNumOfElements, $zvalue
end
if $type == 8
printf "object[%p]", $zvalue
@@ -152,8 +152,8 @@ define ____printzv_contents
set $type = $zvalue->u1.v.type
# 15 == IS_INDIRECT
if $type > 5 && $type != 15
printf "(refcount=%d) ", $zvalue->value.counted->gc.refcount
if $type >= 5 && $type != 15
printf "(refcount=%d) ", $zvalue->value.counted->refcount
end
if $type == 0
@@ -181,7 +181,7 @@ define ____printzv_contents
printf "array: "
if ! $arg1
set $ind = $ind + 1
____print_ht $zvalue->value.arr 1
____print_ht $zvalue->value.arr
set $ind = $ind - 1
set $i = $ind
while $i > 0
+4 -3
View File
@@ -21,9 +21,6 @@
*.tar.gz
*.tar.bz2
*.tar.xz
*.tar.gz.asc
*.tar.bz2.asc
*.tar.xz.asc
.FBCIndex
.FBCLockFolder
.deps
@@ -245,6 +242,10 @@ ext/reflection/spl.chm
ext/simplexml/examples/security.new.xml
ext/spl/examples/.htaccess
ext/spl/examples/*.phps
ext/sqlite/weztest.sqlite
ext/sqlite/libsqlite/src/sqlite.h
ext/sqlite/libsqlite/src/parse.out
ext/sqlite/libsqlite/src/libsqlite.dsw
ext/sqlite3/tests/phpsql*
ext/sqlite3/tests/*.db
ext/sqlite3/tests/*.tmp
+13 -20
View File
@@ -1,29 +1,13 @@
language: c
sudo: false
addons:
apt:
packages:
- locales
- language-pack-de
- re2c
- libgmp-dev
- libicu-dev
- libmcrypt-dev
- libtidy-dev
- libenchant-dev
- libaspell-dev
- libpspell-dev
- librecode-dev
- libsasl2-dev
- libxpm-dev
- libt1-dev
branches:
except:
- phpng
notifications:
email:
on_failure: change
irc:
template:
- "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} - Change view : %{compare_url} - Build details : %{build_url}"
channels:
- "irc.efnet.org#php.pecl"
on_success: change
@@ -45,6 +29,13 @@ env:
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libenchant-dev libaspell-dev libpspell-dev librecode-dev libsasl2-dev libxpm-dev libt1-dev libc-client2007e-dev
- sudo cp ./travis/de /var/lib/locales/supported.d/de
- sudo dpkg-reconfigure locales
- ./travis/install.sh
before_script:
# Compile PHP
- ./travis/compile.sh
@@ -54,7 +45,9 @@ before_script:
- . ./travis/ext/pdo_mysql/setup.sh
- . ./travis/ext/pgsql/setup.sh
- . ./travis/ext/pdo_pgsql/setup.sh
- . ./travis/ext/imap/setup.sh
# Run PHPs run-tests.php
script:
- ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 1 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --set-timeout 120
- ./sapi/cli/php sapi/phpdbg/tests/run-tests.php -diff2stdout --phpdbg sapi/phpdbg/phpdbg
+1 -1
View File
@@ -57,7 +57,7 @@ php_lcov.info: lcov-test
cp $$x.bbg lcov_data/$$y.bbg ; \
fi; \
done; \
for dir in ext/bcmath/libbcmath ext/date/lib ext/fileinfo/libmagic ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib ext/pdo_sqlite/libsqlite ext/sqlite3/libsqlite ext/xmlrpc/libxmlrpc ext/zip/lib; do \
for dir in ext/bcmath/libbcmath ext/fileinfo/libmagic ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite ext/xmlrpc/libxmlrpc ext/zip/lib; do \
if test -d lcov_data/$$dir; then \
rm -rf lcov_data/$$dir ; \
fi; \
+130 -585
View File
@@ -1,308 +1,86 @@
PHP NEWS
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
07 Jan 2016 PHP 7.0.2
23 Jul 2015, PHP 7.0.0 Beta 2
- Core:
. Fixed bug #71165 (-DGC_BENCH=1 doesn't work on PHP7).
(y dot uchiyama dot 1015 at gmail dot com)
. Fixed bug #71163 (Segmentation Fault: cleanup_unfinished_calls). (Laruence)
. Fixed bug #71109 (ZEND_MOD_CONFLICTS("xdebug") doesn't work). (Laruence)
. Fixed bug #71092 (Segmentation fault with return type hinting). (Laruence)
. Fixed bug memleak in header_register_callback. (Laruence)
. Fixed bug #71067 (Local object in class method stays in memory for each
call). (Laruence)
. Fixed bug #66909 (configure fails utf8_to_mutf7 test). (Michael Orlitzky)
. Fixed bug #70781 (Extension tests fail on dynamic ext dependency).
(Francois Laupretre)
. Fixed bug #71089 (No check to duplicate zend_extension). (Remi)
. Fixed bug #71086 (Invalid numeric literal parse error within
highlight_string() function). (Nikita)
. Fixed bug #71154 (Incorrect HT iterator invalidation causes iterator reuse).
(Nikita)
. Fixed bug #52355 (Negating zero does not produce negative zero). (Andrea)
. Fixed bug #66179 (var_export() exports float as integer). (Andrea)
. Fixed bug #70804 (Unary add on negative zero produces positive zero).
(Andrea)
- CURL:
. Fixed bug #71144 (Sementation fault when using cURL with ZTS).
(Michael Maroszek, Laruence)
- DBA:
. Fixed key leak with invalid resource. (Laruence)
- Filter:
. Fixed bug #71063 (filter_input(INPUT_ENV, ..) does not work). (Reeze Xia)
- FTP:
. Implemented FR #55651 (Option to ignore the returned FTP PASV address).
(abrender at elitehosts dot com)
- FPM:
. Fixed bug #70755 (fpm_log.c memory leak and buffer overflow). (Stas)
- GD:
. Fixed bug #70976 (Memory Read via gdImageRotateInterpolated Array Index
Out of Bounds). (emmanuel dot law at gmail dot com).
- Mbstring:
. Fixed bug #71066 (mb_send_mail: Program terminated with signal SIGSEGV,
Segmentation fault). (Laruence)
- Opcache:
. Fixed bug #71127 (Define in auto_prepend_file is overwrite). (Laruence)
- PCRE:
. Fixed bug #71178 (preg_replace with arrays creates [0] in replace array
if not already set). (Laruence)
- Readline:
. Fixed bug #71094 (readline_completion_function corrupts static array on
second TAB). (Nikita)
- Session:
. Fixed bug #71122 (Session GC may not remove obsolete session data). (Yasuo)
- SPL:
. Fixed bug #71077 (ReflectionMethod for ArrayObject constructor returns
wrong number of parameters). (Laruence)
. Fixed bug #71153 (Performance Degradation in ArrayIterator with large
arrays). (Nikita)
- Standard:
. Fixed bug #71270 (Heap BufferOver Flow in escapeshell functions).
(emmanuel dot law at gmail dot com)
- WDDX:
. Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization).
(taoguangchen at icloud dot com)
. Fixed bug #70741 (Session WDDX Packet Deserialization Type Confusion
Vulnerability). (taoguangchen at icloud dot com)
- XMLRPC
. Fixed bug #70728 (Type Confusion Vulnerability in PHP_to_XMLRPC_worker).
(Julien)
17 Dec 2015, PHP 7.0.1
- Core:
. Fixed bug #71105 (Format String Vulnerability in Class Name Error Message).
(andrew at jmpesp dot org)
. Fixed bug #70831 (Compile fails on system with 160 CPUs). (Daniel Axtens)
. Fixed bug #71006 (symbol referencing errors on Sparc/Solaris). (Dmitry)
. Fixed bug #70997 (When using parentClass:: instead of parent::, static
context changed). (Dmitry)
. Fixed bug #70970 (Segfault when combining error handler with output
buffering). (Laruence)
. Fixed bug #70967 (Weird error handling for __toString when Error is
thrown). (Laruence)
. Fixed bug #70958 (Invalid opcode while using ::class as trait method
paramater default value). (Laruence)
. Fixed bug #70944 (try{ } finally{} can create infinite chains of
exceptions). (Laruence)
. Fixed bug #70931 (Two errors messages are in conflict). (dams, Laruence)
. Fixed bug #70904 (yield from incorrectly marks valid generator as
finished). (Bob)
. Fixed bug #70899 (buildconf failure in extensions). (Bob, Reeze)
. Fixed bug #61751 (SAPI build problem on AIX: Undefined symbol:
php_register_internal_extensions). (Lior Kaplan)
. Fixed \int (or generally every scalar type name with leading backslash)
to not be accepted as type name. (Bob)
. Fixed exception not being thrown immediately into a generator yielding
from an array. (Bob)
. Fixed bug #70987 (static::class within Closure::call() causes segfault).
(Andrea)
. Fixed bug #71013 (Incorrect exception handler with yield from). (Bob)
. Fixed double free in error condition of format printer. (Bob)
- CLI server:
. Fixed bug #71005 (Segfault in php_cli_server_dispatch_router()). (Adam)
- Intl:
. Fixed bug #71020 (Use after free in Collator::sortWithSortKeys).
(emmanuel dot law at gmail dot com, Laruence)
- Mysqlnd:
. Fixed bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction).
(Laruence)
. Fixed bug #68344 (MySQLi does not provide way to disable peer certificate
validation) by introducing MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT
connection flag. (Andrey)
- OCI8:
. Fixed LOB implementation size_t/zend_long mismatch reported by gcov.
(Senthil)
- Opcache:
. Fixed bug #71024 (Unable to use PHP 7.0 x64 side-by-side with PHP 5.6 x32
on the same server). (Anatol)
. Fixed bug #70991 (zend_file_cache.c:710: error: array type has incomplete
element type). (Laruence)
. Fixed bug #70977 (Segmentation fault with opcache.huge_code_pages=1).
(Laruence)
- Phpdbg:
. Fixed stderr being written to stdout. (Bob)
- Reflection:
. Fixed bug #71018 (ReflectionProperty::setValue() behavior changed).
(Laruence)
. Fixed bug #70982 (setStaticPropertyValue behaviors inconsistently with
5.6). (Laruence)
- SPL:
. Fixed bug #71028 (Undefined index with ArrayIterator). (Laruence)
- SQLite3:
. Fixed bug #71049 (SQLite3Stmt::execute() releases bound parameter instead
of internal buffer). (Laruence)
- Standard:
. Fixed bug #70999 (php_random_bytes: called object is not a function).
(Scott)
. Fixed bug #70960 (ReflectionFunction for array_unique returns wrong number
of parameters). (Laruence)
- Streams/Socket:
. Add IPV6_V6ONLY constant / make it usable in stream contexts. (Bob)
. Fixed bug #70012 (Exception lost with nested finally block). (Laruence)
- Soap:
. Fixed bug #70993 (Array key references break argument processing).
(Laruence)
. Fixed bug #70032 (make_http_soap_request calls
zend_hash_get_current_key_ex(,,,NULL). (Laruence)
- PDO_Firebird:
. Fixed bug #60052 (Integer returned as a 64bit integer on X64_86). (Mariuz)
- Standard:
. Fixed bug #70018 (exec does not strip all whitespace). (Laruence)
03 Dec 2015, PHP 7.0.0
- Tokenizer:
. Fixed bug #69430 (token_get_all has new irrecoverable errors). (Nikita)
09 Jul 2015, PHP 7.0.0 Beta 1
- Core:
. Fixed bug #70947 (INI parser segfault with INI_SCANNER_TYPED). (Laruence)
. Fixed bug #70914 (zend_throw_or_error() format string vulnerability).
(Taoguang Chen)
. Fixed bug #70912 (Null ptr dereference instantiating class with invalid
array property). (Laruence)
. Fixed bug #70895, #70898 (null ptr deref and segfault with crafted calable).
(Anatol, Laruence)
. Fixed bug #70249 (Segmentation fault while running PHPUnit tests on
phpBB 3.2-dev). (Laruence)
. Fixed bug #70805 (Segmentation faults whilst running Drupal 8 test suite).
(Dmitry, Laruence)
. Fixed bug #70842 (Persistent Stream Segmentation Fault). (Caleb Champlin)
. Fixed bug #70862 (Several functions do not check return code of
php_stream_copy_to_mem()). (Anatol)
. Fixed bug #70863 (Incorect logic to increment_function for proxy objects).
(Anatol)
. Fixed bug #70323 (Regression in zend_fetch_debug_backtrace() can cause
segfaults). (Aharvey, Laruence)
. Fixed bug #70873 (Regression on private static properties access).
(Laruence)
. Fixed bug #70748 (Segfault in ini_lex () at Zend/zend_ini_scanner.l).
(Laruence)
. Fixed bug #70689 (Exception handler does not work as expected). (Laruence)
. Fixed bug #70430 (Stack buffer overflow in zend_language_parser()). (Nikita)
. Fixed bug #70782 (null ptr deref and segfault (zend_get_class_fetch_type)).
(Nikita)
. Fixed bug #70785 (Infinite loop due to exception during identical
comparison). (Laruence)
. Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->
getClosure()). (Dmitry, Bob)
. Fixed bug #70662 (Duplicate array key via undefined index error handler).
(Nikita)
. Fixed bug #70681 (Segfault when binding $this of internal instance method
to null). (Nikita)
. Fixed bug #70685 (Segfault for getClosure() internal method rebind with
invalid $this). (Nikita)
. Added zend_internal_function.reserved[] fields. (Dmitry)
. Fixed bug #70557 (Memleak on return type verifying failed). (Laruence)
. Fixed bug #70555 (fun_get_arg() on unsetted vars return UNKNOW). (Laruence)
. Fixed bug #70548 (Redundant information printed in case of uncaught engine
exception). (Laruence)
. Fixed bug #70547 (unsetting function variables corrupts backtrace).
(Laruence)
. Fixed bug #70528 (assert() with instanceof adds apostrophes around class
name). (Laruence)
. Fixed bug #70481 (Memory leak in auto_global_copy_ctor() in ZTS build).
(Laruence)
. Fixed bug #70431 (Memory leak in php_ini.c). (Senthil, Laruence)
. Fixed bug #70478 (**= does no longer work). (Bob)
. Fixed bug #70398 (SIGSEGV, Segmentation fault zend_ast_destroy_ex).
(Dmitry, Bob, Laruence)
. Fixed bug #70332 (Wrong behavior while returning reference on object).
(Laruence, Dmitry)
. Fixed bug #70300 (Syntactical inconsistency with new group use syntax).
(marcio dot web2 at gmail dot com)
. Fixed bug #70321 (Magic getter breaks reference to array property).
(Laruence)
. Fixed bug #70187 (Notice: unserialize(): Unexpected end of serialized
data). (Dmitry)
. Fixed bug #70145 (From field incorrectly parsed from headers). (Anatol)
. Fixed bug #70370 (Bundled libtool.m4 doesn't handle FreeBSD 10 when
building extensions). (Adam)
. Fixed bug causing exception traces with anon classes to be truncated. (Bob)
. Fixed bug #70397 (Segmentation fault when using Closure::call and yield).
(Bob)
. Fixed bug #70299 (Memleak while assigning object offsetGet result).
(Laruence)
. Fixed bug #70288 (Apache crash related to ZEND_SEND_REF). (Laruence)
. Fixed bug #70262 (Accessing array crashes PHP 7.0beta3).
(Laruence, Dmitry)
. Fixed bug #70258 (Segfault if do_resize fails to allocated memory).
(Laruence)
. Fixed bug #70253 (segfault at _efree () in zend_alloc.c:1389). (Laruence)
. Fixed bug #70240 (Segfault when doing unset($var());). (Laruence)
. Fixed bug #70223 (Incrementing value returned by magic getter). (Laruence)
. Fixed bug #70215 (Segfault when __invoke is static). (Bob)
. Fixed bug #70207 (Finally is broken with opcache). (Laruence, Dmitry)
. Fixed bug #70173 (ZVAL_COPY_VALUE_EX broken for 32bit Solaris Sparc).
(Laruence, cmb)
. Fixed bug #69487 (SAPI may truncate POST data). (cmb)
. Fixed bug #70198 (Checking liveness does not work as expected).
(Shafreeck Sea, Anatol Belski)
. Fixed bug #70241,#70293 (Skipped assertions affect Generator returns). (Bob)
. Fixed bug #70239 (Creating a huge array doesn't result in exhausted,
but segfault). (Laruence, Anatol)
. Fixed "finally" issues. (Nikita, Dmitry)
. Fixed bug #70098 (Real memory usage doesn't decrease). (Dmitry)
. Fixed bug #70159 (__CLASS__ is lost in closures). (Julien)
. Fixed bug #70156 (Segfault in zend_find_alias_name). (Laruence)
. Fixed bug #70124 (null ptr deref / seg fault in ZEND_HANDLE_EXCEPTION).
(Laruence)
. Fixed bug #70117 (Unexpected return type error). (Laruence)
. Fixed bug #70106 (Inheritance by anonymous class). (Bob)
. Fixed bug #69674 (SIGSEGV array.c:953). (cmb)
. Fixed bug #70164 (__COMPILER_HALT_OFFSET__ under namespace is not defined).
(Bob)
. Fixed bug #70108 (sometimes empty $_SERVER['QUERY_STRING']). (Anatol)
. Fixed bug #70179 ($this refcount issue). (Bob)
. Fixed bug #69896 ('asm' operand has impossible constraints). (Anatol)
. Fixed bug #70183 (null pointer deref (segfault) in zend_eval_const_expr).
(Hugh Davenport)
. Fixed bug #70182 (Segfault in ZEND_ASSIGN_DIV_SPEC_CV_UNUSED_HANDLER).
(Hugh Davenport)
. Fixed bug #69793 (Remotely triggerable stack exhaustion via recursive
method calls). (Stas)
. Fixed bug #69892 (Different arrays compare indentical due to integer key
truncation). (Nikita)
. Fixed bug #70121 (unserialize() could lead to unexpected methods execution
/ NULL pointer deref). (Stas)
. Fixed bug #70089 (segfault at ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER ()).
(Laruence)
. Fixed bug #70057 (Build failure on 32-bit Mac OS X 10.6.8: recursive
inlining). (Laruence)
. Fixed bug #70012 (Exception lost with nested finally block). (Laruence)
. Fixed bug #69996 (Changing the property of a cloned object affects the
original). (Dmitry, Laruence)
. Fixed bug #70083 (Use after free with assign by ref to overloaded objects).
(Bob)
. Fixed bug #70006 (cli - function with default arg = STDOUT crash output).
(Laruence)
. Fixed bug #69521 (Segfault in gc_collect_cycles()).
(arjen at react dot com, Laruence)
. Improved zend_string API. (Francois Laupretre)
. Improved zend_string API (Francois Laupretre)
. Fixed bug #69955 (Segfault when trying to combine [] and assign-op on
ArrayAccess object). (Laruence)
. Fixed bug #69957 (Different ways of handling div/mod/intdiv). (Bob)
. Fixed bug #69900 (Too long timeout on pipes). (Anatol)
. Fixed bug #62210 (Exceptions can leak temporary variables. As a part of
the fix serious refactoring was done. op_array->brk_cont_array was removed,
and replaced with more general and speed efficient op_array->T_liveliness.
ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time).
(Bob, Dmitry, Laruence)
- CLI server:
. Fixed bug #69655 (php -S changes MKCALENDAR request method to MKCOL). (cmb)
. Fixed bug #64878 (304 responses return Content-Type header). (cmb)
- COM:
. Fixed bug #69939 (Casting object to bool returns false). (Kalle)
- JSON
. Fixed bug #62010 (json_decode produces invalid byte-sequences).
(Jakub Zelenka)
- OCI8:
. Corrected oci8 hash destructors to prevent segfaults, and a few other fixes.
(Cameron Porter)
- ODBC:
. Fixed bug #69975 (PHP segfaults when accessing nvarchar(max) defined
columns). (cmb)
- OpenSSL:
. Fixed bug #69882 (OpenSSL error "key values mismatch" after
openssl_pkcs12_read with extra cert) (Tomasz Sawicki)
- PCRE:
. Fixed bug #53823 (preg_replace: * qualifier on unicode replace garbles the
string). (cmb)
- Session:
. Fixed bug #69952 (Data integrity issues accessing superglobals by
reference). (Bob)
- SPL:
. Fixed bug #69970 (Use-after-free vulnerability in
spl_recursive_it_move_forward_ex()). (Laruence)
- Standard:
. Fixed bug #69983 (get_browser fails with user agent of null).
(Kalle, cmb, Laruence)
. Fixed bug #69976 (Unable to parse "all" urls with colon char). (cmb)
. Fixed bug #69768 (escapeshell*() doesn't cater to !). (cmb)
- Sqlite3:
. Fixed bug #69972 (Use-after-free vulnerability in
sqlite3SafetyCheckSickOrOk()). (Laruence)
25 Jun 2015, PHP 7.0.0 Alpha 2
- Core:
. Fixed bug #69872 (uninitialised value in strtr with array). (Laruence)
. Fixed bug #69868 (Invalid read of size 1 in zend_compile_short_circuiting).
(Laruence)
@@ -329,6 +107,52 @@ PHP NEWS
truncation). (Nikita)
. Fixed bug #69893 (Strict comparison between integer and empty string keys
crashes). (Nikita)
- DOM:
. Fixed bug #69846 (Segmenation fault (access violation) when iterating over
DOMNodeList). (Anatol Belski)
- GD:
. Fixed bug #61221 (imagegammacorrect function loses alpha channel). (cmb)
- JSON
. Fixed bug #68546 (json_decode() Fatal error: Cannot access property
started with '\0'). (Jakub Zelenka)
- mysqlnd:
. Fixed Bug #69796 (mysqli_stmt::fetch doesn't assign null values to
bound variables). (Laruence)
- Curl:
. Fixed bug #69831 (Segmentation fault in curl_getinfo). (im dot denisenko at
yahoo dot com)
- Opcache:
. Removed opcache.load_comments configuration directive. Now doc comments
loading costs nothing and always enabled. (Dmitry)
. Fixed bug #69838 (Wrong size calculation for function table). (Anatol)
- PCRE:
. Fixed bug #69864 (Segfault in preg_replace_callback) (cmb, ab)
- PDO_pgsql:
. Fixed bug #69752 (PDOStatement::execute() leaks memory with DML
Statements when closeCuror() is u). (Philip Hofstetter)
- SPL
. Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken). (Dmitry)
- SQLite3
. Fixed bug #69897 (segfault when manually constructing SQLite3Result).
(Kalle)
- Standard
. Fixed bug #62922 (Truncating entire string should result in string).
(Nikita)
11 Jun 2015, PHP 7.0.0 Alpha 1
- Core:
. Fixed bug #69767 (Default parameter value with wrong type segfaults).
(cmb, Laruence)
. Fixed bug #69756 (Fatal error: Nesting level too deep - recursive dependency
@@ -397,7 +221,6 @@ PHP NEWS
. Improved zend_qsort(using hybrid sorting algo) for better performance,
and also renamed zend_qsort to zend_sort. (Laruence)
. Added stable sorting algo zend_insert_sort. (Laruence)
. Improved zend_memnchr(using sunday algo) for better performance. (Laruence)
. Implemented the RFC `Scalar Type Decalarations v0.5`. (Anthony)
. Implemented the RFC `Group Use Declarations`. (Marcio)
. Implemented the RFC `Continue Output Buffering`. (Mike)
@@ -410,37 +233,16 @@ PHP NEWS
(Jan Starke, Anatol)
- CLI server:
. Fixed bug #68291 (404 on urls with '+'). (cmb)
. Fixed bug #66606 (Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE).
(wusuopu, cmb)
. Fixed bug #70264 (CLI server directory traversal). (cmb)
. Fixed bug #69655 (php -S changes MKCALENDAR request method to MKCOL). (cmb)
. Fixed bug #64878 (304 responses return Content-Type header). (cmb)
. Refactor MIME type handling to use a hash table instead of linear search.
(Adam)
. Update the MIME type list from the one shipped by Apache HTTPD. (Adam)
. Added support for SEARCH WebDav method. (Mats Lindh)
- COM:
. Fixed bug #69939 (Casting object to bool returns false). (Kalle)
- Curl:
. Fixed bug #70330 (Segmentation Fault with multiple "curl_copy_handle").
(Laruence)
. Fixed bug #70163 (curl_setopt_array() type confusion). (Laruence)
. Fixed bug #70065 (curl_getinfo() returns corrupted values). (Anatol)
. Fixed bug #69831 (Segmentation fault in curl_getinfo). (im dot denisenko at
yahoo dot com)
. Fixed bug #68937 (Segfault in curl_multi_exec). (Laruence)
. Removed support for unsafe file uploads. (Nikita)
- Date:
. Fixed bug #70245 (strtotime does not emit warning when 2nd parameter is
object or string). (cmb)
. Fixed bug #70266 (DateInterval::__construct.interval_spec is not supposed to
be optional). (cmb)
. Fixed bug #70277 (new DateTimeZone($foo) is ignoring text after null byte).
(cmb)
. Fixed day_of_week function as it could sometimes return negative values
internally. (Derick)
. Removed $is_dst parameter from mktime() and gmmktime(). (Nikita)
@@ -448,8 +250,8 @@ PHP NEWS
(https://wiki.php.net/rfc/date.timezone_warning_removal). (Bob)
. Added "v" DateTime format modifier to get the 3-digit version of fraction
of seconds. (Mariano Iglesias)
. Implemented FR #69089 (Added DateTime::RFC3339_EXTENDED to output in
RFC3339 Extended format which includes fraction of seconds). (Mariano
. Implemented FR #69089: Added DateTime::RFC3339_EXTENDED to output in
RFC3339 Extended format which includes fraction of seconds (Mariano
Iglesias)
- DBA:
@@ -457,17 +259,11 @@ PHP NEWS
. Fixed bug #68711 (useless comparisons). (bugreports at internot dot info)
- DOM:
. Fixed bug #70558 ("Couldn't fetch" error in
DOMDocument::registerNodeClass()). (Laruence)
. Fixed bug #70001 (Assigning to DOMNode::textContent does additional entity
encoding). (cmb)
. Fixed bug #69846 (Segmenation fault (access violation) when iterating over
DOMNodeList). (Anatol Belski)
. Made DOMNode::textContent writeable. (Tjerk)
- EXIF:
. Fixed bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte
value of 32 bytes). (Stas)
- GD:
. Made fontFetch's path parser thread-safe. (Sara)
. Removed T1Lib support. (Kalle)
- Fileinfo:
. Fixed bug #66242 (libmagic: don't assume char is signed). (ArdB)
@@ -476,66 +272,24 @@ PHP NEWS
. New FILTER_VALIDATE_DOMAIN and better RFC conformance for FILTER_VALIDATE_URL. (Kevin Dunglas)
- FPM:
. Fixed bug #70538 ("php-fpm -i" crashes). (rainer dot jung at
kippdata dot de)
. Fixed bug #70279 (HTTP Authorization Header is sometimes passed to newer
reqeusts). (Laruence)
. Fixed bug #68945 (Unknown admin values segfault pools). (Laruence)
. Fixed bug #65933 (Cannot specify config lines longer than 1024 bytes). (Chris Wright)
. Implemented FR #67106 (Split main fpm config). (Elan Ruusamäe, Remi)
. Implement request #67106 (Split main fpm config). (Elan Ruusamäe, Remi)
- FTP:
. Fixed bug #69082 (FTPS support on Windows). (Anatol)
- GD:
. Fixed bug #53156 (imagerectangle problem with point ordering). (cmb)
. Fixed bug #66387 (Stack overflow with imagefilltoborder). (cmb)
. Fixed bug #70102 (imagecreatefromwebm() shifts colors). (cmb)
. Fixed bug #66590 (imagewebp() doesn't pad to even length). (cmb)
. Fixed bug #66882 (imagerotate by -90 degrees truncates image by 1px). (cmb)
. Fixed bug #70064 (imagescale(..., IMG_BICUBIC) leaks memory). (cmb)
. Fixed bug #69024 (imagescale segfault with palette based image). (cmb)
. Fixed bug #53154 (Zero-height rectangle has whiskers). (cmb)
. Fixed bug #67447 (imagecrop() add a black line when cropping). (cmb)
. Fixed bug #68714 (copy 'n paste error). (cmb)
. Fixed bug #66339 (PHP segfaults in imagexbm). (cmb)
. Fixed bug #70047 (gd_info() doesn't report WebP support). (cmb)
. Replace libvpx with libwebp for bundled libgd. (cmb, Anatol)
. Fixed bug #61221 (imagegammacorrect function loses alpha channel). (cmb)
. Made fontFetch's path parser thread-safe. (Sara)
. Removed T1Lib support. (Kalle)
- GMP:
. Fixed bug #70284 (Use after free vulnerability in unserialize() with GMP).
(stas)
- hash:
. Fixed bug #70312 (HAVAL gives wrong hashes in specific cases). (letsgolee
at naver dot com)
- IMAP:
. Fixed bug #70158 (Building with static imap fails). (cmb)
. Fixed bug #69998 (curl multi leaking memory). (Pierrick)
- Intl:
. Fixed bug #70453 (IntlChar::foldCase() incorrect arguments and missing
constants). (cmb)
. Fixed bug #70454 (IntlChar::forDigit second parameter should be optional).
(cmb, colinodell)
. Removed deprecated aliases datefmt_set_timezone_id() and
IntlDateFormatter::setTimeZoneID(). (Nikita)
- JSON:
. Fixed bug #62010 (json_decode produces invalid byte-sequences).
(Jakub Zelenka)
. Fixed bug #68546 (json_decode() Fatal error: Cannot access property
started with '\0'). (Jakub Zelenka)
- JSON
. Replace non-free JSON parser with a parser from Jsond extension, fixes #63520
(JSON extension includes a problematic license statement). (Jakub Zelenka)
. Fixed bug #68938 (json_decode() decodes empty string without error).
(jeremy at bat-country dot us)
- LDAP:
- LDAP
. Fixed bug #47222 (Implement LDAP_OPT_DIAGNOSTIC_MESSAGE). (Andreas Heigl)
- LiteSpeed:
@@ -546,57 +300,11 @@ PHP NEWS
(Christoph M. Becker)
- Mcrypt:
. Fixed bug #70625 (mcrypt_encrypt() won't return data when no IV was
specified under RC4). (Nikita)
. Fixed bug #69833 (mcrypt fd caching not working). (Anatol)
. Fixed possible read after end of buffer and use after free. (Dmitry)
. Removed mcrypt_generic_end() alias. (Nikita)
. Removed mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb(), mcrypt_ofb(). (Nikita)
- Mysqli:
. Fixed bug #32490 (constructor of mysqli has wrong name). (cmb)
- Mysqlnd:
. Fixed bug #70949 (SQL Result Sets With NULL Can Cause Fatal Memory Errors).
(Laruence)
. Fixed bug #70384 (mysqli_real_query():Unknown type 245 sent by the server).
(Andrey)
. Fixed bug #70456 (mysqlnd doesn't activate TCP keep-alive when connecting to
a server). (Sergei Turchanov)
. Fixed bug #70572 segfault in mysqlnd_connect. (Andrey, Remi)
. Fixed Bug #69796 (mysqli_stmt::fetch doesn't assign null values to
bound variables). (Laruence)
- OCI8:
. Fixed memory leak with LOBs. (Senthil)
. Fixed bug #68298 (OCI int overflow) (Senthil).
. Corrected oci8 hash destructors to prevent segfaults, and a few other fixes.
(Cameron Porter)
- ODBC:
. Fixed bug #69975 (PHP segfaults when accessing nvarchar(max) defined
columns). (cmb)
- Opcache:
. Fixed bug #70656 (require() statement broken after opcache_reset() or a
few hours of use). (Laruence)
. Fixed bug #70843 (Segmentation fault on MacOSX with
opcache.file_cache_only=1). (Laruence)
. Fixed bug #70724 (Undefined Symbols from opcache.so on Mac OS X 10.10).
(Laruence)
. Fixed compatibility with Windows 10 (see also bug #70652). (Anatol)
. Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken)
. Fixed bug #70423 (Warning Internal error: wrong size calculation). (Anatol)
. Fixed bug #70237 (Empty while and do-while segmentation fault with opcode
on CLI enabled). (Dmitry, Laruence)
. Fixed bug #70111 (Segfault when a function uses both an explicit return
type and an explicit cast). (Laruence)
. Fixed bug #70058 (Build fails when building for i386). (Laruence)
. Fixed bug #70022 (Crash with opcache using opcache.file_cache_only=1).
(Anatol)
. Removed opcache.load_comments configuration directive. Now doc comments
loading costs nothing and always enabled. (Dmitry)
. Fixed bug #69838 (Wrong size calculation for function table). (Anatol)
. Fixed bug #69688 (segfault with eval and opcache fast shutdown).
(Laruence)
. Added experimental (disabled by default) file based opcode cache.
@@ -607,18 +315,6 @@ PHP NEWS
+ Opcache). (Laruence)
- OpenSSL:
. Require at least OpenSSL version 0.9.8. (Jakub Zelenka)
. Fixed bug #68312 (Lookup for openssl.cnf causes a message box). (Anatol)
. Fixed bug #55259 (openssl extension does not get the DH parameters from
DH key resource). (Jakub Zelenka)
. Fixed bug #70395 (Missing ARG_INFO for openssl_seal()). (cmb)
. Fixed bug #60632 (openssl_seal fails with AES). (Jakub Zelenka)
. Implemented FR #70438 (Add IV parameter for openssl_seal and openssl_open)
(Jakub Zelenka)
. Fixed bug #70014 (openssl_random_pseudo_bytes() is not cryptographically
secure). (Stas)
. Fixed bug #69882 (OpenSSL error "key values mismatch" after
openssl_pkcs12_read with extra cert). (Tomasz Sawicki)
. Added "alpn_protocols" SSL context option allowing encrypted client/server
streams to negotiate alternative protocols using the ALPN TLS extension when
built against OpenSSL 1.0.2 or newer. Negotiated protocol information is
@@ -626,191 +322,56 @@ PHP NEWS
. Removed "CN_match" and "SNI_server_name" SSL context options. Use automatic
detection or the "peer_name" option instead. (Nikita)
- Pcntl:
. Fixed bug #70386 (Can't compile on NetBSD because of missing WCONTINUED
and WIFCONTINUED). (Matteo)
- pcntl:
. Fixed bug #60509 (pcntl_signal doesn't decrease ref-count of old handler
when setting SIG_DFL). (Julien)
. Implemented FR #68505 (Added wifcontinued and wcontinued). (xilon-jul)
. Added wifcontinued and wcontinued. (xilon-jul)
. Added rusage support to pcntl_wait() and pcntl_waitpid(). (Anton Stepanenko,
Tony)
- PCRE:
. Fixed bug #70232 (Incorrect bump-along behavior with \K and empty string
match). (cmb)
. Fixed bug #70345 (Multiple vulnerabilities related to PCRE functions).
(Anatol Belski)
. Fixed bug #70232 (Incorrect bump-along behavior with \K and empty string
match). (cmb)
. Fixed bug #53823 (preg_replace: * qualifier on unicode replace garbles the
string). (cmb)
. Fixed bug #69864 (Segfault in preg_replace_callback). (cmb, ab)
. Removed support for the /e (PREG_REPLACE_EVAL) modifier. (Nikita)
- PDO:
. Fixed bug #70861 (Segmentation fault in pdo_parse_params() during Drupal 8
test suite). (Anatol)
. Fixed bug #70389 (PDO constructor changes unrelated variables). (Laruence)
. Fixed bug #70272 (Segfault in pdo_mysql). (Laruence)
. Fixed bug #70221 (persistent sqlite connection + custom function
segfaults). (Laruence)
. Removed support for the /e (PREG_REPLACE_EVAL) modifier. (Nikita)
. Fixed bug #59450 (./configure fails with "Cannot find php_pdo_driver.h").
(maxime dot besson at smile dot fr)
- PDO_DBlib:
. Fixed bug #69757 (Segmentation fault on nextRowset).
(miracle at rpz dot name)
- PDO_mysql:
. Fixed bug #68424 (Add new PDO mysql connection attr to control multi
statements option). (peter dot wolanin at acquia dot com)
- PDO_OCI:
. Fixed bug #70308 (PDO::ATTR_PREFETCH is ignored). (Chris Jones)
- PDO_pgsql:
. Fixed bug #69752 (PDOStatement::execute() leaks memory with DML
Statements when closeCuror() is u). (Philip Hofstetter)
. Removed PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT attribute in favor of
ATTR_EMULATE_PREPARES). (Nikita)
- Phar:
. Fixed bug #69720 (Null pointer dereference in phar_get_fp_offset()). (Stas)
. FIxed bug #70433 (Uninitialized pointer in phar_make_dirstream when zip
entry filename is "/"). (Stas)
. Improved fix for bug #69441. (Anatol Belski)
. Fixed bug #70019 (Files extracted from archive may be placed outside of
destination directory). (Anatol Belski)
- Phpdbg:
. Fixed bug #70614 (incorrect exit code in -rr mode with Exceptions). (Bob)
. Fixed bug #70532 (phpdbg must respect set_exception_handler). (Bob)
. Fixed bug #70531 (Run and quit mode (-qrr) should not fallback to
interactive mode). (Bob)
. Fixed bug #70533 (Help overview (-h) does not rpint anything under Windows).
(Anatol)
. Fixed bug #70449 (PHP won't compile on 10.4 and 10.5 because of missing
constants). (Bob)
. Fixed bug #70214 (FASYNC not defined, needs sys/file.h include). (Bob)
. Fixed bug #70138 (Segfault when displaying memory leaks). (Bob)
- Reflection:
. Fixed bug #70650 (Wrong docblock assignment). (Marcio)
. Fixed bug #70674 (ReflectionFunction::getClosure() leaks memory when used
for internal functions). (Dmitry, Bob)
. Fixed bug causing bogus traces for ReflectionGenerator::getTrace(). (Bob)
- Reflection
. Fixed inheritance chain of Reflector interface. (Tjerk)
. Added ReflectionGenerator class. (Bob)
. Added reflection support for return types and type declarations. (Sara,
Matteo)
- Session:
. Fixed bug #70876 (Segmentation fault when regenerating session id with
strict mode). (Laruence)
. Fixed bug #70529 (Session read causes "String is not zero-terminated" error).
(Yasuo)
. Fixed bug #70013 (Reference to $_SESSION is lost after a call to
session_regenerate_id()). (Yasuo)
. Fixed bug #69952 (Data integrity issues accessing superglobals by
reference). (Bob)
. Fixed bug #67694 (Regression in session_regenerate_id()). (Tjerk)
. Fixed bug #68941 (mod_files.sh is a bash-script). (bugzilla at ii.nl, Yasuo)
- SOAP:
. Fixed bug #70940 (Segfault in soap / type_to_string). (Remi)
. Fixed bug #70900 (SoapClient systematic out of memory error). (Dmitry)
. Fixed bug #70875 (Segmentation fault if wsdl has no targetNamespace
attribute). (Matteo)
. Fixed bug #70715 (Segmentation fault inside soap client). (Laruence)
. Fixed bug #70709 (SOAP Client generates Segfault). (Laruence)
. Fixed bug #70388 (SOAP serialize_function_call() type confusion / RCE).
(Stas)
. Fixed bug #70081 (SoapClient info leak / null pointer dereference via
multiple type confusions). (Stas)
. Fixed bug #70079 (Segmentation fault after more than 100 SoapClient
calls). (Laruence)
. Fixed bug #70032 (make_http_soap_request calls
zend_hash_get_current_key_ex(,,,NULL). (Laruence)
. Fixed bug #68361 (Segmentation fault on SoapClient::__getTypes). (Laruence)
- SPL:
. Fixed bug #70959 (ArrayObject unserialize does not restore protected
fields). (Laruence)
. Fixed bug #70853 (SplFixedArray throws exception when using ref variable
as index). (Laruence)
. Fixed bug #70868 (PCRE JIT and pattern reuse segfault). (Laruence)
. Fixed bug #70730 (Incorrect ArrayObject serialization if unset is called
in serialize()). (Laruence)
. Fixed bug #70573 (Cloning SplPriorityQueue leads to memory leaks). (Dmitry)
. Fixed bug #70303 (Incorrect constructor reflection for ArrayObject). (cmb)
. Fixed bug #70068 (Dangling pointer in the unserialization of ArrayObject
items). (sean.heelan)
. Fixed bug #70166 (Use After Free Vulnerability in unserialize() with
SPLArrayObject). (taoguangchen at icloud dot com)
. Fixed bug #70168 (Use After Free Vulnerability in unserialize() with
SplObjectStorage). (taoguangchen at icloud dot com)
. Fixed bug #70169 (Use After Free Vulnerability in unserialize() with
SplDoublyLinkedList). (taoguangchen at icloud dot com)
. Fixed bug #70053 (MutlitpleIterator array-keys incompatible change in
PHP 7). (Tjerk)
. Fixed bug #69970 (Use-after-free vulnerability in
spl_recursive_it_move_forward_ex()). (Laruence)
. Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken). (Dmitry)
. Changed ArrayIterator implementation using zend_hash_iterator_... API.
Allowed modification of iterated ArrayObject using the same behavior
as proposed in `Fix "foreach" behavior`. Removed "Array was modified
outside object and internal position is no longer valid" hack. (Dmitry)
. Implemented FR #67886 (SplPriorityQueue/SplHeap doesn't expose extractFlags
. Implemented #67886 (SplPriorityQueue/SplHeap doesn't expose extractFlags
nor curruption state). (Julien)
. Fixed bug #66405 (RecursiveDirectoryIterator::CURRENT_AS_PATHNAME
breaks the RecursiveIterator). (Paul Garvin)
- SQLite3:
. Fixed bug #70571 (Memory leak in sqlite3_do_callback). (Adam)
. Fixed bug #69972 (Use-after-free vulnerability in
sqlite3SafetyCheckSickOrOk()). (Laruence)
. Fixed bug #69897 (segfault when manually constructing SQLite3Result).
(Kalle)
- Sqlite3:
. Fixed bug #68260 (SQLite3Result::fetchArray declares wrong
required_num_args). (Julien)
- Standard:
. Fixed count on symbol tables. (Laruence)
. Fixed bug #70963 (Unserialize shows UNKNOWN in result). (Laruence)
. Fixed bug #70910 (extract() breaks variable references). (Laruence)
. Fixed bug #70808 (array_merge_recursive corrupts memory of unset items).
(Laruence)
. Fixed bug #70667 (strtr() causes invalid writes and a crashes). (Dmitry)
. Fixed bug #70668 (array_keys() doesn't respect references when $strict is
true). (Bob, Dmitry)
. Implemented the RFC `Random Functions Throwing Exceptions in PHP 7`.
(Sammy Kaye Powers, Anthony)
. Fixed bug #70487 (pack('x') produces an error). (Nikita)
. Fixed bug #70342 (changing configuration with ignore_user_abort(true) isn't
working). (Laruence)
. Fixed bug #70295 (Segmentation fault with setrawcookie). (Bob)
. Fixed bug #67131 (setcookie() conditional for empty values not met). (cmb)
. Fixed bug #70365 (Use-after-free vulnerability in unserialize() with
SplObjectStorage). (taoguangchen at icloud dot com)
. Fixed bug #70366 (Use-after-free vulnerability in unserialize() with
SplDoublyLinkedList). (taoguangchen at icloud dot com)
. Fixed bug #70250 (extract() turns array elements to references).
(Laruence)
. Fixed bug #70211 (php 7 ZEND_HASH_IF_FULL_DO_RESIZE use after free).
(Laruence)
. Fixed bug #70208 (Assert breaking access on objects). (Bob)
. Fixed bug #70140 (str_ireplace/php_string_tolower - Arbitrary Code
Execution). (CVE-2015-6527) (Laruence)
. Implemented FR #70112 (Allow "dirname" to go up various times). (Remi)
. Fixed bug #36365 (scandir duplicates file name at every 65535th file). (cmb)
. Fixed bug #70096 (Repeated iptcembed() adds superfluous FF bytes). (cmb)
. Fixed bug #70018 (exec does not strip all whitespace). (Laruence)
. Fixed bug #69983 (get_browser fails with user agent of null).
(Kalle, cmb, Laruence)
. Fixed bug #69976 (Unable to parse "all" urls with colon char). (cmb)
. Fixed bug #69768 (escapeshell*() doesn't cater to !). (cmb)
. Fixed bug #62922 (Truncating entire string should result in string).
(Nikita)
. Fixed bug #69723 (Passing parameters by reference and array_column).
(Laruence)
. Fixed bug #69523 (Cookie name cannot be empty). (Christoph M. Becker)
@@ -835,26 +396,12 @@ PHP NEWS
. Removed hardcoded limit on number of pipes in proc_open(). (Tony)
- Streams:
. Fixed bug #70361 (HTTP stream wrapper doesn't close keep-alive connections).
(Niklas Keller)
. Fixed bug #68532 (convert.base64-encode omits padding bytes).
(blaesius at krumedia dot de)
. Removed set_socket_blocking() in favor of its alias stream_set_blocking().
(Nikita)
- Tokenizer:
. Fixed bug #69430 (token_get_all has new irrecoverable errors). (Nikita)
- XMLReader:
. Fixed bug #70309 (XmlReader read generates extra output). (Anatol)
- XMLRPC
. Fixed bug #70526 (xmlrpc_set_type returns false on success). (Laruence)
- XSL:
. Fixed bug #70678 (PHP7 returns true when false is expected). (Felipe)
. Fixed bug #70535 (XSLT: free(): invalid pointer). (Laruence)
. Fixed bug #69782 (NULL pointer dereference). (Stas)
. Fixed bug #64776 (The XSLT extension is not thread safe). (Mike)
. Removed xsl.security_prefs ini option. (Nikita)
@@ -864,12 +411,10 @@ PHP NEWS
(Daniel Lowrey & Bob Weinand)
- Zip:
. Fixed bug #70322 (ZipArchive::close() doesn't indicate errors). (cmb)
. Fixed bug #70350 (ZipArchive::extractTo allows for directory traversal when
creating directories). (neal at fb dot com)
. Added ZipArchive::setCompressionName and ZipArchive::setCompressionIndex
methods. (Remi, Cedric Delmas)
. Update bundled libzip to 1.0.1. (Remi, Anatol)
. Fixed bug #67161 (ZipArchive::getStream() returns NULL for certain file).
methods (Remi, Cedric Delmas)
. Update bundled libzip to 1.0.1 (Remi, Anatol)
. Fixed bug #67161. (ZipArchive::getStream() returns NULL for certain file)
(Christoph M. Becker)
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
+6 -6
View File
@@ -12,7 +12,7 @@ Collaboration is a Good Thing(tm), and Git lets us do this. Thus, following
some basic rules with regards to Git usage will::
a. Make everybody happier, especially those responsible for maintaining
PHP itself.
Git itself.
b. Keep the changes consistently well documented and easily trackable.
@@ -48,11 +48,11 @@ Currently we have the following branches in use::
PHP-5.6 Is used to release the PHP 5.6.x series. This is a current
stable version and is open for bugfixes only.
PHP-5.5 Is used to release the PHP 5.5.x series. This is an old
stable version and is open for security fixes only.
PHP-5.5 Is used to release the PHP 5.5.x series. This is a current
stable version and is open for bugfixes only.
PHP-5.4 Is used to release the PHP 5.4.x series. This is an old
stable version and is open for security fixes only.
PHP-5.4 Is used to release the PHP 5.4.x series. This is a current
stable version and is open for bugfixes only.
PHP-5.3 This branch is closed.
@@ -67,7 +67,7 @@ Currently we have the following branches in use::
The next few rules are more of a technical nature::
1. All changes should first go to the lowest branch (i.e. 5.6) and then
1. All changes should first go to the lowest branch (i.e. 5.4) and then
get merged up to all other branches. If a change is not needed for
later branches (i.e. fixes for features which where dropped from later
branches) an empty merge should be done.
+2 -6
View File
@@ -165,11 +165,9 @@ TSRM_API void *tsrm_get_ls_cache(void);
#define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx
#define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_get_ls_cache()
#define TSRMG(id, type, element) (TSRMG_BULK(id, type)->element)
#define TSRMG_BULK(id, type) ((type) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(id)])
#define TSRMG(id, type, element) (((type) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
#define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
#define TSRMG_BULK_STATIC(id, type) ((type) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(id)])
#define TSRMG_STATIC(id, type, element) (((type) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
#define TSRMLS_CACHE_EXTERN() extern TSRM_TLS void *TSRMLS_CACHE
#define TSRMLS_CACHE_DEFINE() TSRM_TLS void *TSRMLS_CACHE = NULL
#if ZEND_DEBUG
@@ -202,8 +200,6 @@ TSRM_API void *tsrm_get_ls_cache(void);
#define TSRMLS_CACHE_UPDATE()
#define TSRMLS_CACHE
#define TSRM_TLS
/* BC only */
#define TSRMLS_D void
#define TSRMLS_DC
+3 -15
View File
@@ -49,7 +49,7 @@ TSRMLS_CACHE_UPDATE();
globals->shm = NULL;
globals->process_size = 0;
globals->shm_size = 0;
globals->comspec = _strdup("cmd.exe");
globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com");
/* Set it to INVALID_HANDLE_VALUE
* It will be initialized correctly in tsrm_win32_access or set to
@@ -437,7 +437,6 @@ static shm_pair *shm_get(int key, void *addr)
TWG(shm) = newptr;
ptr = newptr + TWG(shm_size);
TWG(shm_size)++;
memset(ptr, 0, sizeof(*ptr));
return ptr;
}
@@ -599,8 +598,8 @@ TSRM_API int shmget(int key, int size, int flags)
return -1;
}
snprintf(shm_segment, sizeof(shm_segment), "TSRM_SHM_SEGMENT:%d", key);
snprintf(shm_info, sizeof(shm_info), "TSRM_SHM_DESCRIPTOR:%d", key);
sprintf(shm_segment, "TSRM_SHM_SEGMENT:%d", key);
sprintf(shm_info, "TSRM_SHM_DESCRIPTOR:%d", key);
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
@@ -612,12 +611,6 @@ TSRM_API int shmget(int key, int size, int flags)
created = TRUE;
}
if (!shm_handle || !info_handle) {
if (shm_handle) {
CloseHandle(shm_handle);
}
if (info_handle) {
CloseHandle(info_handle);
}
return -1;
}
} else {
@@ -627,11 +620,6 @@ TSRM_API int shmget(int key, int size, int flags)
}
shm = shm_get(key, NULL);
if (!shm) {
CloseHandle(shm_handle);
CloseHandle(info_handle);
return -1;
}
shm->segment = shm_handle;
shm->info = info_handle;
shm->descriptor = MapViewOfFileEx(shm->info, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
+19 -57
View File
@@ -1,4 +1,6 @@
PHP 7.0 UPGRADE NOTES
$Id$
PHP X.Y UPGRADE NOTES
1. Backward Incompatible Changes
2. New Features
@@ -352,7 +354,7 @@ Relevant RFCs:
Other language changes
----------------------
* Removed support for static calls to non-static methods from an incompatible
* Removed support for static calls to non-static calls form an incompatible
$this context. In this case $this will not be defined, but the call will be
allowed with a deprecation notice. An example:
@@ -427,12 +429,12 @@ Other language changes
Standard library changes
========================
. substr() now returns an empty string instead of FALSE when the truncation happens on boundaries.
. call_user_method() and call_user_method_array() no longer exists.
. ob_start() no longer issues an E_ERROR, but instead an E_RECOVERABLE_ERROR in case an
output buffer is created in an output buffer handler.
. The internal sorting algorithm has been improved, what may result in
different sort order of elements that compare as equal.
. Improved zend_qsort(using hybrid sorting algo) for better performance,
and also renamed zend_qsort to zend_sort.
. Added stable sorting algo zend_insert_sort.
. Removed dl() function on fpm-fcgi.
. setcookie() with an empty cookie name now issues a WARNING and doesn't send an empty set-cookie header line anymore.
@@ -532,8 +534,7 @@ Other
. Closure::call() method added (works only with userland classes).
. Added \u{xxxxxx} Unicode Codepoint Escape Syntax for double-quoted strings
and heredocs.
. define() now supports arrays as constant values, fixing an oversight where
define() did not support arrays yet const syntax did.
. define() now supports arrays as constant values, fixing an oversight where define() did not support arrays yet const syntax did.
. Added the comparison operator (<=>), aka the spaceship operator.
(RFC: https://wiki.php.net/rfc/combined-comparison-operator)
. Added the yield from operator for delegating Generators like coroutines.
@@ -546,20 +547,14 @@ Other
(RFC: https://wiki.php.net/rfc/easy_userland_csprng)
- Opcache
. Added second level file based opcode cache. It may be enabled by setting
opcache.file_cache=<DIR> configuration directive in php.ini. The second
level cache may improve performance when SHM is full, at server restart or
SHM reset. In addition, it's possibe to use file cache without SHM at all,
using opcache.file_cache_only=1 (this may be useful for sharing hosting),
and disable file cache consistency check, to speedup loading at the cost of
safety, using opcache.file_cache_consistency_checks=0.
. Added ability to move PHP code pages (PHP TEXT segment) into HUGE pages.
It's possible to enable/disable this feature in php.ini through
opcache.huge_code_pages=0/1. OS should be configured to provide huge pages.
. Added Windows only opcache.file_cache_fallback=1 ini option, which implies
the implemented fallback mechanism. When OPcache was not able to reattach
the shared memory segment to the desired address and opcache.file_cache
is on, opcache.file_cache_only=1 will be automatically enforced.
. Added second level file based opcode cache (experimental - disabled by
default). To enable it, PHP should be configured and built with
--enable-opcache-file, then opcache.file_cache=<DIR> configuration directive
should be set in php.ini. The second level cache may improve performance
at server restart or SHM reset. In addition, it's possibe to use file cache
without SHM at all, using opcache.file_cache_only=1 (this may be useful for
sharing hosting), and disable file cache consistency check, to speedup
loading at the cost of safety, using opcache.file_cache_consistency_checks=0.
- OpenSSL
. Added "alpn_protocols" SSL context option allowing encrypted client/server
@@ -608,6 +603,9 @@ Other
5. Changed Functions
========================================
- parse_ini_file():
- parse_ini_string():
. Added scanner mode INI_SCANNER_TYPED to yield typed .ini values.
- unserialize():
. Added second parameter for unserialize function
(RFC: https://wiki.php.net/rfc/secure_unserialize) allowing to specify
@@ -634,17 +632,9 @@ Other
on pipes. This option should be used carefully because due to the
platform restrictions dead locks on pipe buffers are possible.
- dirname()
A new optional argument ($levels) allow to go up various times
dirname(dirname($foo)) => dirname($foo, 2);
- debug_zval_dump
It prints now "int" instead of "long", and "float" instead of "double".
========================================
6. New Functions
========================================
- GMP
. Added gmp_random_seed().
@@ -656,10 +646,6 @@ Other
. Added intdiv() function for integer division.
. Added error_clear_last() function to reset error state.
- Zip:
. Added ZipArchive::setCompressionIndex() and ZipArchive::setCompressionName()
for setting the compression method.
- Zlib:
. Added deflate_init(), deflate_add(), inflate_init(), inflate_add()
functions allowing incremental/streaming compression/decompression.
@@ -668,8 +654,6 @@ Other
7. New Classes and Interfaces
========================================
- ReflectionGenerator
- ReflectionType
========================================
8. Removed Extensions and SAPIs
@@ -711,12 +695,6 @@ out, that the corresponding SDK isn't available anymore.
Mhash is not an extension anymore, use function_exists("mhash") to check whether
it is avaliable.
- GD
The bundled libgd requires libwebp instead of libvpx for the WebP functionality.
- Openssl
minimum supported OpenSSL version series was raised to 0.9.8
========================================
10. New Global Constants
========================================
@@ -724,11 +702,6 @@ out, that the corresponding SDK isn't available anymore.
- Core
. PHP_INT_MIN added.
- PCRE
. This error constant is added to signal errors due to stack size limitations
when PCRE JIT support is enabled:
. PREG_JIT_STACKLIMIT_ERROR
- Zlib
. These constants are added to control flush behavior with the new
incremental deflate_add() and inflate_add() functions:
@@ -780,9 +753,6 @@ out, that the corresponding SDK isn't available anymore.
it depends alone on the openssl library. If it's present at the compile time,
ftp_ssl_connect() is enabled automatically.
- imap
. Static building of ext/imap is disabled
- odbc
. The odbc extension is always shipped shared
@@ -799,11 +769,3 @@ out, that the corresponding SDK isn't available anymore.
always say "integer" and "float" instead of "long" and "double".
. Output buffering now continues to work for an aborted connection if
ignore_user_abort is set to true.
. Zend Extensions API was extended with zend_extension.op_array_persist_calc()
and zend_extensions.op_array_persist() handlers. They allow to store (or
reset) associated with op_array addition information in Opcache Shared
Memory.
. zend_internal_function.reserved[] array was introduced to allow association
of aditional information with internal functions. In PHP-5 it was possible
to use zend_function.op_array.reserved[] even for internal functions, but
now we don't allocate extra space.
+3 -36
View File
@@ -1,3 +1,5 @@
$Id$
PHP 7.0 INTERNALS UPGRADE NOTES
0. Wiki Examples
@@ -19,7 +21,6 @@ PHP 7.0 INTERNALS UPGRADE NOTES
s. Resource API changes
t. Optimized strings concatenation.
u. Streams changes
v. Sort algorithm changes
2. Build system changes
a. Unix build system changes
@@ -90,7 +91,7 @@ changes. See: https://wiki.php.net/phpng-upgrading
The only exceptions are the snprintf and zend_sprintf functions yet, because in some cases
they can use the implemenations available on the system, not the PHP one. With snprintf the
macros ZEND_LONG_FMT and ZEND_ULONG_FMT should be used.
macros ZEND_INT_FMT and ZEND_UINT_FMT should be used.
h. HashTable API
@@ -193,29 +194,6 @@ changes. See: https://wiki.php.net/phpng-upgrading
into the destructor. So the previous example could look like
free(my_struct->vars); given the income was casted to (struct my_struct *).
A new macro was introduced to simplify the declaration to the extension
globals. A simplified declaration looks as follows
#define MYEXT_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(myext, v)
Another new macro ZEND_MODULE_GLOBALS_BULK(myext) delivers the corresponding
globals struct as a whole.
Two new storage specifiers was introduced.
ZEND_EXT_TLS - expand to an appropriate thread specific storage specifier in
the thread safe build, expands to empty in a non thread safe
build.
ZEND_TLS - expands to an appropriate thread specific storage specifier
with static visibility in the thread safe build, expands to
static specifier in a non thread safe build.
Variables declared with these storage specifiers can not be shared across
threads. While ZEND_TLS enforces the local scope visibility, ZEND_EXT_TLS
pertains to the visiblity across several compilation units. In both cases,
there's no portable way to achieve the visibility across shared objects.
Thus, these specifiers are not compatible with ZEND_API and PHPAPI specifiers.
q. gc_collect_cycles() is now a function pointer, and can be replaced in the
same manner as zend_execute_ex() if needed (for example, to include the
time spent in the garbage collector in a profiler). The default
@@ -241,17 +219,6 @@ changes. See: https://wiki.php.net/phpng-upgrading
using context stream option PHP_STREAM_OPTION_PIPE_BLOCKING or
adding STREAM_USE_BLOCKING_PIPE when opening the stream.
v. Sort algorithm changes
- Improved zend_qsort(using hybrid sorting algo) for better performance,
and also renamed zend_qsort to zend_sort.
- Added stable sorting algo zend_insert_sort.
w. Tick functions internal API change
Tick functions have different declaration now. They expect a single
parameter while before they were parameterless. When registering the
tick function a value for this parameter must be passed. This value will be
provided to the tick function on every execution.
========================
2. Build system changes
========================
+1 -4
View File
@@ -421,6 +421,7 @@ AC_ARG_ENABLE(gcc-global-regs,
AC_MSG_CHECKING(for global register variables support)
if test "$ZEND_GCC_GLOBAL_REGS" != "no"; then
AC_TRY_COMPILE([
],[
#if defined(__GNUC__)
# define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#else
@@ -435,9 +436,6 @@ if test "$ZEND_GCC_GLOBAL_REGS" != "no"; then
#elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__powerpc64__)
# define ZEND_VM_FP_GLOBAL_REG "r28"
# define ZEND_VM_IP_GLOBAL_REG "r29"
#elif defined(__IBMC__) && ZEND_GCC_VERSION >= 4002 && defined(__powerpc64__)
# define ZEND_VM_FP_GLOBAL_REG "r28"
# define ZEND_VM_IP_GLOBAL_REG "r29"
#else
# error "global register variables are not supported"
#endif
@@ -453,7 +451,6 @@ int emu(const opcode_handler_t *ip, void *fp) {
FP = orig_fp;
IP = orig_ip;
}
], [
], [
ZEND_GCC_GLOBAL_REGS=yes
], [
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Ensure proper inheritance with get_class(anon class instance) used via class_alias (see also bug #70106)
--FILE--
<?php
class_alias(get_class(new class { protected $foo = 1; }), "AnonBase");
var_dump((new class extends AnonBase {
function getFoo() {
return $this->foo;
}
})->getFoo());
?>
--EXPECT--
int(1)
-11
View File
@@ -1,11 +0,0 @@
--TEST--
Ensure correct unmangling of private property names for anonymous class instances
--FILE--
<?php
var_dump(new class { private $foo; });
?>
--EXPECT--
object(class@anonymous)#1 (1) {
["foo":"class@anonymous":private]=>
NULL
}
@@ -1,19 +0,0 @@
--TEST--
Array addition is not commutative -- do not swap operands
--FILE--
<?php
$array = [1, 2, 3];
$array = [4, 5, 6] + $array;
var_dump($array);
?>
--EXPECT--
array(3) {
[0]=>
int(4)
[1]=>
int(5)
[2]=>
int(6)
}
-23
View File
@@ -1,23 +0,0 @@
--TEST--
Bug #70208 (scope information must be preserved with assert())
--FILE--
<?php
function non_class_scope() {
return true;
}
class test {
protected $prop = 1;
public function __construct() {
assert('non_class_scope();');
var_dump($this->prop);
}
}
new test;
?>
--EXPECT--
int(1)
-23
View File
@@ -1,23 +0,0 @@
--TEST--
Bug #70528 (assert() with instanceof adds apostrophes around class name)
--INI--
zend.assertions=1
assert.exception=0
assert.warning=1
--FILE--
<?php
namespace Foo;
class Bar {}
$bar = "Bar";
assert(new \stdClass instanceof $bar);
assert(new \stdClass instanceof Bar);
assert(new \stdClass instanceof \Foo\Bar);
?>
--EXPECTF--
Warning: assert(): assert(new \stdClass() instanceof $bar) failed in %sbug70528.php on line %d
Warning: assert(): assert(new \stdClass() instanceof Bar) failed in %sbug70528.php on line %d
Warning: assert(): assert(new \stdClass() instanceof \Foo\Bar) failed in %sbug70528.php on line %d
+1 -1
View File
@@ -18,7 +18,7 @@ bool(true)
bool(true)
Warning: assert(): assert(false) failed in %sexpect_016.php on line 6
bool(false)
NULL
bool(true)
Warning: zend.assertions may be completely enabled or disabled only in php.ini in %sexpect_016.php on line 8
+2 -2
View File
@@ -25,9 +25,9 @@ bool(true)
bool(true)
Warning: assert(): assert(false) failed in %sexpect_018.php on line 10
bool(false)
NULL
bool(true)
Warning: assert(): assert(false) failed in %sexpect_018.php on line 12
bool(false)
NULL
bool(true)
@@ -1,11 +0,0 @@
--TEST--
Empty statement in assert() shouldn't segfault
--FILE--
<?php
assert((function () { return true;; })());
echo "ok";
?>
--EXPECT--
ok
-10
View File
@@ -1,10 +0,0 @@
--TEST--
'break' error (non positive numbers)
--FILE--
<?php
function foo () {
break 0;
}
?>
--EXPECTF--
Fatal error: 'break' operator accepts only positive numbers in %sbreak_error_001.php on line 3
-10
View File
@@ -1,10 +0,0 @@
--TEST--
'break' error (operator with non-constant operand)
--FILE--
<?php
function foo () {
break $x;
}
?>
--EXPECTF--
Fatal error: 'break' operator with non-constant operand is no longer supported in %sbreak_error_002.php on line 3
-10
View File
@@ -1,10 +0,0 @@
--TEST--
'break' error (not in the loop context)
--FILE--
<?php
function foo () {
break;
}
?>
--EXPECTF--
Fatal error: 'break' not in the 'loop' or 'switch' context in %sbreak_error_003.php on line 3
-12
View File
@@ -1,12 +0,0 @@
--TEST--
'break' error (wrong level)
--FILE--
<?php
function foo () {
while (1) {
break 2;
}
}
?>
--EXPECTF--
Fatal error: Cannot 'break' 2 levels in %sbreak_error_004.php on line 4
+2 -2
View File
@@ -68,7 +68,7 @@ catch (Exception $e) {
--EXPECTF--
Hello World!
===NONE===
string(%d) "Method NoneTest::__toString() must return a string value"
string(56) "Method NoneTest::__toString() must return a string value"
===THROW===
Fatal error: Method ErrorTest::__toString() must not throw an exception, caught Exception: This is an error! in %sbug26166.php on line %d
Fatal error: Method ErrorTest::__toString() must not throw an exception in %sbug26166.php on line %d
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #52355 (Negating zero does not produce negative zero)
--FILE--
<?php
var_dump(-0.0);
var_dump(-(float)"0");
$foo = -sin(0);
var_dump($foo);
var_dump(@(1.0 / -0.0));
?>
--EXPECT--
float(-0)
float(-0)
float(-0)
float(-INF)
+1 -1
View File
@@ -14,7 +14,7 @@ class Bad {
$bad = new Bad();
echo "$bad";
--EXPECTF--
Fatal error: Method Bad::__toString() must not throw an exception, caught Exception: Oops, I cannot do this in %sbug60909_2.php on line %d
Fatal error: Method Bad::__toString() must not throw an exception in %sbug60909_2.php on line 0
!!!shutdown!!!
+6
View File
@@ -1,5 +1,11 @@
--TEST--
Bug #62358 (Segfault when using traits a lot)
--SKIPIF--
<?php
if (getenv("USE_ZEND_ALLOC") !== "0") {
die("skip Need Zend MM enabled");
}
?>
--FILE--
<?php
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #62441: Incorrect strong typing in namespaced child classes
--FILE--
<?php
namespace {
interface Iface {
function method(stdClass $o);
}
}
namespace ns {
class Foo implements \Iface {
function method(stdClass $o) { }
}
(new Foo)->method(new \stdClass);
}
?>
--EXPECTF--
Fatal error: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d
-6
View File
@@ -1,11 +1,5 @@
--TEST--
Bug #68412 (Infinite recursion with __call can make the program crash/segfault)
--SKIPIF--
<?php
if (getenv("USE_ZEND_ALLOC") !== "1") {
die("skip Need Zend MM enabled");
}
?>
--FILE--
<?php
class C {
+3 -4
View File
@@ -24,8 +24,7 @@ Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6
Notice: Indirect modification of overloaded property wpq::$interesting has no effect in %sbug69732.php on line 16
Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
Notice: Only variables should be assigned by reference in %sbug69732.php on line 16
Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6
XXX
+1 -2
View File
@@ -11,6 +11,5 @@ var_dump(serialize($instance));
--EXPECTF--
Fatal error: Uncaught Exception: Serialization of 'class@%s' is not allowed in %sbug69761.php:%d
Stack trace:
#0 %sbug69761.php(%d): serialize(Object(class@anonymous))
#1 {main}
#0 %sbug69761.php(%d): serialize(Object(class@%s
thrown in %sbug69761.php on line %d
-25
View File
@@ -1,25 +0,0 @@
--TEST--
Bug #69996 (Changing the property of a cloned object affects the original)
--FILE--
<?php
function method($cache) {
$prepared = clone $cache;
var_dump($prepared->data);
$prepared->data = "bad";
return $prepared;
}
$cache = new stdClass();
$cache->data = "good";
for ($i = 0; $i < 5; ++$i) {
method($cache);
}
?>
--EXPECT--
string(4) "good"
string(4) "good"
string(4) "good"
string(4) "good"
string(4) "good"
-37
View File
@@ -1,37 +0,0 @@
--TEST--
Bug #70089 (segfault in PHP 7 at ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER ())
--INI--
opcache.enable=0
--FILE--
<?php
function dummy($a) {
}
try {
chr(0)[0][] = 1;
} catch (Error $e) {
var_dump($e->getMessage());
}
try {
unset(chr(0)[0][0]);
} catch (Error $e) {
var_dump($e->getMessage());
}
eval("function runtimetest(&\$a) {} ");
try {
runtimetest(chr(0)[0]);
} catch (Error $e) {
var_dump($e->getMessage());
}
try {
++chr(0)[0];
} catch (Error $e) {
var_dump($e->getMessage());
}
?>
--EXPECTF--
string(36) "Cannot use string offset as an array"
string(27) "Cannot unset string offsets"
string(41) "Only variables can be passed by reference"
string(64) "Cannot increment/decrement overloaded objects nor string offsets"
-21
View File
@@ -1,21 +0,0 @@
--TEST--
Bug #70117 (Unexpected return type error)
--FILE--
<?php
function &foo() :string {
$a = array(1);
$b = &$a[0];
return $b;
}
function &foo1() :string {
$a = array("ref");
return $a[0];
}
var_dump(foo());
var_dump(foo1());
--EXPECT--
string(1) "1"
string(3) "ref"
-9
View File
@@ -1,9 +0,0 @@
--TEST--
Bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
--FILE--
<?php
unserialize('O:12:"DateInterval":1:{s:4:"days";O:9:"Exception":7:{s:10:"'."\0".'*'."\0".'message";s:1:"x";s:17:"'."\0".'Exception'."\0".'string";s:1:"A";s:7:"'."\0".'*'."\0".'code";i:0;s:7:"'."\0".'*'."\0".'file";s:1:"a";s:7:"'."\0".'*'."\0".'line";i:1337;s:16:"'."\0".'Exception'."\0".'trace";a:0:{}s:19:"'."\0".'Exception'."\0".'previous";O:8:"stdClass":0:{}}}');
?>
OK
--EXPECT--
OK
-47
View File
@@ -1,47 +0,0 @@
--TEST--
Bug #70124 (null ptr deref / seg fault in ZEND_HANDLE_EXCEPTION_SPEC_HANDLER)
--FILE--
<?php
try {
echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),$f("test"))],chr(48));
} catch (Error $e) {
var_dump($e->getMessage());
}
class A {
}
try {
echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),a::y("test"))],chr(48));
} catch (Error $e) {
var_dump($e->getMessage());
}
$a = new A;
try {
echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),$a->y("test"))],chr(48));
} catch (Error $e) {
var_dump($e->getMessage());
}
try {
echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),\bar\y("test"))],chr(48));
} catch (Error $e) {
var_dump($e->getMessage());
}
try {
echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),y("test"))],chr(48));
} catch (Error $e) {
var_dump($e->getMessage());
}
?>
--EXPECTF--
Notice: Undefined variable: f in %sbug70124.php on line %d
string(30) "Function name must be a string"
string(31) "Call to undefined method A::y()"
string(31) "Call to undefined method A::y()"
string(34) "Call to undefined function bar\y()"
string(30) "Call to undefined function y()"
-37
View File
@@ -1,37 +0,0 @@
--TEST--
Bug #70156 (Segfault in zend_find_alias_name)
--FILE--
<?php
trait T1 {
protected function foo1()
{
$this->bar();
}
}
trait T2 {
protected function foo2()
{
debug_print_backtrace();
}
}
class dummy {
use T1 {
foo1 as private;
}
use T2 {
foo2 as bar;
}
public function __construct()
{
$this->foo1();
}
}
new dummy();
?>
--EXPECTF--
#0 dummy->bar() called at [%sbug70156.php:%d]
#1 dummy->foo1() called at [%sbug70156.php:%d]
#2 dummy->__construct() called at [%sbug70156.php:%d]
-30
View File
@@ -1,30 +0,0 @@
--TEST--
__COMPILER_HALT_OFFSET__ is a "magic" constant, which should work if referenced directly, even in a namespace
--FILE--
<?php
namespace {
echo __COMPILER_HALT_OFFSET__, "\n";
echo \__COMPILER_HALT_OFFSET__, "\n";
}
namespace Foo {
echo __COMPILER_HALT_OFFSET__, "\n";
echo \__COMPILER_HALT_OFFSET__, "\n";
echo namespace\__COMPILER_HALT_OFFSET__, "\n";
}
__halt_compiler();
?>
--EXPECTF--
%d
%d
%d
%d
Fatal error: Uncaught Error: Undefined constant 'Foo\__COMPILER_HALT_OFFSET__' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
-13
View File
@@ -1,13 +0,0 @@
--TEST--
Bug #70173 (ZVAL_COPY_VALUE_EX broken for 32bit Solaris Sparc)
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
?>
--FILE--
<?php
$var = 2900000000;
var_dump($var);
?>
--EXPECT--
float(2900000000)
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Bug #70179 ($this refcount issue)
--FILE--
<?php
class X {
function __invoke() {
var_dump($this);
}
}
(new X)();
?>
--EXPECT--
object(X)#1 (0) {
}
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #70182 ($string[] assignment with +=)
--FILE--
<?php
$str = "abc";
$str[] += $str;
?>
--EXPECTF--
Fatal error: Uncaught Error: [] operator not supported for strings in %sbug70182.php:%d
Stack trace:
#0 {main}
thrown in %sbug70182.php on line %d
-8
View File
@@ -1,8 +0,0 @@
--TEST--
Bug #70183 (null pointer deref (segfault) in zend_eval_const_expr)
--FILE--
<?php
[[][]]
?>
--EXPECTF--
Fatal error: Cannot use [] for reading in %sbug70183.php on line %d
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #70187 (Notice: unserialize(): Unexpected end of serialized data)
--FILE--
<?php
class A {
public $b;
}
$a = new A;
var_dump($a); // force properties HT
unset($a->b);
var_dump(serialize($a));
?>
--EXPECT--
object(A)#1 (1) {
["b"]=>
NULL
}
string(12) "O:1:"A":0:{}"
-11
View File
@@ -1,11 +0,0 @@
--TEST--
Bug #70187 (Notice: unserialize(): Unexpected end of serialized data)
--FILE--
<?php
$a = 1;
unset($a);
unserialize(serialize($GLOBALS));
echo "ok\n";
?>
--EXPECT--
ok
-21
View File
@@ -1,21 +0,0 @@
--TEST--
Bug #70215 (Segfault when invoke is static)
--FILE--
<?php
class A {
public static function __invoke() {
echo __CLASS__;
}
}
class B extends A { }
$b = new B;
$b();
?>
--EXPECTF--
Warning: The magic method __invoke() must have public visibility and cannot be static in %s on line %d
A
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #70223 (Incrementing value returned by magic getter)
--FILE--
<?php
class A {
private $foo = 0;
public function &__get($foo){ return $this->foo; }
}
$a = new A;
echo $a->f++;
echo $a->f++;
echo $a->f++;
?>
--EXPECT--
012
-8
View File
@@ -1,8 +0,0 @@
--TEST--
Bug #70240 (Segfault when doing unset($var()))
--FILE--
<?php
unset($var());
?>
--EXPECTF--
Fatal error: Can't use function return value in write context in %sbug70240.php on line %d
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #70241 (Skipped assertions affect Generator returns)
--INI--
zend.assertions=-1
--FILE--
<?php
function foo () {
assert(yield 1);
return null;
}
var_dump(foo() instanceof Generator);
?>
--EXPECT--
bool(true)
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #70253 (segfault at _efree () in zend_alloc.c:1389)
--INI--
memory_limit=2M
--SKIPIF--
<?php
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
die("skip Zend MM disabled");
}
?>
--FILE--
<?php
unserialize('a:2:{i:0;O:9:"000000000":10000000');
?>
--EXPECTF--
Fatal error: Allowed memory size of 2097152 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
-28
View File
@@ -1,28 +0,0 @@
--TEST--
Bug #70258 (Segfault if do_resize fails to allocated memory)
--INI--
memory_limit=2M
--SKIPIF--
<?php
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
die("skip Zend MM disabled");
}
?>
--FILE--
<?php
class A {
public $arr;
public function core() {
$this->arr["no_pack"] = 1;
while (1) {
$this->arr[] = 1;
}
}
}
$a = new A;
$a->core();
?>
--EXPECTF--
Fatal error: Allowed memory size of 2097152 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
-30
View File
@@ -1,30 +0,0 @@
--TEST--
Bug #70262 (Accessing array crashes)
--FILE--
<?php
$array = array();
$array[] = 1; // make this not immutable
$extra = $array; // make the refcount == 2
class A {
public function getObj($array) {
$obj = new Stdclass;
$obj->arr = $array; // make the refcount == 3;
return $obj;
}
}
$a = new A;
$a->getObj($array) //use function call to get a refcount == 1 IS_VAR object
->arr // FETCH_OBJ_W will EXTRACT_ZVAL_PTR because getObj() result a refcount == 1 object (READY_TO_DESTROY)
[0] = "test"; //We will get a refcount == 3 array (not a IS_INDIRCT) in ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER
var_dump($array);
?>
--EXPECT--
array(1) {
[0]=>
int(1)
}
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #70288 (Apache crash related to ZEND_SEND_REF)
--FILE--
<?php
class A {
public function __get($name) {
return new Stdclass();
}
}
function test(&$obj) {
var_dump($obj);
}
$a = new A;
test($a->dummy);
?>
--EXPECTF--
object(stdClass)#%d (0) {
}
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Crash with specific assertions and zend.assertions=-1
--INI--
zend.assertions=-1
--FILE--
<?php
function f() {
assert(@$a ?: 1);
echo "OK";
};
f();
?>
--EXPECT--
OK
-49
View File
@@ -1,49 +0,0 @@
--TEST--
bug #70321 (Magic getter breaks reference to array property)
--FILE--
<?php
class foo implements arrayAccess
{
private $bar;
public function __construct()
{
$this->bar = new bar();
}
public function & __get($key)
{
$bar = $this->bar;
return $bar;
}
public function & offsetGet($key) {
$bar = $this->bar;
return $bar;
}
public function offsetSet($key, $val) {
}
public function offsetUnset($key) {
}
public function offsetExists($key) {
}
}
class bar { public $onBaz = []; }
$foo = new foo();
$foo->bar->onBaz[] = function() {};
var_dump($foo->bar->onBaz);
$foo = new foo();
$foo["bar"]->onBaz[] = function() {};
var_dump($foo->bar->onBaz);
?>
--EXPECTF--
array(1) {
[0]=>
object(Closure)#%d (0) {
}
}
array(1) {
[0]=>
object(Closure)#%d (0) {
}
}
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #70332 (Wrong behavior while returning reference on object)
--FILE--
<?php
function & test($arg) {
return $arg;
}
$arg = new Stdclass();
$arg->name = array();
test($arg)->name[1] = "xxxx";
print_r($arg);
?>
--EXPECT--
stdClass Object
(
[name] => Array
(
[1] => xxxx
)
)
-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #70397 (Segmentation fault when using Closure::call and yield)
--FILE--
<?php
$f = function () {
$this->value = true;
yield $this->value;
};
var_dump($f->call(new class {})->current());
?>
--EXPECT--
bool(true)
-18
View File
@@ -1,18 +0,0 @@
--TEST--
Bug #70398 (SIGSEGV, Segmentation fault zend_ast_destroy_ex)
--FILE--
<?php
define("FILE_STREAM", fopen("php://temp", "r"));
define("FILE_STREAMS", array(fopen("php://temp", "r")));
var_dump(FILE_STREAM);
var_dump(FILE_STREAMS);
?>
--EXPECTF--
resource(%d) of type (stream)
array(1) {
[0]=>
resource(%d) of type (stream)
}
-10
View File
@@ -1,10 +0,0 @@
--TEST--
Bug #70430: Stack buffer overflow in zend_language_parser()
--FILE--
<?php
$"*** Testing function() : ***\n";
?>
--EXPECTF--
Parse error: syntax error, unexpected '"*** Testing function() : ***' (T_CONSTANT_ENCAPSED_STRING), expecting variable (T_VARIABLE) or '{' or '$' in %s on line %d
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #70478 (**= does no longer work)
--FILE--
<?php
class foo {
public $a = 3;
private $b = 4;
function __construct() {
$this->a **= $this->b;
}
}
$a = new foo;
var_dump($a->a);
?>
--EXPECT--
int(81)
-83
View File
@@ -1,83 +0,0 @@
--TEST--
Bug #70547 (unsetting function variables corrupts backtrace)
--FILE--
<?php
function brokenTrace($arg1, &$arg2, $arg3){
backtraceWrapper();
var_dump(func_get_args());
unset($arg3);
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
var_dump(func_get_arg(2));
var_dump(func_get_arg(3));
backtraceWrapper();
unset($arg1);
var_dump(func_get_args());
backtraceWrapper();
unset($arg2);
backtraceWrapper();
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
var_dump(func_get_arg(2));
var_dump(func_get_arg(3));
}
$arg2 = "2nd";
brokenTrace("1st", $arg2, "3th", "4th");
function backtraceWrapper(){
$bt = debug_backtrace();
var_dump($bt[1]['args']);
}
?>
--EXPECT--
array(4) {
[0]=>
string(3) "1st"
[1]=>
&string(3) "2nd"
[2]=>
string(3) "3th"
[3]=>
string(3) "4th"
}
array(4) {
[0]=>
string(3) "1st"
[1]=>
string(3) "2nd"
[2]=>
string(3) "3th"
[3]=>
string(3) "4th"
}
string(3) "1st"
string(3) "2nd"
NULL
string(3) "4th"
array(3) {
[0]=>
string(3) "1st"
[1]=>
&string(3) "2nd"
[3]=>
string(3) "4th"
}
array(2) {
[1]=>
string(3) "2nd"
[3]=>
string(3) "4th"
}
array(2) {
[1]=>
&string(3) "2nd"
[3]=>
string(3) "4th"
}
array(1) {
[3]=>
string(3) "4th"
}
NULL
NULL
NULL
string(3) "4th"
-10
View File
@@ -1,10 +0,0 @@
--TEST--
Bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
--FILE--
<?php
class a {}
$x = (new ReflectionFunction("substr"))->getClosure();
$x->call(new a);
?>
--EXPECTF--
Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in %s on line %d
-18
View File
@@ -1,18 +0,0 @@
--TEST--
Bug #70662: Duplicate array key via undefined index error handler
--FILE--
<?php
$a = [];
set_error_handler(function() use(&$a) {
$a['b'] = 2;
});
$a['b'] += 1;
var_dump($a);
?>
--EXPECT--
array(1) {
["b"]=>
int(1)
}
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Bug #70681: Segfault when binding $this of internal instance method to null
--FILE--
<?php
$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
$c = $c->bindTo(null);
$c = (new ReflectionFunction('strlen'))->getClosure();
$c = $c->bindTo(null);
var_dump($c("foo"));
?>
--EXPECTF--
Warning: Cannot unbind $this of internal method in %s on line %d
int(3)
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #70685: Segfault for getClosure() internal method rebind with invalid $this
--FILE--
<?php
class cls {}
$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
$c = $c->bindTo(new cls);
var_dump($c);
$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
$c = $c->bindTo(new SplStack, 'cls');
var_dump($c);
?>
--EXPECTF--
Warning: Cannot bind internal method SplDoublyLinkedList::count() to object of class cls in %s on line %d
NULL
Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in %s on line %d
NULL
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #70689 (Exception handler does not work as expected)
--FILE--
<?php
function foo($foo) {
echo "Executing foo\n";
}
set_error_handler(function($errno, $errstr) {
throw new Exception($errstr);
});
try {
foo();
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECTF--
Missing argument 1 for foo(), called in %sbug70689.php on line %d and defined
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #70748 (Segfault in ini_lex () at Zend/zend_ini_scanner.l)
--FILE--
<?php
$ini = '[${ ';
$ini_file = __DIR__ . "/bug70748.ini";
file_put_contents($ini_file, $ini);
var_dump(parse_ini_file($ini_file));
?>
--CLEAN--
<?php
unlink(__DIR__ . "/bug70748.ini");
?>
--EXPECTF--
Warning: syntax error, unexpected $end, expecting '}' in %sbug70748.ini on line %d
in %sbug70748.php on line %d
bool(false)
-10
View File
@@ -1,10 +0,0 @@
--TEST--
Bug #70782: null ptr deref and segfault (zend_get_class_fetch_type)
--FILE--
<?php
(-0)::$prop;
?>
--EXPECTF--
Fatal error: Illegal class name in %s on line %d
-25
View File
@@ -1,25 +0,0 @@
--TEST--
Bug #70785 (Infinite loop due to exception during identical comparison)
--FILE--
<?php
set_error_handler(function($no, $msg) {
throw new Exception($msg);
});
try {
if ($a === null) { // ZEND_VM_SMART_BRANCH
undefined_function('Null');
}
} catch (Exception $e) {
}
try {
$c === 3; // ZEND_VM_NEXT_OPCODE
undefined_function();
} catch (Exception $e) {
}
?>
okey
--EXPECT--
okey
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #70804 (Unary add on negative zero produces positive zero)
--FILE--
<?php
var_dump(+(-0.0));
var_dump(+(float)"-0");
$foo = +(-sin(0));
var_dump($foo);
?>
--EXPECT--
float(-0)
float(-0)
float(-0)
-46
View File
@@ -1,46 +0,0 @@
--TEST--
Bug #70805 (Segmentation faults whilst running Drupal 8 test suite)
--FILE--
<?php
class A {
}
class B {
}
class C {
public function __destruct() {
if (isset($GLOBALS["a"])) {
unset($GLOBALS["array"]);
unset($GLOBALS["a"]); // this will be called in gc_colloct_roots and put $a into gc roots buf
}
}
}
$a = new A;
$a->b = new B;
$a->b->a = $a;
$i = 0;
$c = new A;
$array = array($c); //This is used to leave a room for $GLOBALS["a"]
unset($c);
while ($i++ < 9997) {
$t = [];
$t[] = &$t;
unset($t);
}
$t = [new C];
$t[] = &$t;
unset($t); // This is used to trigger C::__destruct while doing gc_colloct_roots
$e = $a;
unset($a); // This one can not be putted into roots buf because it's full, thus gc_colloct_roots will be called,
// but C::__destructor which is called in gc_colloct_roots will put $a into buf
// which will make $a be putted into gc roots buf twice
var_dump(gc_collect_cycles());
?>
--EXPECT--
int(0)
-43
View File
@@ -1,43 +0,0 @@
--TEST--
Bug #70805 (Segmentation faults whilst running Drupal 8 test suite) (Crash)
--FILE--
<?php
class A {
}
class B {
}
class C {
public function __destruct() {
if (isset($GLOBALS["a"])) {
unset($GLOBALS["array"]);
unset($GLOBALS["a"]);
}
}
}
$a = new A;
$a->b = new B;
$a->b->a = $a;
$i = 0;
$c = new A;
$array = array($c);
unset($c);
while ($i++ < 9997) {
$t = [];
$t[] = &$t;
unset($t);
}
$t = [new C];
$t[] = &$t;
unset($t);
unset($a);
var_dump(gc_collect_cycles());
?>
--EXPECT--
int(2)
-37
View File
@@ -1,37 +0,0 @@
--TEST--
Bug #70805 (Segmentation faults whilst running Drupal 8 test suite) (Memleak)
--FILE--
<?php
class A {
}
class B {
}
class C {
public function __destruct() {
if (isset($GLOBALS["a"])) {
unset($GLOBALS["a"]);
}
}
}
$a = new A;
$a->b = new B;
$a->b->a = $a;
$i = 0;
while ($i++ < 9998) {
$t = [];
$t[] = &$t;
unset($t);
}
$t = [new C];
$t[] = &$t;
unset($t);
unset($a);
var_dump(gc_collect_cycles());
--EXPECT--
int(2)
-34
View File
@@ -1,34 +0,0 @@
--TEST--
Bug #70873 (Regression on private static properties access)
--FILE--
<?php
class A {
private static $x = 1;
}
class B extends A {
function bar() {
var_dump(self::$x);
}
};
class C extends A {
function bar() {
var_dump(A::$x);
}
};
$a = new B;
$a->bar();
$b = new C;
$b->bar();
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot access property B::$x in %sbug70873.php:%d
Stack trace:
#0 %sbug70873.php(%d): B->bar()
#1 {main}
thrown in %sbug70873.php on line %d
-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #70895 null ptr deref and segfault with crafted callable
--FILE--
<?php
array_map("%n", 0);
array_map("%n %i", 0);
array_map("%n %i aoeu %f aoeu %p", 0);
?>
--EXPECTREGEX--
Warning: array_map\(\) expects parameter 1 to be a valid callback, function '%n' not found or invalid function name in .+
Warning: array_map\(\) expects parameter 1 to be a valid callback, function '%n %i' not found or invalid function name in .+
Warning: array_map\(\) expects parameter 1 to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name in .+bug70895.php on line \d+
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #70895 null ptr deref and segfault with crafted callable
--FILE--
<?php
function m($f,$a){
return array_map($f,0);
}
echo implode(m("",m("",m("",m("",m("0000000000000000000000000000000000",("")))))));
?>
--EXPECTF--
Warning: array_map() expects parameter 1 to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name in %sbug70898.php on line %d
Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
Warning: implode(): Argument must be an array in %sbug70898.php on line %d
-10
View File
@@ -1,10 +0,0 @@
--TEST--
Bug #70912 (Null ptr dereference when class property is initialised to a dereferenced value)
--FILE--
<?php
class A {
public $a=[][];
}
?>
--EXPECTF--
Fatal error: Cannot use [] for reading in %sbug70912.php on line %d
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #70914 zend_throw_or_error() format string vulnerability
--SKIPIF--
<?php
if (!extension_loaded("pdo_sqlite")) {
die("skip pdo_sqlite required");
}
?>
--FILE--
<?php
$db = new PDO('sqlite::memory:');
$st = $db->query('SELECT 1');
$re = $st->fetchObject('%Z');
?>
--EXPECTREGEX--
Fatal error: Class '%Z' not found in .+bug70914.php on line \d+
-37
View File
@@ -1,37 +0,0 @@
--TEST--
Bug #70944 (try{ } finally{} can create infinite chains of exceptions)
--FILE--
<?php
try {
$e = new Exception("Foo");
try {
throw new Exception("Bar", 0, $e);
} finally {
throw $e;
}
} catch (Exception $e) {
var_dump((string)$e);
}
try {
$e = new Exception("Foo");
try {
throw new Exception("Bar", 0, $e);
} finally {
throw new Exception("Dummy", 0, $e);
}
} catch (Exception $e) {
var_dump((string)$e);
}
?>
--EXPECTF--
string(%d) "Exception: Foo in %sbug70944.php:%d
Stack trace:
#0 {main}"
string(%d) "Exception: Foo in %sbug70944.php:%d
Stack trace:
#0 {main}
Next Exception: Dummy in %sbug70944.php:%d
Stack trace:
#0 {main}"
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #70957 (self::class can not be resolved with reflection for abstract class)
--FILE--
<?php
abstract class Foo
{
function bar($a = self::class) {}
}
trait T {
public function bar() {
}
}
class B extends Foo
{
use T;
}
?>
--EXPECTF--
Warning: Declaration of T::bar() should be compatible with Foo::bar($a = 'Foo') in %sbug70957.php on line %d
-21
View File
@@ -1,21 +0,0 @@
--TEST--
Bug #70958 (Invalid opcode while using ::class as trait method paramater default value)
--FILE--
<?php
trait Foo
{
function bar($a = self::class) {
var_dump($a);
}
}
class B {
use Foo;
}
$b = new B;
$b->bar();
?>
--EXPECT--
string(1) "B"
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #70967 (Weird error handling for __toString when Error is thrown)
--FILE--
<?php
class A {
public function __toString() {
undefined_function();
}
}
echo (new A);
?>
--EXPECTF--
Fatal error: Method A::__toString() must not throw an exception, caught Error: Call to undefined function undefined_function() in %sbug70967.php on line %d
-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #70987 (static::class within Closure::call() causes segfault)
--FILE--
<?php
class foo {}
$bar = function () {
return static::class;
};
var_dump($bar->call(new foo));
?>
--EXPECTF--
string(3) "foo"
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #70997 (When using parentClass:: instead of parent::, static context changed)
--FILE--
<?php
class A {
const TEST = false;
public function test()
{
var_dump(static::TEST);
}
}
class B extends A {
const TEST = true;
public function test()
{
A::test();
}
}
$b = new B;
$b->test();
--EXPECT--
bool(true)
-31
View File
@@ -1,31 +0,0 @@
--TEST--
Bug #71067 (Local object in class method stays in memory for each call)
--INI--
opcache.enable=0
error_reporting=0
--FILE--
<?php
class Test {
public function test(){
$arr = (object) [
'children' => []
];
$arr->children[] = 1;
return $arr;
}
}
$o = new Test();
$o->test();
print_r($o->test());
?>
--EXPECT--
stdClass Object
(
[children] => Array
(
[0] => 1
)
)
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #71086: Invalid numeric literal parse error within highlight_string() function
--FILE--
<?php
$highlightedString = highlight_string("<?php \n 09 09 09;", true);
var_dump($highlightedString);
?>
--EXPECT--
string(169) "<code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;<br />&nbsp;</span><span style="color: #007700">09&nbsp;09&nbsp;09;</span>
</span>
</code>"
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #71154: Incorrect HT iterator invalidation causes iterator reuse
--FILE--
<?php
$array = [1, 2, 3];
foreach ($array as &$ref) {
/* Free array, causing free of iterator */
$array = [];
/* Reuse the iterator.
* However it will also be reused on next foreach iteration */
$it = new ArrayIterator([1, 2, 3]);
$it->rewind();
}
var_dump($it->current());
?>
--EXPECT--
int(1)
-25
View File
@@ -1,25 +0,0 @@
--TEST--
Bug #71163 (Segmentation Fault (cleanup_unfinished_calls))
--FILE--
<?php
function __autoload($name) {
eval ("class $name extends Exception { public static function foo() {}}");
throw new Exception("boom");
}
function test2() {
try {
Test::foo();
} catch (Exception $e) {
echo "okey";
}
}
function test() {
test2();
}
test();
?>
--EXPECT--
okey
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -23,7 +23,7 @@ $o->func();
?>
===DONE===
--EXPECTF--
{closure}()
Test::{closure}()
Fatal error: Uncaught Error: Call to private method Test::func() from context '' in %sclosure_033.php:%d
Stack trace:
+6 -2
View File
@@ -53,9 +53,9 @@ $d = $nonstaticScoped->bindTo(null); $d(); echo "\n";
$d->bindTo($d);
echo "After binding, with same-class instance for the bound ones", "\n";
$d = $staticUnscoped->bindTo(new A);
$d = $staticUnscoped->bindTo(new A); $d(); echo "\n";
$d = $nonstaticUnscoped->bindTo(new A); $d(); echo " (should be scoped to dummy class)\n";
$d = $staticScoped->bindTo(new A);
$d = $staticScoped->bindTo(new A); $d(); echo "\n";
$d = $nonstaticScoped->bindTo(new A); $d(); echo "\n";
echo "After binding, with different instance for the bound ones", "\n";
@@ -87,10 +87,14 @@ After binding, with same-class instance for the bound ones
Warning: Cannot bind an instance to a static closure in %s on line %d
scoped to A: bool(false)
bound: no
scoped to A: bool(false)
bound: A (should be scoped to dummy class)
Warning: Cannot bind an instance to a static closure in %s on line %d
scoped to A: bool(true)
bound: no
scoped to A: bool(true)
bound: A
After binding, with different instance for the bound ones
scoped to A: bool(false)
+16 -4
View File
@@ -26,16 +26,16 @@ $d = $staticUnscoped->bindTo(null, null); $d(); echo "\n";
$d = $staticScoped->bindTo(null, null); $d(); echo "\n";
echo "After binding, null scope, with instance", "\n";
$d = $staticUnscoped->bindTo(new A, null);
$d = $staticScoped->bindTo(new A, null);
$d = $staticUnscoped->bindTo(new A, null); $d(); echo "\n";
$d = $staticScoped->bindTo(new A, null); $d(); echo "\n";
echo "After binding, with scope, no instance", "\n";
$d = $staticUnscoped->bindTo(null, 'A'); $d(); echo "\n";
$d = $staticScoped->bindTo(null, 'A'); $d(); echo "\n";
echo "After binding, with scope, with instance", "\n";
$d = $staticUnscoped->bindTo(new A, 'A');
$d = $staticScoped->bindTo(new A, 'A');
$d = $staticUnscoped->bindTo(new A, 'A'); $d(); echo "\n";
$d = $staticScoped->bindTo(new A, 'A'); $d(); echo "\n";
echo "Done.\n";
@@ -57,8 +57,14 @@ bool(false)
After binding, null scope, with instance
Warning: Cannot bind an instance to a static closure in %s on line %d
bool(false)
bool(false)
Warning: Cannot bind an instance to a static closure in %s on line %d
bool(false)
bool(false)
After binding, with scope, no instance
bool(true)
bool(false)
@@ -69,6 +75,12 @@ bool(false)
After binding, with scope, with instance
Warning: Cannot bind an instance to a static closure in %s on line %d
bool(true)
bool(false)
Warning: Cannot bind an instance to a static closure in %s on line %d
bool(true)
bool(false)
Done.
-241
View File
@@ -1,241 +0,0 @@
--TEST--
Rebinding of ::getClosure()s
--FILE--
<?php
use SplDoublyLinkedList as DLL;
function func($arg) { }
class Cls {
public function method() {}
public static function staticMethod($arg) {}
}
class ClsChild extends Cls {}
class ClsUnrelated {}
/* Format: [Function, [Obj, Scope]] */
$tests = [
['func', [
[null, null],
[new Cls, null],
[new Cls, 'Cls'],
[null, 'Cls'],
[null, 'stdClass'],
[new stdClass, null],
]],
['strlen', [
[null, null],
[new Cls, null],
[new Cls, 'Cls'],
[null, 'Cls'],
[null, 'stdClass'],
[new stdClass, null],
]],
[['Cls', 'staticMethod'], [
[null, 'Cls'],
[new Cls, null],
[new Cls, 'Cls'],
[null, null],
[null, 'ClsChild'],
[null, 'ClsUnrelated'],
]],
[[new Cls, 'method'], [
[null, 'Cls'],
[new Cls, 'Cls'],
[new ClsChild, 'Cls'],
[new ClsUnrelated, 'Cls'],
[new Cls, null],
[new Cls, 'ClsUnrelated'],
[new Cls, 'ClsChild'],
]],
[[new DLL, 'count'], [
[new DLL, DLL::class],
[new SplStack, DLL::class],
[new ClsUnrelated, DLL::class],
[null, null],
[null, DLL::class],
[new DLL, null],
[new DLL, ClsUnrelated::class],
]],
[function() {}, [
[null, null],
[new Cls, null],
[new Cls, 'Cls'],
[null, 'Cls'],
[null, 'stdClass'],
[new stdClass, null],
]],
];
set_error_handler(function($errno, $errstr) {
echo "$errstr\n\n";
});
foreach ($tests as list($fn, $bindings)) {
if (is_array($fn)) {
$r = new ReflectionMethod($fn[0], $fn[1]);
$c = $r->getClosure(is_object($fn[0]) ? $fn[0] : null);
$fnStr = is_object($fn[0]) ? "(new " . get_class($fn[0]) . ")->$fn[1]" : "$fn[0]::$fn[1]";
} else {
$c = (new ReflectionFunction($fn))->getClosure();
$fnStr = $fn;
}
if ($fn instanceof Closure) {
$fnStr = "(function() {})";
}
echo "$fnStr()\n" . str_repeat('-', strlen($fnStr) + 2), "\n\n";
foreach ($bindings as list($obj, $scope)) {
$objStr = $obj ? "new " . get_class($obj) : "null";
$scopeStr = $scope ? "$scope::class" : "null";
echo "bindTo($objStr, $scopeStr):\n";
$ret = $c->bindTo($obj, $scope);
if ($ret !== null) {
echo "Success!\n\n";
}
}
}
?>
--EXPECT--
func()
------
bindTo(null, null):
Success!
bindTo(new Cls, null):
Success!
bindTo(new Cls, Cls::class):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
bindTo(null, Cls::class):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
bindTo(null, stdClass::class):
Cannot bind closure to scope of internal class stdClass
bindTo(new stdClass, null):
Success!
strlen()
--------
bindTo(null, null):
Success!
bindTo(new Cls, null):
Success!
bindTo(new Cls, Cls::class):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
bindTo(null, Cls::class):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
bindTo(null, stdClass::class):
Cannot bind closure to scope of internal class stdClass
bindTo(new stdClass, null):
Success!
Cls::staticMethod()
-------------------
bindTo(null, Cls::class):
Success!
bindTo(new Cls, null):
Cannot bind an instance to a static closure
bindTo(new Cls, Cls::class):
Cannot bind an instance to a static closure
bindTo(null, null):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
bindTo(null, ClsChild::class):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
bindTo(null, ClsUnrelated::class):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
(new Cls)->method()
-------------------
bindTo(null, Cls::class):
Success!
bindTo(new Cls, Cls::class):
Success!
bindTo(new ClsChild, Cls::class):
Success!
bindTo(new ClsUnrelated, Cls::class):
Success!
bindTo(new Cls, null):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
bindTo(new Cls, ClsUnrelated::class):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
bindTo(new Cls, ClsChild::class):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
(new SplDoublyLinkedList)->count()
----------------------------------
bindTo(new SplDoublyLinkedList, SplDoublyLinkedList::class):
Success!
bindTo(new SplStack, SplDoublyLinkedList::class):
Success!
bindTo(new ClsUnrelated, SplDoublyLinkedList::class):
Cannot bind internal method SplDoublyLinkedList::count() to object of class ClsUnrelated
bindTo(null, null):
Cannot unbind $this of internal method
bindTo(null, SplDoublyLinkedList::class):
Cannot unbind $this of internal method
bindTo(new SplDoublyLinkedList, null):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
bindTo(new SplDoublyLinkedList, ClsUnrelated::class):
Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
(function() {})()
-----------------
bindTo(null, null):
Success!
bindTo(new Cls, null):
Success!
bindTo(new Cls, Cls::class):
Success!
bindTo(null, Cls::class):
Success!
bindTo(null, stdClass::class):
Cannot bind closure to scope of internal class stdClass
bindTo(new stdClass, null):
Success!
Loaded 100 of 1100 files, more files were not shown because too many files have changed in this diff. Show more