mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-25 18:05:42 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5cff98943f | ||
|
|
8a4696813a |
No files matched your search
+3
-4
@@ -18,12 +18,13 @@ clone_depth: 64
|
||||
|
||||
cache:
|
||||
- c:\build-cache
|
||||
- c:\build-cache\sdk -> .appveyor.yml
|
||||
|
||||
environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.5
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.5
|
||||
PHP_BUILD_CRT: vc15
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
@@ -39,13 +40,11 @@ environment:
|
||||
OPCACHE: 0
|
||||
- THREAD_SAFE: 1
|
||||
OPCACHE: 1
|
||||
INTRINSICS: AVX
|
||||
|
||||
services:
|
||||
# the setup scripts have to be touched, once some other db version is used
|
||||
- mysql
|
||||
- postgresql101
|
||||
- mssql2017
|
||||
- postgresql96
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
+6
-25
@@ -1,35 +1,16 @@
|
||||
# http://editorconfig.org/
|
||||
; http://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*.{c,h,awk,w32,bat,mk,frag}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
[*.{c,h}]
|
||||
charset = UTF-8
|
||||
end_of_line = LF
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
insert_final_newline = true
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{php,phpt}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{yml,m4,sh}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = true
|
||||
@@ -16,11 +16,9 @@ define ____executor_globals
|
||||
end
|
||||
set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1])
|
||||
set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
|
||||
set $eg_ptr = $eg
|
||||
else
|
||||
set $eg = executor_globals
|
||||
set $cg = compiler_globals
|
||||
set $eg_ptr = (zend_executor_globals*) &executor_globals
|
||||
end
|
||||
end
|
||||
|
||||
@@ -173,7 +171,7 @@ define ____printzv_contents
|
||||
printf "UNDEF"
|
||||
end
|
||||
if $type == 1
|
||||
printf "NULL"
|
||||
printf "NULL"
|
||||
end
|
||||
if $type == 2
|
||||
printf "bool: false"
|
||||
@@ -181,15 +179,15 @@ define ____printzv_contents
|
||||
if $type == 3
|
||||
printf "bool: true"
|
||||
end
|
||||
if $type == 4
|
||||
if $type == 4
|
||||
printf "long: %ld", $zvalue->value.lval
|
||||
end
|
||||
if $type == 5
|
||||
printf "double: %f", $zvalue->value.dval
|
||||
end
|
||||
if $type == 6
|
||||
printf "string: %s", $zvalue->value.str->val
|
||||
end
|
||||
end
|
||||
if $type == 5
|
||||
printf "double: %f", $zvalue->value.dval
|
||||
end
|
||||
if $type == 6
|
||||
printf "string: %s", $zvalue->value.str->val
|
||||
end
|
||||
if $type == 7
|
||||
printf "array: "
|
||||
if ! $arg1
|
||||
@@ -247,31 +245,25 @@ define ____printzv_contents
|
||||
printf "const: %s", $zvalue->value.str->val
|
||||
end
|
||||
if $type == 12
|
||||
printf "CONSTANT_AST"
|
||||
printf "const_ast"
|
||||
end
|
||||
if $type == 13
|
||||
printf "_BOOL"
|
||||
printf "_IS_BOOL"
|
||||
end
|
||||
if $type == 14
|
||||
printf "CALLABLE"
|
||||
printf "IS_CALLABLE"
|
||||
end
|
||||
if $type == 15
|
||||
printf "indirect: "
|
||||
____printzv $zvalue->value.zv $arg1
|
||||
end
|
||||
if $type == 16
|
||||
printf "string_offset"
|
||||
end
|
||||
if $type == 17
|
||||
printf "pointer: %p", $zvalue->value.ptr
|
||||
end
|
||||
if $type == 18
|
||||
printf "ITERABLE"
|
||||
end
|
||||
if $type == 19
|
||||
printf "VOID"
|
||||
end
|
||||
if $type == 20
|
||||
printf "_ERROR"
|
||||
end
|
||||
if $type == 16 || $type > 20
|
||||
if $type > 17
|
||||
printf "unknown type %d", $type
|
||||
end
|
||||
printf "\n"
|
||||
@@ -291,28 +283,38 @@ define ____printzv
|
||||
end
|
||||
end
|
||||
|
||||
define print_global_vars
|
||||
____executor_globals
|
||||
set $symtable = ((HashTable *)&($eg_ptr->symbol_table))
|
||||
print_ht $symtable
|
||||
end
|
||||
define ____print_const_table
|
||||
set $ht = $arg0
|
||||
set $p = $ht->pListHead
|
||||
|
||||
document print_global_vars
|
||||
Prints the global variables
|
||||
while $p != 0
|
||||
set $const = (zend_constant *) $p->pData
|
||||
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
|
||||
if $p->nKeyLength > 0
|
||||
____print_str $p->arKey $p->nKeyLength
|
||||
printf " => "
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
|
||||
____printzv_contents &$const->value 0
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
end
|
||||
|
||||
define print_const_table
|
||||
set $ind = 1
|
||||
printf "[%p] {\n", $arg0
|
||||
____print_ht $arg0 4
|
||||
____print_const_table $arg0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_const_table
|
||||
Dumps elements of Constants HashTable
|
||||
Example: print_const_table executor_globals.zend_constants
|
||||
end
|
||||
|
||||
define ____print_ht
|
||||
set $ht = (HashTable*)$arg0
|
||||
set $n = $ind
|
||||
@@ -359,10 +361,6 @@ define ____print_ht
|
||||
set $func = (zend_function*)$p->val.value.ptr
|
||||
printf "\"%s\"\n", $func->common.function_name->val
|
||||
end
|
||||
if $arg1 == 4
|
||||
set $const = (zend_constant *)$p->val.value.ptr
|
||||
____printzv $const 1
|
||||
end
|
||||
end
|
||||
set $i = $i + 1
|
||||
end
|
||||
@@ -474,12 +472,9 @@ end
|
||||
|
||||
define print_pi
|
||||
set $pi = (zend_property_info *)$arg0
|
||||
set $initial_offset = ((uint32_t)(zend_uintptr_t)(&((zend_object*)0)->properties_table[(0)]))
|
||||
set $ptr_to_val = (zval*)((char*)$pi->ce->default_properties_table + $pi->offset - $initial_offset)
|
||||
printf "[%p] {\n", $pi
|
||||
printf " offset = %p\n", $pi->offset
|
||||
printf " ce = [%p] %s\n", $pi->ce, $pi->ce->name->val
|
||||
printf " flags = 0x%x (", $pi->flags
|
||||
printf " flags = %d (", $pi->flags
|
||||
if $pi->flags & 0x100
|
||||
printf "ZEND_ACC_PUBLIC"
|
||||
else
|
||||
@@ -490,11 +485,7 @@ define print_pi
|
||||
printf "ZEND_ACC_PRIVATE"
|
||||
else
|
||||
if $pi->flags & 0x800
|
||||
printf "ZEND_ACC_EARLY_BINDING"
|
||||
else
|
||||
if $pi->flags & 0x20000
|
||||
printf "ZEND_ACC_SHADOW"
|
||||
end
|
||||
printf "ZEND_ACC_CHANGED"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -502,8 +493,6 @@ define print_pi
|
||||
printf ")\n"
|
||||
printf " name = "
|
||||
print_zstr $pi->name
|
||||
printf " default value: "
|
||||
printzv $ptr_to_val
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
|
||||
+17
-1
@@ -1,22 +1,38 @@
|
||||
ext/mysqlnd/mysqlnd.h ident
|
||||
ext/simplexml/simplexml.c ident
|
||||
ext/iconv/php_iconv.h ident
|
||||
ext/ext_skel.php ident
|
||||
ext/posix/posix.c ident
|
||||
ext/recode/recode.c ident
|
||||
ext/skeleton/create_stubs ident
|
||||
ext/phar/phar/pharcommand.inc ident
|
||||
ext/phar/phar.c ident
|
||||
ext/sysvmsg/sysvmsg.c ident
|
||||
ext/enchant/enchant.c ident
|
||||
ext/reflection/php_reflection.c ident
|
||||
ext/oci8/oci8.c ident
|
||||
ext/dba/libinifile/inifile.c ident
|
||||
ext/dba/libflatfile/flatfile.c ident
|
||||
ext/dba/libcdb/cdb_make.c ident
|
||||
ext/dba/libcdb/cdb.c ident
|
||||
ext/filter/filter.c ident
|
||||
ext/zip/php_zip.c ident
|
||||
README.input_filter ident
|
||||
run-tests.php ident
|
||||
sapi/nsapi/nsapi.c ident
|
||||
sapi/continuity/capi.c ident
|
||||
Zend/RFCs/002.txt ident
|
||||
Zend/RFCs/003.txt ident
|
||||
ext/exif/exif.c ident
|
||||
ext/ldap/ldap.c ident
|
||||
ext/pdo_pgsql/pdo_pgsql.c ident
|
||||
ext/tidy/tidy.c ident
|
||||
NEWS merge=NEWS
|
||||
UPGRADING merge=NEWS
|
||||
UPGRADING.INTERNALS merge=NEWS
|
||||
/ext/bz2/tests/with_strings.phpt -crlf
|
||||
/ext/dom/tests/bug40836.phpt -crlf
|
||||
/ext/dom/tests/domelement.phpt -crlf
|
||||
/ext/ereg/tests/eregi_basic_002.phpt -crlf
|
||||
/ext/iconv/tests/iconv004.phpt -crlf
|
||||
/ext/iconv/tests/iconv_basic.phpt -crlf
|
||||
/ext/iconv/tests/iconv_strpos.phpt -crlf
|
||||
|
||||
+57
-53
@@ -1,4 +1,4 @@
|
||||
# General ignores
|
||||
# General Ignores
|
||||
*~
|
||||
.#*
|
||||
*.
|
||||
@@ -74,6 +74,7 @@ missing
|
||||
mkinstalldirs
|
||||
modules
|
||||
php
|
||||
php-*.tar.gz
|
||||
php7.spec
|
||||
php_lcov.info
|
||||
php_test_results_*.txt
|
||||
@@ -83,49 +84,10 @@ shlibtool
|
||||
stamp-h
|
||||
test.php3
|
||||
tmp-php.ini
|
||||
want_dependencies
|
||||
stamp-h.in
|
||||
scan_makefile_in.awk
|
||||
main/php_config.h
|
||||
main/php_config.h.in
|
||||
main/build-defs.h
|
||||
main/internal_functions_cli.c
|
||||
main/config.w32.h
|
||||
main/stamp-h1
|
||||
main/streams/build-defs.h
|
||||
main/streams/stamp-h1
|
||||
pear/install-pear-nozlib.phar
|
||||
pear/phpize
|
||||
pear/run-tests
|
||||
pear/php-config
|
||||
pear/scripts
|
||||
sapi/apache2handler/libphp7.module
|
||||
sapi/cgi/php-cgi
|
||||
sapi/cgi/php-cgi.1
|
||||
sapi/cli/php.1
|
||||
sapi/fpm/php-fpm
|
||||
sapi/fpm/php-fpm.1
|
||||
sapi/fpm/init.d.php-fpm
|
||||
sapi/fpm/php-fpm.conf
|
||||
sapi/fpm/fpm/php-cgi
|
||||
sapi/fpm/php-fpm.8
|
||||
sapi/fpm/php-fpm.service
|
||||
sapi/fpm/status.html
|
||||
sapi/fpm/www.conf
|
||||
sapi/phpdbg/phpdbg_parser.c
|
||||
sapi/phpdbg/phpdbg_parser.h
|
||||
sapi/phpdbg/phpdbg
|
||||
sapi/phpdbg/build
|
||||
sapi/phpdbg/*.output
|
||||
scripts/php-config
|
||||
scripts/phpize
|
||||
scripts/man1/*.1
|
||||
TSRM/tsrm_config.h
|
||||
win32/*.suo
|
||||
win32/*.aps
|
||||
win32/*.positions
|
||||
win32/ext
|
||||
win32/phpts.def
|
||||
win32/wsyslog.h
|
||||
Zend/zend_config.h
|
||||
Zend/zend_dtrace_gen.h
|
||||
Zend/zend_dtrace_gen.hbak
|
||||
@@ -135,8 +97,14 @@ Zend/zend_ini_parser.output
|
||||
Zend/zend_language_parser.c
|
||||
Zend/zend_language_parser.h
|
||||
Zend/zend_language_parser.output
|
||||
ext/date/lib/timelib_config.h
|
||||
ext/iconv/php_iconv_aliased_libiconv.h
|
||||
ext/phar/phar.php
|
||||
main/php_config.h
|
||||
main/php_config.h.in
|
||||
|
||||
# Extension specific ignores
|
||||
# Extension specifc ignores
|
||||
ext/*/configure.in
|
||||
ext/*/configure.ac
|
||||
ext/*/ltmain.sh
|
||||
ext/*/libs.mk
|
||||
@@ -145,7 +113,9 @@ ext/*/scan_makefile_in.awk
|
||||
ext/*/Makefile.global
|
||||
ext/*/acinclude.m4
|
||||
ext/*/config.sub
|
||||
ext/date/lib/timelib_config.h
|
||||
|
||||
# Extension specific
|
||||
ext/iconv/scan_makefile_in.awk
|
||||
ext/iconv/php_have_bsd_iconv.h
|
||||
ext/iconv/php_have_ibm_iconv.h
|
||||
ext/iconv/php_have_libiconv.h
|
||||
@@ -155,7 +125,6 @@ ext/iconv/php_php_iconv_impl.h
|
||||
ext/iconv/php_have_iconv.h
|
||||
ext/iconv/php_iconv_supports_errno.h
|
||||
ext/iconv/php_iconv_broken_ignore.h
|
||||
ext/iconv/php_iconv_aliased_libiconv.h
|
||||
ext/mbstring/libmbfl/Makefile.in
|
||||
ext/mbstring/libmbfl/autoscan.log
|
||||
ext/mbstring/libmbfl/config.sub
|
||||
@@ -172,7 +141,14 @@ ext/mbstring/libmbfl/filters/Makefile.in
|
||||
ext/mbstring/libmbfl/mbfl/Makefile.in
|
||||
ext/mbstring/libmbfl/mbfl/EastAsianWidth.txt
|
||||
ext/mbstring/libmbfl/nls/Makefile.in
|
||||
ext/mbstring/oniguruma/oniguruma.h
|
||||
ext/mssql/#*#
|
||||
ext/mssql/Makefile.global
|
||||
ext/mssql/acinclude.m4
|
||||
ext/mssql/config.sub
|
||||
ext/mssql/configure.in
|
||||
ext/mssql/configure.ac
|
||||
ext/mssql/ltmain.sh
|
||||
ext/mysql/weztest.sqlite
|
||||
ext/oci8/tests/*.vglog
|
||||
ext/pdo/conftest*
|
||||
ext/pdo_firebird/conftest*
|
||||
@@ -185,13 +161,47 @@ ext/pdo_sqlite/sqlite3.h
|
||||
ext/phar/phar.phar
|
||||
ext/phar/phar.1
|
||||
ext/phar/phar.phar.1
|
||||
ext/phar/phar.php
|
||||
ext/reflection/xml
|
||||
ext/reflection/html
|
||||
ext/reflection/spl.chm
|
||||
ext/simplexml/examples/security.new.xml
|
||||
ext/spl/examples/.htaccess
|
||||
ext/spl/examples/*.phps
|
||||
ext/sqlite3/tests/phpsql*
|
||||
main/build-defs.h
|
||||
main/internal_functions_cli.c
|
||||
main/config.w32.h
|
||||
main/stamp-h1
|
||||
main/streams/build-defs.h
|
||||
main/streams/stamp-h1
|
||||
#pear/install-pear-nozlib.phar
|
||||
pear/phpize
|
||||
pear/run-tests
|
||||
pear/php-config
|
||||
pear/scripts
|
||||
sapi/apache/libphp7.module
|
||||
sapi/apache2handler/libphp7.module
|
||||
sapi/apache_hooks/libphp7.module
|
||||
sapi/cgi/php-cgi
|
||||
sapi/cgi/php-cgi.1
|
||||
sapi/cli/php.1
|
||||
sapi/fpm/php-fpm
|
||||
sapi/fpm/php-fpm.1
|
||||
sapi/fpm/init.d.php-fpm
|
||||
sapi/fpm/php-fpm.conf
|
||||
sapi/fpm/fpm/php-cgi
|
||||
sapi/phpdbg/phpdbg_parser.c
|
||||
sapi/phpdbg/phpdbg_parser.h
|
||||
sapi/phpdbg/phpdbg
|
||||
scripts/php-config
|
||||
scripts/phpize
|
||||
scripts/man1/*.1
|
||||
win32/*.suo
|
||||
win32/*.aps
|
||||
win32/*.positions
|
||||
win32/ext
|
||||
win32/phpts.def
|
||||
win32/wsyslog.h
|
||||
|
||||
# ------------------------------------------------------------------------------ Windows
|
||||
# Generated by `/buildconf.bat`
|
||||
@@ -207,7 +217,7 @@ ext/sqlite3/tests/phpsql*
|
||||
/x64/
|
||||
|
||||
# ------------------------------------------------------------------------------ Tests
|
||||
# Generated by `/run-tests.php` upon failure
|
||||
# Generated by `/run-tests.php` upon failure.
|
||||
**/tests/**/*.diff
|
||||
**/tests/**/*.out*
|
||||
**/tests/**/*.php
|
||||
@@ -219,9 +229,3 @@ ext/sqlite3/tests/phpsql*
|
||||
**/tests/**/*.db
|
||||
**/tests/**/*.txt
|
||||
**/tests/**/*.tmp
|
||||
|
||||
# Special cases to invert previous ignore rules
|
||||
!ext/fileinfo/libmagic.patch
|
||||
!ext/mbstring/oniguruma.patch
|
||||
!scripts/dev/generate-phpt/tests/*.php
|
||||
!ext/pcre/pcre2lib/config.h
|
||||
@@ -1,4 +1,3 @@
|
||||
dist: trusty
|
||||
language: c
|
||||
sudo: false
|
||||
addons:
|
||||
@@ -17,7 +16,6 @@ addons:
|
||||
- libsasl2-dev
|
||||
- libxpm-dev
|
||||
- libt1-dev
|
||||
- libzip-dev
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
||||
+10
-10
@@ -4,9 +4,10 @@
|
||||
|
||||
This file lists several standards that any programmer adding or changing
|
||||
code in PHP should follow. Since this file was added at a very late
|
||||
stage of the development of PHP v3.0, the code base does not fully
|
||||
follow it, but new features are going in that general direction. Many
|
||||
sections have been recoded to use these rules.
|
||||
stage of the development of PHP v3.0, the code base does not (yet) fully
|
||||
follow it, but it's going in that general direction. Since we are now
|
||||
well into version 5 releases, many sections have been recoded to use
|
||||
these rules.
|
||||
|
||||
Code Implementation
|
||||
-------------------
|
||||
@@ -92,12 +93,12 @@ User Functions/Methods Naming Conventions
|
||||
readability of the function name itself::
|
||||
|
||||
Good:
|
||||
'str_word_count'
|
||||
'array_key_exists'
|
||||
'mcrypt_enc_self_test'
|
||||
'mysql_list_fields'
|
||||
|
||||
Ok:
|
||||
'date_interval_create_from_date_string'
|
||||
(could be 'date_intvl_create_from_date_str'?)
|
||||
'mcrypt_module_get_algo_supported_key_sizes'
|
||||
(could be 'mcrypt_mod_get_algo_sup_key_sizes'?)
|
||||
'get_html_translation_table'
|
||||
(could be 'html_get_trans_table'?)
|
||||
|
||||
@@ -297,6 +298,5 @@ highlight_file and show_source), will be separately documented. The
|
||||
proto should still be included, describing which function is aliased.
|
||||
|
||||
Backwards compatible functions and names should be maintained as long
|
||||
as the code can be reasonably be kept as part of the codebase. See the
|
||||
README in the PHP documentation repository for more information on
|
||||
documentation.
|
||||
as the code can be reasonably be kept as part of the codebase. See
|
||||
/phpdoc/README for more information on documentation.
|
||||
+2
-2
@@ -14,8 +14,8 @@ implement RFCs. Please be sure to include tests as appropriate!
|
||||
If you are fixing a bug, then please submit your PR against the lowest actively
|
||||
supported branch of PHP that the bug affects (only green branches on
|
||||
[the supported version page](http://php.net/supported-versions.php) are supported).
|
||||
For example, at the time of writing in early-2018, the lowest supported version is
|
||||
PHP 7.1, which corresponds to the `PHP-7.1` branch in Git. Please also make sure you
|
||||
For example, at the time of writing in mid-2017, the lowest supported version is
|
||||
PHP 7.0, which corresponds to the `PHP-7.0` branch in Git. Please also make sure you
|
||||
add a link to the PR in the bug on [the bug tracker](https://bugs.php.net/).
|
||||
|
||||
Pull requests implementing RFCs should be submitted against `master`.
|
||||
|
||||
+19
-25
@@ -37,7 +37,7 @@ MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cli
|
||||
MAINTENANCE: Marcus Börger <helly@php.net>, Edin Kadribasic <edink@php.net>
|
||||
MAINTENANCE: Marcus Boerger <helly@php.net>, Edin Kadribasic <edink@php.net>
|
||||
STATUS: Working
|
||||
SINCE: 4.3.0
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -47,7 +47,7 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fpm
|
||||
PRIMARY MAINTAINER: Jakub Zelenka <bukka@php.net>
|
||||
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>, Jerome Loyet <fat@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3.3
|
||||
@@ -68,7 +68,7 @@ STATUS: 5.6
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dba
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>,Christopher Jones <sixd@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>,Christopher Jones <sixd@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: DBM abstraction for db2, db3, db4, dbm, ndbm, gdbm, ini
|
||||
@@ -79,13 +79,13 @@ MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysqli
|
||||
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysqlnd
|
||||
PRIMARY MAINTAINER: Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
PRIMARY MAINTAINER: Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
@@ -99,7 +99,7 @@ EXTENSION: odbc
|
||||
PRIMARY MAINTAINER: Daniel R. Kalowsky <kalowsky@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Working
|
||||
COMMENT: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>
|
||||
@@ -120,7 +120,7 @@ STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_mysql
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>, Johannes Schlüter <johannes@php.net>, Andrey Hristov <andrey@php.net>, Ulf Wendel <uw@php.net>
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>, Johannes Schlüter <johannes@php.net>, Andrey Hristov <andrey@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
@@ -150,7 +150,7 @@ STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pgsql
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug.
|
||||
@@ -168,13 +168,13 @@ COMMENT: Integrates SQLite 3 embeddable SQL database engine.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dom
|
||||
PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>, Marcus Börger <helly@php.net>
|
||||
PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>, Marcus Boerger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: simplexml
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0
|
||||
@@ -195,12 +195,12 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: libxml
|
||||
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
|
||||
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xmlreader
|
||||
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
|
||||
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -269,7 +269,7 @@ STATUS: Working
|
||||
SINCE: 5.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: exif
|
||||
PRIMARY MAINTAINER: Kalle Sommer Nielsen <kalle@php.net>
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.2
|
||||
@@ -335,7 +335,7 @@ STATUS: Working
|
||||
SINCE: 5.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>, Pierre-Alain Joye <pajoye@php.net>, Côme Bernigaud <mcmic@php.net>
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>, Pierre-Alain Joye <pajoye@php.net>, Côme Bernigaud <mcmic@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -367,13 +367,13 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: phar
|
||||
PRIMARY MAINTAINER: Greg Beaver <cellog@php.net>, Marcus Börger <helly@php.net>, Steph Fox <sfox@php.net>
|
||||
PRIMARY MAINTAINER: Greg Beaver <cellog@php.net>, Marcus Börger <helly@php.net>, Steph Fox <sfox@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: posix
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -388,12 +388,12 @@ MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: recode
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: reflection
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Johannes Schlüter <johannes@php.net>
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Johannes Schlüter <johannes@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -419,14 +419,8 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sodium
|
||||
PRIMARY MAINTAINER: Frank Denis <jedisct1@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 7.2.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: spl
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Etienne Kneuss <colder@php.net>
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Etienne Kneuss <colder@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2018 The PHP Group. All rights reserved.
|
||||
Copyright (c) 1999 - 2017 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
+6
-6
@@ -5,7 +5,7 @@ INSTALL_DATA = $(INSTALL) -m 644
|
||||
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
|
||||
|
||||
all: $(all_targets)
|
||||
all: $(all_targets)
|
||||
@echo
|
||||
@echo "Build complete."
|
||||
@echo "Don't forget to run 'make test'."
|
||||
@@ -112,13 +112,13 @@ test: all
|
||||
clean:
|
||||
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
|
||||
rm -f php7.spec main/build-defs.h scripts/phpize
|
||||
rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
|
||||
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1
|
||||
@@ -135,9 +135,9 @@ prof-gen:
|
||||
|
||||
prof-clean:
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
prof-use:
|
||||
CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all
|
||||
|
||||
@@ -1,213 +1,275 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 7.3.0alpha1
|
||||
22 Jun 2017, PHP 7.2.0alpha2
|
||||
|
||||
- Core:
|
||||
. Improved PHP GC. (Dmitry, Nikita)
|
||||
. Redesigned the old ext_skel program written in PHP, run:
|
||||
'php ext_skel.php' for all options. This means there are no dependencies,
|
||||
thus making it work on Windows out of the box. (Kalle)
|
||||
. Removed support for BeOS. (Kalle)
|
||||
. Add PHP_VERSION to phpinfo() <title/>. (github/MattJeevas)
|
||||
. Add net_get_interfaces(). (Sara, Joe, Anatol)
|
||||
. Implemented flexible heredoc and nowdoc syntax, per
|
||||
RFC https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes.
|
||||
(Thomas Punt)
|
||||
. Added support for references in list() and array destructuring, per
|
||||
RFC https://wiki.php.net/rfc/list_reference_assignment.
|
||||
(David Walker)
|
||||
. Fixed bug #75683 (Memory leak in zend_register_functions() in ZTS mode).
|
||||
(Dmitry)
|
||||
. Fixed bug #75031 (support append mode in temp/memory streams). (adsr)
|
||||
. Fixed bug #74860 (Uncaught exceptions not being formatted properly when
|
||||
error_log set to "syslog"). (Philip Prindeville)
|
||||
. Fixed bug #75220 (Segfault when calling is_callable on parent).
|
||||
(andrewnester)
|
||||
. Fixed bug #69954 (broken links and unused config items in distributed ini
|
||||
files). (petk)
|
||||
. Fixed bug #74922 (Composed class has fatal error with duplicate, equal const
|
||||
properties). (pmmaga)
|
||||
. Fixed bug #63911 (identical trait methods raise errors during composition).
|
||||
(pmmaga)
|
||||
. Fixed bug #75677 (Clang ignores fastcall calling convention on variadic
|
||||
function). (Li-Wen Hsu)
|
||||
. Fixed bug #54043 (Remove inconsitency of internal exceptions and user
|
||||
defined exceptions). (Nikita)
|
||||
. Fixed bug #53033 (Mathematical operations convert objects to integers).
|
||||
(Nikita)
|
||||
. Fixed bug #73108 (Internal class cast handler uses integer instead of
|
||||
float). (Nikita)
|
||||
. Fixed bug #75765 (Fatal error instead of Error exception when base class is
|
||||
not found). (Timur Ibragimov)
|
||||
. Fixed bug #76198 (Wording: "iterable" is not a scalar type). (Levi Morrison)
|
||||
. Fixed bug #76137 (config.guess/config.sub do not recognize RISC-V). (cmb)
|
||||
|
||||
- BCMath:
|
||||
. Fixed bug #66364 (BCMath bcmul ignores scale parameter). (cmb)
|
||||
. Implemented request #67855 (No way to get current scale in use). (Chris
|
||||
Wright, cmb)
|
||||
. Fixed bug #75164 (split_bc_num() is pointless). (cmb)
|
||||
. Fixed bug #75169 (BCMath errors/warnings bypass PHP's error handling). (cmb)
|
||||
|
||||
- cURL:
|
||||
. Fixed bug #74125 (Fixed finding CURL on systems with multiarch support).
|
||||
(cebe)
|
||||
|
||||
- Date:
|
||||
. Implemented FR #74668: Add DateTime::createFromImmutable() method.
|
||||
(majkl578, Rican7)
|
||||
. Fixed bug #75222 (DateInterval microseconds property always 0). (jhdxr)
|
||||
. Fixed bug #68406 (calling var_dump on a DateTimeZone object modifies it).
|
||||
(jhdxr)
|
||||
. Fixed bug #76131 (mismatch arginfo for date_create). (carusogabriel)
|
||||
|
||||
- DBA:
|
||||
. Fixed bug #75264 (compiler warnings emitted). (petk)
|
||||
. Change PHP_OS_FAMILY value from "OSX" to "Darwin". (sb, kalle)
|
||||
|
||||
- GD:
|
||||
. Added support for WebP in imagecreatefromstring() (Andreas Treichel, cmb).
|
||||
. Fixed bug #74744 (gd.h: stdarg.h include missing for va_list use in
|
||||
gdErrorMethod). (rainer dot jung at kippdata dot de, cmb)
|
||||
|
||||
- GMP:
|
||||
. Export internal structures and accessor helpers for GMP object. (Sara)
|
||||
. Added gmp_binomial(n, k). (Nikita)
|
||||
. Added gmp_lcm(a, b). (Nikita)
|
||||
. Added gmp_perfect_power(a). (Nikita)
|
||||
. Added gmp_kronecker(a, b). (Nikita)
|
||||
|
||||
- interbase:
|
||||
. Fixed bug #75453 (Incorrect reflection for ibase_[p]connect). (villfa)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #75317 (UConverter::setDestinationEncoding changes source instead
|
||||
of destination). (andrewnester)
|
||||
|
||||
- JSON:
|
||||
. Added JSON_THROW_ON_ERROR flag. (Andrea)
|
||||
|
||||
- LDAP:
|
||||
. Added ldap_exop_refresh helper for EXOP REFRESH operation with dds overlay.
|
||||
(Come)
|
||||
. Added full support for sending and parsing ldap controls (Come)
|
||||
. Fixed bug #49876 (Fix LDAP path lookup on 64-bit distros). (dzuelke)
|
||||
|
||||
- libxml2:
|
||||
. Fixed bug #75871 (use pkg-config where available). (pmmaga)
|
||||
|
||||
- litespeed:
|
||||
. Fixed bug #75248 (Binary directory doesn't get created when building
|
||||
only litespeed SAPI). (petk)
|
||||
. Fixed bug #75251 (Missing program prefix and suffix). (petk)
|
||||
|
||||
- mbstring:
|
||||
. Fixed bug #65544 (mb title case conversion-first word in quotation isn't
|
||||
capitalized). (Nikita)
|
||||
. Fixed bug #71298 (MB_CASE_TITLE misbehaves with curled apostrophe/quote.
|
||||
(Nikita)
|
||||
. Fixed bug #73528 (Crash in zif_mb_send_mail). (Nikita)
|
||||
. Fixed bug #74929 (mbstring functions version 7.1.1 are slow compared to 5.3
|
||||
on Windows). (Nikita)
|
||||
. Fixed bug #76319 (mb_strtolower with invalid UTF-8 causes segmentation
|
||||
fault). (Nikita)
|
||||
. Updated to Oniguruma 6.8.2. (cmb)
|
||||
|
||||
- ODBC:
|
||||
. Removed support for ODBCRouter. (Kalle)
|
||||
. Removed support for Birdstep. (Kalle)
|
||||
- OCI8:
|
||||
. Add TAF callback (PR #2459). (KoenigsKind)
|
||||
|
||||
- OpenSSL:
|
||||
. Added openssl_pkey_derive function. (Jim Zubov)
|
||||
|
||||
- PCRE:
|
||||
. Implemented https://wiki.php.net/rfc/pcre2-migration (Anatol, Dmitry)
|
||||
. Fixed bug #75355 (preg_quote() does not quote # control character).
|
||||
(Michael Moravec)
|
||||
|
||||
- PDO_DBlib:
|
||||
. Implemented request #69592 (allow 0-column rowsets to be skipped
|
||||
automatically). (fandrieu)
|
||||
. Fixed bug #74243 (allow locales.conf to drive datetime format). (fandrieu)
|
||||
. Expose TDS version as \PDO::DBLIB_ATTR_TDS_VERSION attribute on \PDO
|
||||
instance. (fandrieu)
|
||||
. Treat DATETIME2 columns like DATETIME. (fandrieu)
|
||||
. Fixed bug #74720 (pkcs7_en/decrypt does not work if \x1a is used in
|
||||
content). (Anatol)
|
||||
. Use TLS_ANY for default ssl:// and tls:// negotiation.
|
||||
(Niklas Keller, me at kelunik dot com)
|
||||
. Fix leak in openssl_spki_new(). (jelle at vdwaa dot nl)
|
||||
|
||||
- PDO_OCI:
|
||||
. Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized
|
||||
before PHP-FPM sets it up). (Ingmar Runge)
|
||||
|
||||
- PDO SQLite
|
||||
. Add support for additional open flags
|
||||
|
||||
- pgsql:
|
||||
. Added new error constants for pg_result_error(): (Kalle)
|
||||
- Requires Postgres 9.3
|
||||
- PGSQL_DIAG_SCHEMA_NAME
|
||||
- PGSQL_DIAG_TABLE_NAME
|
||||
- PGSQL_DIAG_COLUMN_NAME
|
||||
- PGSQL_DIAG_DATATYPE_NAME
|
||||
- PGSQL_DIAG_CONSTRAINT_NAME
|
||||
- Requires Postgres 9.6
|
||||
- PGSQL_DIAG_SEVERITY_NONLOCALIZED
|
||||
|
||||
- phar:
|
||||
. Fixed bug #74991 (include_path has a 4096 char limit in some cases).
|
||||
(bwbroersma)
|
||||
. Fixed bug #65414 (deal with leading slash when adding files correctly).
|
||||
(bishopb)
|
||||
|
||||
- readline:
|
||||
. Added completion_append_character and completion_suppress_append options
|
||||
to readline_info() if linked against libreadline. (krageon)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #74941 (session fails to start after having headers sent).
|
||||
(morozov)
|
||||
|
||||
- SimpleXML:
|
||||
. Fixed bug #54973 (SimpleXML casts integers wrong). (Nikita)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #75464 (Wrong reflection on SoapClient::__setSoapHeaders). (villfa)
|
||||
. Fixed bug #70469 (SoapClient generates E_ERROR even if exceptions=1 is
|
||||
used). (Anton Artamonov)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #74977 (Appending AppendIterator leads to segfault).
|
||||
(Andrew Nester)
|
||||
. Fixed bug #75173 (incorrect behavior of AppendIterator::append in foreach
|
||||
loop). (jhdxr)
|
||||
. Fixed bug #74372 (autoloading file with syntax error uses next autoloader,
|
||||
may hide parse error). (Nikita)
|
||||
. Fixed bug #75878 (RecursiveTreeIterator::setPostfix has wrong signature).
|
||||
(cmb)
|
||||
. Fixed bug #74519 (strange behavior of AppendIterator). (jhdxr)
|
||||
. Fixed bug #76131 (mismatch arginfo for splarray constructor).
|
||||
(carusogabriel)
|
||||
|
||||
- SQLite3:
|
||||
. Updated bundled libsqlite to 3.24.0. (cmb)
|
||||
. Fixed Bug #74537 (Align --with-pdo-oci configure option with --with-oci8 syntax).
|
||||
(Tianfang Yang)
|
||||
. Support Instant Client 12.2 in --with-pdo-oci configure option.
|
||||
(Tianfang Yang)
|
||||
|
||||
- Standard:
|
||||
. Added is_countable() function. (Gabriel Caruso)
|
||||
. Fixed bug #75916 (DNS_CAA record results contain garbage). (Mike,
|
||||
Philip Sharp)
|
||||
. Fixed unserialize(), to disable creation of unsupported data structures
|
||||
through manually crafted strings. (Dmitry)
|
||||
. Fixed bug #75409 (accept EFAULT in addition to ENOSYS as indicator
|
||||
that getrandom() is missing). (sarciszewski)
|
||||
. Fixed bug #74719 (fopen() should accept NULL as context). (Alexander Holman)
|
||||
. Fixed bug #69948 (path/domain are not sanitized in setcookie). (cmb)
|
||||
. Fixed bug #75996 (incorrect url in header for mt_rand). (tatarbj)
|
||||
. Remove superfluous warnings from inet_ntop()/inet_pton(). (daverandom)
|
||||
. Compatibility with libargon2 versions 20161029 and 20160821.
|
||||
(charlesportwoodii at erianna dot com)
|
||||
. Fixed Bug #74737 (mysqli_get_client_info reflection info).
|
||||
(mhagstrand at gmail dot com)
|
||||
|
||||
- Testing:
|
||||
. Implemented request #62055 (Make run-tests.php support --CGI-- sections).
|
||||
(cmb)
|
||||
- Streams:
|
||||
. Default ssl/single_dh_use and ssl/honor_cipher_order to true.
|
||||
(me at kelunik dot com)
|
||||
|
||||
- Tidy:
|
||||
. Fixed bug #74707 (Tidy has incorrect ReflectionFunction param counts for
|
||||
functions taking tidy). (Gabriel Caruso)
|
||||
- SQLite3:
|
||||
. Update to Sqlite 3.19.3. (cmb)
|
||||
. Implement writing to blobs. (bohwaz at github dot com)
|
||||
|
||||
- Zlib:
|
||||
. Added zlib/level context option for compress.zlib wrapper. (Sara)
|
||||
08 Jun 2017, PHP 7.2.0alpha1
|
||||
|
||||
- Core:
|
||||
. Added ZEND_COUNT, ZEND_GET_CLASS, ZEND_GET_CALLED_CLASS, ZEND_GET_TYPE,
|
||||
ZEND_FUNC_NUM_ARGS, ZEND_FUNC_GET_ARGS instructions, to implement
|
||||
corresponding builtin functions. (Dmitry)
|
||||
. "Countable" interface is moved from SPL to Core. (Dmitry)
|
||||
. Added ZEND_IN_ARRAY instruction, implementing optimized in_array() builtin
|
||||
function, through hash lookup in flipped array. (Dmitry)
|
||||
. Removed IS_TYPE_IMMUTABLE (it's the same as COPYABLE & !REFCOUNTED). (Dmitry)
|
||||
. Removed the sql.safe_mode directive. (Kalle)
|
||||
. Removed support for Netware. (Kalle)
|
||||
. Renamed ReflectionClass::isIterateable() to ReflectionClass::isIterable()
|
||||
(alias original name for BC). (Sara)
|
||||
. Fixed bug #54535 (WSA cleanup executes before MSHUTDOWN). (Kalle)
|
||||
. Implemented FR #69791 (Disallow mail header injections by extra headers)
|
||||
(Yasuo)
|
||||
. Implemented FR #49806 (proc_nice() for Windows). (Kalle)
|
||||
. Fix pthreads detection when cross-compiling (ffontaine)
|
||||
. Fixed memory leaks caused by exceptions thrown from destructors. (Bob,
|
||||
Dmitry).
|
||||
. Fixed bug #73215 (uniqid() should use better random source). (Yasuo)
|
||||
. Fixed bug #73337 (try/catch not working with two exceptions inside a same
|
||||
operation). (Dmitry)
|
||||
. Implemented FR #72768 (Add ENABLE_VIRTUAL_TERMINAL_PROCESSING flag for
|
||||
php.exe). (Michele Locati)
|
||||
. Implemented "Convert numeric keys in object/array casts" RFC, fixes
|
||||
bugs #53838, #61655, #66173, #70925, #72254, etc. (Andrea)
|
||||
. Implemented "Deprecate and Remove Bareword (Unquoted) Strings" RFC.
|
||||
(Rowan Collins)
|
||||
. Raised minimum supported Windows versions to Windows 7/Server 2008 R2.
|
||||
(Anatol)
|
||||
. Implemented minor optimization in array_keys/array_values(). (Sara)
|
||||
. Fixed bug #73969 (segfault in debug_print_backtrace). (andrewnester)
|
||||
. Added PHP_OS_FAMILY constant to determine on which OS we are. (Jan Altensen)
|
||||
. Fixed bug #73994 (arginfo incorrect for unpack). (krakjoe)
|
||||
. Fixed bug #73973 (assertion error in debug_zval_dump). (andrewnester)
|
||||
. Fixed bug #73987 (Method compatibility check looks to original
|
||||
definition and not parent). (pmmaga)
|
||||
. Fixed bug #73991 (JSON_OBJECT_AS_ARRAY not respected). (Sara)
|
||||
. Fixed bug #74053 (Corrupted class entries on shutdown when a destructor
|
||||
spawns another object). (jim at commercebyte dot com)
|
||||
. Fixed bug #73971 (Filename got limited to MAX_PATH on Win32 when scan
|
||||
directory). (Anatol)
|
||||
. Fixed bug #74149 (static embed SAPI linkage error). (krakjoe)
|
||||
. Fixed bug #72359, bug #72451, bug #73706, bug #71115 and others related
|
||||
to interned strings handling in TS builds. (Anatol, Dmitry)
|
||||
. Implemented "Trailing Commas In List Syntax" RFC for group use lists only.
|
||||
(Sammy Kaye Powers)
|
||||
. Fixed bug #74269 (It's possible to override trait property with different
|
||||
loosely-equal value). (pmmaga)
|
||||
. Fixed bug #61970 (Restraining __construct() access level in subclass gives
|
||||
a fatal error). (pmmaga)
|
||||
. Fixed bug #63384 (Cannot override an abstract method with an abstract
|
||||
method). (pmmaga, wes)
|
||||
. Fixed bug #74607 (Traits enforce different inheritance rules). (pmmaga)
|
||||
. Fixed misparsing of abstract unix domain socket names. (Sara)
|
||||
|
||||
- BCMath:
|
||||
. Fixed bug #46564 (bcmod truncates fractionals). (liborm85)
|
||||
|
||||
- Calendar:
|
||||
. Fix integer overflows (Joshua Rogers)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #55407 (Impossible to prototype DateTime::createFromFormat).
|
||||
(kelunik)
|
||||
. Fixed bug #69587 (DateInterval properties and isset). (jhdxr)
|
||||
. Fixed bug #74404 (Wrong reflection on DateTimeZone::getTransitions).
|
||||
(krakjoe)
|
||||
. Fixed bug #74080 (add constant for RFC7231 format datetime). (duncan3dc)
|
||||
. Fixed bug #74639 (implement clone for DatePeriod and DateInterval).
|
||||
(andrewnester)
|
||||
. Implemented FR #71520 (Adding the DateTime constants to the
|
||||
DateTimeInterface interface). (Majkl578)
|
||||
|
||||
- Dba:
|
||||
. Fixed bug #72885 (flatfile: dba_fetch() fails to read replaced entry).
|
||||
(Anatol)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #67474 (getElementsByTagNameNS filter on default ns). (aboks)
|
||||
. Fixed bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes).
|
||||
(aboks)
|
||||
. Fixed bug #74004 (LIBXML_NOWARNING (etc) ignored by DOMDocument::loadHTML).
|
||||
(somedaysummer)
|
||||
|
||||
- EXIF:
|
||||
. Added support for vendor specific tags for the following formats:
|
||||
Samsung, DJI, Panasonic, Sony, Pentax, Minolta, Sigma/Foveon, AGFA,
|
||||
Kyocera, Ricoh & Epson. (Kalle)
|
||||
. Fixed bug #72682 (exif_read_data() fails to read all data for some
|
||||
images). (Kalle)
|
||||
. Fixed bug #71534 (Type confusion in exif_read_data() leading to heap
|
||||
overflow in debug mode). (hlt99 at blinkenshell dot org, Kalle)
|
||||
. Fixed bug #68547 (Exif Header component value check error).
|
||||
(sjh21a at gmail dot com, Kalle)
|
||||
. Fixed bug #66443 (Corrupt EXIF header: maximum directory nesting level
|
||||
reached for some cameras). (Kalle)
|
||||
. Fixed Redhat bug #1362571 (PHP not returning full results for
|
||||
exif_read_data function). (Kalle)
|
||||
|
||||
- FPM:
|
||||
. Configuration to limit fpm slow log trace callers. (Sannis)
|
||||
. Fixed bug #69865 (php-fpm does not close stderr when using syslog).
|
||||
(Mike)
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #74598 (ftp:// wrapper ignores context arg). (Sara)
|
||||
. Implement MLSD for structured listing of directories. (blar)
|
||||
|
||||
- GD:
|
||||
. Implemented imageresolution as getter and setter (Christoph)
|
||||
. Fixed bug #74343 (compile fails on solaris 11 with system gd2 library).
|
||||
(krakjoe)
|
||||
|
||||
- GMP:
|
||||
. Fixed bug #70896 (gmp_fact() silently ignores non-integer input). (Sara)
|
||||
|
||||
- hash:
|
||||
. Fixed bug #73961 (environmental build dependency in hash sha3 source).
|
||||
(krakjoe)
|
||||
. Changed HashContext from resource to object. (Rouven Weßling, Sara)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #74433 (wrong reflection for Normalizer methods). (villfa)
|
||||
. Fixed bug #74439 (wrong reflection for Locale methods). (villfa)
|
||||
. Fixed bug #74468 (wrong reflection on Collator::sortWithSortKeys). (villfa)
|
||||
. Fixed bug #63790 (test using Spoofchecker which may be unavailable). (Sara)
|
||||
|
||||
- Mbstring:
|
||||
. Implemented request #66024 (mb_chr() and mb_ord()). (Masakielastic, Yasuo)
|
||||
. Implemented request #65081 (mb_scrub()). (Masakielastic, Yasuo)
|
||||
. Implemented request #69086 (enhancement for mb_convert_encoding() that
|
||||
handles multibyte replacement char nicely). (Masakielastic, Yasuo)
|
||||
. Added array input support to mb_convert_encoding(). (Yasuo)
|
||||
. Added array input support to mb_check_encoding(). (Yasuo)
|
||||
. Fixed bug #69079 (enhancement for mb_substitute_character). (masakielastic)
|
||||
. Update to oniguruma version 6.3.0. (Remi)
|
||||
|
||||
- Mcrypt:
|
||||
. The deprecated mcrypt extension has been moved to PECL. (leigh)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #73949 (leak in mysqli_fetch_object). (krakjoe)
|
||||
|
||||
- mysqlnd:
|
||||
. Fixed bug #73800 (sporadic segfault with MYSQLI_OPT_INT_AND_FLOAT_NATIVE).
|
||||
(vanviegen)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #71519 (add serial hex to return value array). (xrobau)
|
||||
|
||||
- PCRE:
|
||||
. Added support for PCRE JIT fast path API. (dmitry)
|
||||
. Fixed bug #61780 (Inconsistent PCRE captures in match results). (cmb)
|
||||
|
||||
- PDO:
|
||||
. Add "Sent SQL" to debug dump for emulated prepares. (Adam Baratz)
|
||||
. Add parameter types for national character set strings. (Adam Baratz)
|
||||
|
||||
- PDO_DBlib:
|
||||
. Fixed bug #73234 (Emulated statements let value dictate parameter type).
|
||||
(Adam Baratz)
|
||||
. Fixed bug #73396 (bigint columns are returned as strings). (Adam Baratz)
|
||||
. Expose DB-Library version as \PDO::DBLIB_ATTR_VERSION attribute on \PDO
|
||||
instance. (Adam Baratz)
|
||||
. Add test coverage for bug #72969. (Jeff Farr)
|
||||
|
||||
- PDO_OCI:
|
||||
. Fixed bug #54379 (PDO_OCI: UTF-8 output gets truncated). (gureedo / Oracle)
|
||||
|
||||
- PDO_PgSQL:
|
||||
. Fixed bug #73959 (lastInsertId fails to throw an exception for wrong
|
||||
sequence name). (andrewnester)
|
||||
|
||||
- PDO_Sqlite
|
||||
. Switch to sqlite3_prepare_v2() and sqlite3_close_v2() functions (rasmus)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #74383 (phar method parameters reflection correction).
|
||||
(mhagstrand)
|
||||
. Fixed bug #74196 (phar does not correctly handle names containing dots).
|
||||
(mhagstrand)
|
||||
. Fixed bug #74386 (Phar::__construct reflection incorrect). (villfa)
|
||||
|
||||
- PHPDBG
|
||||
. Added extended_value to opcode dump output. (Sara)
|
||||
|
||||
- posix:
|
||||
. Fixed bug #71219 (configure script incorrectly checks for ttyname_r). (atoh)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #73461 (Prohibit session save handler recursion). (Yasuo)
|
||||
. PR #2233 Removed register_globals related code and "!" can be used as $_SESSION key name. (Yasuo)
|
||||
. Improved bug #73100 fix. 'user' save handler can only be set by session_set_save_handler()
|
||||
. Fixed bug #69582 (session not readable by root in CLI). (EvgeniySpinov)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #69137 (Peer verification fails when using a proxy with SoapClient)
|
||||
(Keith Smiley)
|
||||
|
||||
- SQLite3:
|
||||
. Update to Sqlite 3.18.0. (cmb)
|
||||
. Fixed bug #74413 (incorrect reflection for SQLite3::enableExceptions).
|
||||
(krakjoe)
|
||||
|
||||
- Standard:
|
||||
. Add subject to mail log. (tomsommer)
|
||||
. Fixed bug #31875 (get_defined_functions additional param to exclude
|
||||
disabled functions). (willianveiga)
|
||||
. Fixed bug #69442 (closing of fd incorrect when PTS enabled). (jaytaph)
|
||||
. Fixed bug #72974 (imap is undefined service on AIX). (matthieu.sarter)
|
||||
. Fixed bug #72979 (money_format stores wrong length AIX). (matthieu.sarter)
|
||||
. Fixed bug #74300 (unserialize accepts two plus/minus signs for float number exponent part).
|
||||
(xKerman)
|
||||
. Fixed bug #74556 (stream_socket_get_name() returns '\0'). (Sara)
|
||||
|
||||
- XML:
|
||||
. Moved utf8_encode() and utf8_decode() to the Standard extension. (Andrea)
|
||||
. Fixed bug #72135 (malformed XML causes fault) (edgarsandi)
|
||||
|
||||
- xmlreader:
|
||||
. Fixed bug #74457 (Wrong reflection on XMLReader::expand). (villfa)
|
||||
|
||||
- XMLRPC:
|
||||
. Use Zend MM for allocation in bundled libxmlrpc (Joe)
|
||||
|
||||
- ZIP:
|
||||
. Add support for encrypted archives. (Remi)
|
||||
. Use of bundled libzip is deprecated, --with-libzip option is recommended. (Remi)
|
||||
. Fixed Bug #73803 (Reflection of ZipArchive does not show public properties). (Remi)
|
||||
|
||||
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
|
||||
+161
-17
@@ -1,44 +1,188 @@
|
||||
(NOTE: you may also want to take a look at the pear package
|
||||
PECL_Gen, a PHP-only alternative for this script that
|
||||
supports way more extension writing tasks and is
|
||||
supposed to replace ext_skel completely in the long run ...)
|
||||
|
||||
WHAT IT IS
|
||||
|
||||
It's a tool for automatically creating the basic framework for a PHP extension.
|
||||
It's a tool for automatically creating the basic framework for a PHP module
|
||||
and writing C code handling arguments passed to your functions from a simple
|
||||
configuration file. See an example at the end of this file.
|
||||
|
||||
HOW TO USE IT
|
||||
|
||||
Very simple. First, change to the ext/ directory of the PHP sources. Then
|
||||
run the following
|
||||
Very simple. First, change to the ext/ directory of the PHP 4 sources. If
|
||||
you just need the basic framework and will be writing all the code in your
|
||||
functions yourself, you can now do
|
||||
|
||||
php ext_skel.php --ext extension_name
|
||||
./ext_skel --extname=module_name
|
||||
|
||||
and everything you need will be placed in directory ext/extension_name.
|
||||
and everything you need is placed in directory module_name.
|
||||
|
||||
[ Note that GNU awk is likely required for this script to work. Debian
|
||||
systems seem to default to using mawk, so you may need to change the
|
||||
#! line in skeleton/create_stubs and the cat $proto | awk line in
|
||||
ext_skel to use gawk explicitly. ]
|
||||
|
||||
If you don't need to test the existence of any external header files,
|
||||
libraries or functions in them, the extension is ready to be compiled in
|
||||
PHP. To compile the extension, run the following:
|
||||
libraries or functions in them, the module is already almost ready to be
|
||||
compiled in PHP. Just remove 3 comments in your_module_name/config.m4,
|
||||
change back up to PHP sources top directory, and do
|
||||
|
||||
./buildconf; ./configure --enable-extension_name; make
|
||||
./buildconf; ./configure --enable-module_name; make
|
||||
|
||||
The definition of PHP_extension_NAME_VERSION will be present in the
|
||||
php_extension_name.h and injected into the zend_extension_entry definition. This
|
||||
The definition of PHP_MODULE_NAME_VERSION will be present in the
|
||||
php_module_name.h and injected into the zend_module_entry definition. This
|
||||
is required by the PECL website for the version string conformity checks
|
||||
against package.xml
|
||||
|
||||
But if you already have planned the overall scheme of your module, what
|
||||
functions it will contain, their return types and the arguments they take
|
||||
(a very good idea) and don't want to bother yourself with creating function
|
||||
definitions and handling arguments passed yourself, it's time to create a
|
||||
function definitions file, which you will give as an argument to ext_skel
|
||||
with option
|
||||
|
||||
--proto=filename.
|
||||
|
||||
SOURCE AND HEADER FILE NAME
|
||||
|
||||
The ext_skel.php script generates 'extension_name.c' and 'php_extension_name.h'
|
||||
as the main source and header files. Keep these names.
|
||||
./ext_skel generates 'module_name.c' and 'php_module_name.h' as main source
|
||||
and header files. Keep these names.
|
||||
|
||||
extension functions (User functions) must be named
|
||||
Module functions (User functions) must be named
|
||||
|
||||
extension_name_function()
|
||||
module_name_function()
|
||||
|
||||
When you need to expose extension functions to other extensions, expose functions
|
||||
When you need to expose module functions to other modules, expose functions
|
||||
strictly needed by others. Exposed internal function must be named
|
||||
|
||||
php_extension_name_function()
|
||||
php_module_name_function()
|
||||
|
||||
See also CODING_STANDARDS.
|
||||
|
||||
|
||||
FORMAT OF FUNCTION DEFINITIONS FILE
|
||||
|
||||
All the definitions must be on one line. In it's simplest form, it's just
|
||||
the function name, e.g.
|
||||
|
||||
module_name_function
|
||||
|
||||
but then you'll be left with an almost empty function body without any
|
||||
argument handling.
|
||||
|
||||
Arguments are given in parenthesis after the function name, and are of
|
||||
the form 'argument_type argument_name'. Arguments are separated from each
|
||||
other with a comma and optional space. Argument_type can be one of int,
|
||||
bool, double, float, string, array, object or mixed.
|
||||
|
||||
An optional argument is separated from the previous by an optional space,
|
||||
then '[' and of course comma and optional space, like all the other
|
||||
arguments. You should close a row of optional arguments with same amount of
|
||||
']'s as there where '['s. Currently, it does not harm if you forget to do it
|
||||
or there is a wrong amount of ']'s, but this may change in the future.
|
||||
|
||||
An additional short description may be added after the parameters.
|
||||
If present it will be filled into the 'proto' header comments in the stubs
|
||||
code and the <refpurpose> tag in the XML documentation.
|
||||
|
||||
An example:
|
||||
|
||||
module_name_function(int arg1, int arg2 [, int arg3 [, int arg4]])
|
||||
|
||||
Arguments arg1 and arg2 are required.
|
||||
Arguments arg3 and arg4 are optional.
|
||||
|
||||
If possible, the function definition should also contain it's return type
|
||||
in front of the definition. It's not actually used for any C code generating
|
||||
purposes but PHP in-source documentation instead, and as such, very useful.
|
||||
It can be any of int, double, string, bool, array, object, resource, mixed
|
||||
or void.
|
||||
|
||||
The file must contain nothing else but function definitions, no comments or
|
||||
empty lines.
|
||||
|
||||
OTHER OPTIONS
|
||||
|
||||
Run php ext_skel.php --help to see the available options.
|
||||
--no-help
|
||||
|
||||
By default, ext_skel creates both comments in the source code and a test
|
||||
function to help first time module writers to get started and testing
|
||||
configuring and compiling their module. This option turns off all such things
|
||||
which may just annoy experienced PHP module coders. Especially useful with
|
||||
|
||||
--stubs=file
|
||||
|
||||
which will leave out also all module specific stuff and write just function
|
||||
stubs with function value declarations and passed argument handling, and
|
||||
function entries and definitions at the end of the file, for copying and
|
||||
pasting into an already existing module.
|
||||
|
||||
--xml[=file]
|
||||
|
||||
Creates the basics for phpdoc .xml file.
|
||||
|
||||
--full-xml
|
||||
|
||||
Not implemented yet. When or if there will ever be created a framework for
|
||||
self-contained extensions to use phpdoc system for their documentation, this
|
||||
option enables it on the created xml file.
|
||||
|
||||
CURRENT LIMITATIONS, BUGS AND OTHER ODDITIES
|
||||
|
||||
Only arguments of types int, bool, double, float, string and array are
|
||||
handled. For other types you must write the code yourself. And for type
|
||||
mixed, it wouldn't even be possible to write anything, because only you
|
||||
know what to expect.
|
||||
|
||||
It can't handle correctly, and probably never will, variable list of
|
||||
of arguments. (void foo(int bar [, ...])
|
||||
|
||||
Don't trust the generated code too much. It tries to be useful in most of
|
||||
the situations you might encounter, but automatic code generation will never
|
||||
beat a programmer who knows the real situation at hand. ext_skel is generally
|
||||
best suited for quickly generating a wrapper for c-library functions you
|
||||
might want to have available in PHP too.
|
||||
|
||||
This program doesn't have a --help option. It has --no-help instead.
|
||||
|
||||
EXAMPLE
|
||||
|
||||
The following _one_ line
|
||||
|
||||
bool module_name_drawtext(resource image, string text, resource font, int x, int y [, int color])
|
||||
|
||||
will create this function definition for you (note that there are a few
|
||||
question marks to be replaced by you, and you must of course add your own
|
||||
value definitions too):
|
||||
|
||||
/* {{{ proto bool module_name_drawtext(resource image, string text, resource font, int x, int y [, int color])
|
||||
*/
|
||||
PHP_FUNCTION(module_name_drawtext)
|
||||
{
|
||||
char *text = NULL;
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
int image_id = -1;
|
||||
size_t text_len;
|
||||
int font_id = -1;
|
||||
zend_long x;
|
||||
zend_long y;
|
||||
zend_long color;
|
||||
zval *image = NULL;
|
||||
zval *font = NULL;
|
||||
|
||||
if (zend_parse_parameters(argc, "rsrll|l", &image, &text, &text_len, &font, &x, &y, &color) == FAILURE)
|
||||
return;
|
||||
|
||||
if (image) {
|
||||
ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???_rsrc_id);
|
||||
}
|
||||
if (font) {
|
||||
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???_rsrc_id);
|
||||
}
|
||||
|
||||
php_error(E_WARNING, "module_name_drawtext: not yet implemented");
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+8
-11
@@ -44,20 +44,17 @@ Having said that, here are the organizational rules::
|
||||
|
||||
Currently we have the following branches in use::
|
||||
|
||||
master The active development branch.
|
||||
master The active development branch.
|
||||
|
||||
PHP-7.2 Is used to release the PHP 7.2.x series. This is a current
|
||||
PHP-7.1 Is used to release the PHP 7.1.x series. This is a prerelease
|
||||
version.
|
||||
|
||||
PHP-7.0 Is used to release the PHP 7.0.x series. This is a current
|
||||
stable version and is open for bugfixes only.
|
||||
|
||||
PHP-7.1 Is used to release the PHP 7.1.x series. This is a current
|
||||
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-7.0 Is used to release the PHP 7.0.x series. This is an old
|
||||
stable version and is open for security fixes only.
|
||||
|
||||
PHP-5.6 Is used to release the PHP 5.6.x series. This is an old
|
||||
stable version and is open for security fixes only.
|
||||
|
||||
PHP-5.5 This branch is closed.
|
||||
|
||||
PHP-5.4 This branch is closed.
|
||||
@@ -77,7 +74,7 @@ The next few rules are more of a technical nature::
|
||||
|
||||
1. All changes should first go to the lowest branch (i.e. 5.6) and then
|
||||
get merged up to all other branches. If a change is not needed for
|
||||
later branches (i.e. fixes for features which were dropped from later
|
||||
later branches (i.e. fixes for features which where dropped from later
|
||||
branches) an empty merge should be done.
|
||||
|
||||
2. All news updates intended for public viewing, such as new features,
|
||||
@@ -113,7 +110,7 @@ The format of the commit messages is pretty simple.
|
||||
An Example from the git project (commit 2b34e486bc):
|
||||
|
||||
pack-objects: Fix compilation with NO_PTHREDS
|
||||
|
||||
|
||||
It looks like commit 99fb6e04 (pack-objects: convert to use
|
||||
parse_options(), 2012-02-01) moved the #ifdef NO_PTHREDS around but
|
||||
hasn't noticed that the 'arg' variable no longer is available.
|
||||
|
||||
+22
-150
@@ -1,7 +1,7 @@
|
||||
1. libmagic (ext/fileinfo) see ext/fileinfo/libmagic/LICENSE
|
||||
2. Oniguruma (ext/mbstring) see ext/mbstring/oniguruma/COPYING
|
||||
3. libmbfl (ext/mbstring) see ext/mbstring/libmbfl/LICENSE
|
||||
4. pcre2lib (ext/pcre)
|
||||
4. pcrelib (ext/pcre) see ext/pcre/pcrelib/LICENCE
|
||||
5. ext/standard crypt
|
||||
6. ext/standard crypt's blowfish implementation
|
||||
7. Sqlite/Sqlite3 ext/sqlite3 ext/sqlite
|
||||
@@ -15,107 +15,6 @@
|
||||
15. main/strlcat
|
||||
16. main/strlcpy
|
||||
17. libgd see ext/gd/libgd/COPYING
|
||||
18. ext/phar portions of tar implementations
|
||||
19. libbcmath (ext/bcmath) see ext/bcmath/libbcmath/COPYING.LIB
|
||||
|
||||
|
||||
4. pcre2lib (ext/pcre)
|
||||
|
||||
PCRE2 LICENCE
|
||||
-------------
|
||||
|
||||
PCRE2 is a library of functions to support regular expressions whose syntax
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Release 10 of PCRE2 is distributed under the terms of the "BSD" licence, as
|
||||
specified below, with one exemption for certain binary redistributions. The
|
||||
documentation for PCRE2, supplied in the "doc" directory, is distributed under
|
||||
the same terms as the software itself. The data in the testdata directory is
|
||||
not copyrighted and is in the public domain.
|
||||
|
||||
The basic library functions are written in C and are freestanding. Also
|
||||
included in the distribution is a just-in-time compiler that can be used to
|
||||
optimize pattern matching. This is an optional feature that can be omitted when
|
||||
the library is built.
|
||||
|
||||
|
||||
THE BASIC LIBRARY FUNCTIONS
|
||||
---------------------------
|
||||
|
||||
Written by: Philip Hazel
|
||||
Email local part: ph10
|
||||
Email domain: cam.ac.uk
|
||||
|
||||
University of Cambridge Computing Service,
|
||||
Cambridge, England.
|
||||
|
||||
Copyright (c) 1997-2018 University of Cambridge
|
||||
All rights reserved.
|
||||
|
||||
|
||||
PCRE2 JUST-IN-TIME COMPILATION SUPPORT
|
||||
--------------------------------------
|
||||
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Emain domain: freemail.hu
|
||||
|
||||
Copyright(c) 2010-2018 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
|
||||
|
||||
STACK-LESS JUST-IN-TIME COMPILER
|
||||
--------------------------------
|
||||
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Emain domain: freemail.hu
|
||||
|
||||
Copyright(c) 2009-2018 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
|
||||
|
||||
THE "BSD" LICENCE
|
||||
-----------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notices,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notices, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the University of Cambridge nor the names of any
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
EXEMPTION FOR BINARY LIBRARY-LIKE PACKAGES
|
||||
------------------------------------------
|
||||
|
||||
The second condition in the BSD licence (covering binary redistributions) does
|
||||
not apply all the way down a chain of software. If binary package A includes
|
||||
PCRE2, it must respect the condition, but if package B is software that
|
||||
includes package A, the condition is not imposed on package B unless it uses
|
||||
PCRE2 independently.
|
||||
|
||||
End
|
||||
|
||||
|
||||
5. ext/standard crypt
|
||||
|
||||
@@ -147,7 +46,7 @@ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
|
||||
|
||||
6. ext/standard crypt's blowfish implementation
|
||||
|
||||
@@ -193,7 +92,7 @@ http://www.usenix.org/events/usenix99/provos.html
|
||||
Some of the tricks in BF_ROUND might be inspired by Eric Young's
|
||||
Blowfish library (I can't be sure if I would think of something if I
|
||||
hadn't seen his code).
|
||||
|
||||
|
||||
|
||||
7. Sqlite/Sqlite3 ext/sqlite3 ext/sqlite
|
||||
|
||||
@@ -227,7 +126,7 @@ Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
|
||||
|
||||
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
||||
Copyright (C) 2000 - 2003, Richard J. Wagner
|
||||
All rights reserved.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@@ -240,8 +139,8 @@ are met:
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The names of its contributors may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
3. The names of its contributors may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
@@ -362,26 +261,26 @@ SUCH DAMAGE.
|
||||
|
||||
12. libxmlrpc ext/xmlrpc
|
||||
|
||||
Copyright 2000 Epinions, Inc.
|
||||
Copyright 2000 Epinions, Inc.
|
||||
|
||||
Subject to the following 3 conditions, Epinions, Inc. permits you, free
|
||||
of charge, to (a) use, copy, distribute, modify, perform and display this
|
||||
software and associated documentation files (the "Software"), and (b)
|
||||
permit others to whom the Software is furnished to do so as well.
|
||||
Subject to the following 3 conditions, Epinions, Inc. permits you, free
|
||||
of charge, to (a) use, copy, distribute, modify, perform and display this
|
||||
software and associated documentation files (the "Software"), and (b)
|
||||
permit others to whom the Software is furnished to do so as well.
|
||||
|
||||
1) The above copyright notice and this permission notice shall be included
|
||||
without modification in all copies or substantial portions of the
|
||||
Software.
|
||||
1) The above copyright notice and this permission notice shall be included
|
||||
without modification in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF
|
||||
ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY
|
||||
IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE OR NONINFRINGEMENT.
|
||||
2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF
|
||||
ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY
|
||||
IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE OR NONINFRINGEMENT.
|
||||
|
||||
3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
|
||||
NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH
|
||||
3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
|
||||
NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
13. libzip ext/zip
|
||||
@@ -516,30 +415,3 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
18. ext/phar portions of tar implementations
|
||||
|
||||
portions of tar implementations in ext/phar - phar_tar_octal() are based on an
|
||||
implementation by Tim Kientzle from libarchive, licensed with this license:
|
||||
|
||||
Copyright (c) 2003-2007 Tim Kientzle
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+7
-34
@@ -37,7 +37,7 @@ Most developers should have this.
|
||||
Moving extensions from php-src to PECL
|
||||
- Checkout the pecl directory, most likely you want a sparse-root checkout
|
||||
svn co --depth=empty https://svn.php.net/repository/pecl
|
||||
- Create a directory for the extension incl. branch and tag structure,
|
||||
- Create an directory for the extension incl. branch and tag structure,
|
||||
no trunk at this point and commit this to svn
|
||||
cd pecl; mkdir foo foo/tags foo/branches; svn add foo; svn commit
|
||||
- Move the extension from php-src to the new location
|
||||
@@ -50,7 +50,7 @@ maintainers if any:
|
||||
- create the package.xml, commit
|
||||
- release the package
|
||||
|
||||
For Moving extensions from PECL to php-src the svn mv has to be done the other
|
||||
For Moving extensions from PECL to php-src the svn mv has to be tone the other
|
||||
way round.
|
||||
|
||||
Rolling a non stable release (alpha/beta/RC)
|
||||
@@ -130,8 +130,8 @@ highlight the major important things (security fixes) and when it is important
|
||||
to upgrade.
|
||||
|
||||
a. Call php bin/createNewsEntry in your local phpweb checkout
|
||||
Use category "releases" for all stable releases.
|
||||
Use category "frontpage" for X.Y.0 non-stable releases only (news only).
|
||||
Use category "releases" for all non-stable releases.
|
||||
Use category "frontpage" for X.Y.0 non-stable releases only.
|
||||
|
||||
b. Add the content for the news entry. Be sure to include the text:
|
||||
"THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!"
|
||||
@@ -187,11 +187,7 @@ credits files in ext/standard.
|
||||
|
||||
9. run: ``PHPROOT=. ./makedist php 5.4.1``, this will export the tag, create configure
|
||||
and build three tarballs (gz, bz2 and xz).
|
||||
Check if the pear files are updated (phar).
|
||||
On some systems the behavior of GNU tar can default to produce POSIX compliant archives
|
||||
with PAX headers. As not every application is compatible with that format, creation of
|
||||
archives with PAX headers should be avoided. When packaging on such a system, the GNU tar
|
||||
can be influenced by defining the environment variable TAR_OPTIONS='--format=gnu'.
|
||||
Check if the pear files are updated (phar).
|
||||
|
||||
10. Generate the GPG signature files for the archives.
|
||||
``gpg -u YOUREMAIL --armor --detach-sign php-X.Y.Z.tar.xxx``
|
||||
@@ -201,8 +197,7 @@ can be influenced by defining the environment variable TAR_OPTIONS='--format=gnu
|
||||
``git submodule init;
|
||||
git submodule update;
|
||||
cd distributions;
|
||||
git fetch;
|
||||
git pull --rebase origin master;
|
||||
git pull origin master;
|
||||
cd ..;
|
||||
git commit distributions;
|
||||
git push;``
|
||||
@@ -332,28 +327,6 @@ Please make sure that the mail to php-announce@ is its own completely separate e
|
||||
This is to make sure that replies to the announcement on php-general@ or internals@
|
||||
will not accidentally hit the php-announce@ mailinglist.
|
||||
|
||||
Forking a new release branch
|
||||
----------------------------
|
||||
|
||||
1. One week prior to cutting X.Y.0beta1, warn internals@ that your version's branch
|
||||
is about to be cut, and that PHP-X.Y will be moving into feature freeze.
|
||||
Try to be specific about when the branch will be cut.
|
||||
Example: http://news.php.net/php.internals/99864
|
||||
|
||||
2. Just prior to cutting X.Y.0beta1, create the new branch locally.
|
||||
Add a commit on master after the branch point clearing the NEWS file, and updating
|
||||
main/php_versions.h and Zend/zend.h to update versions.
|
||||
Example: https://github.com/php/php-src/commit/5230541ef59e0637d5522293a7d099bf18ce6af3
|
||||
Push the new branch and the commit just added to master.
|
||||
|
||||
3. Immediately notify internals@ of the branch cut and advise the new merging order:
|
||||
Example: http://news.php.net/php.internals/99903
|
||||
|
||||
4. Update php-web:git.php and wiki.php.net/vcs/gitworkflow to reflect the new branch:
|
||||
Example: https://github.com/php/web-php/commit/74bcad4c770d95f21b7fbeeedbd76d943bb83f23
|
||||
|
||||
5. Notify nlopess@ to add PHP_X_Y tag to gcov.php.net
|
||||
|
||||
New Release Manager Checklist
|
||||
-----------------------------
|
||||
|
||||
@@ -365,7 +338,7 @@ New Release Manager Checklist
|
||||
one or more of the previous RMs sign your key. Publish your public key to pgp.mit.edu with:
|
||||
`gpg --keyserver pgp.mit.edu --send-keys $KEYID`
|
||||
|
||||
3. Request karma to edit main/php_version.h. Possibly karma for other restricted parts of
|
||||
3. Request karma to eding main/php_version.h. Possibly karma for other restricted parts of
|
||||
php-src might come in question.
|
||||
|
||||
4. Request karma for web/qa.git and web/php.git for publishing release announcements.
|
||||
|
||||
+9
-144
@@ -9,7 +9,7 @@ it failed on your system without providing substantial backup information
|
||||
on *why* the test failed on your special setup. Thank you :-)
|
||||
|
||||
|
||||
[Testing Basics]
|
||||
[Testing Basics]
|
||||
----------------
|
||||
The easiest way to test your PHP build is to run "make test" from the
|
||||
command line after successfully compiling. This will run the complete
|
||||
@@ -36,7 +36,7 @@ If you are running the run-tests.php script from the command line (as above)
|
||||
you must set the TEST_PHP_EXECUTABLE environment variable to explicitly
|
||||
select the PHP executable that is to be tested, that is, used to run the test scripts.
|
||||
|
||||
If you run the tests using make test, the PHP CLI and CGI executables are
|
||||
If you run the tests using make test, the PHP CLI and CGI executables are
|
||||
automatically set for you. "make test" executes "run-tests.php" script with the CLI binary. Some
|
||||
test scripts such as session must be executed by CGI SAPI. Therefore,
|
||||
you must build PHP with CGI SAPI to perform all tests.
|
||||
@@ -61,8 +61,8 @@ test scripts by extracting all directories named "tests"
|
||||
from the source root and any subdirectories below. If there are files,
|
||||
which have a "phpt" extension, "run-tests.php" looks at the sections
|
||||
in these files, determines whether it should run it, by evaluating
|
||||
the 'SKIPIF' section. If the test is eligible for execution, the 'FILE'
|
||||
section is extracted into a ".php" file (with the same name besides
|
||||
the 'SKIP' section. If the test is eligible for execution, the 'FILE'
|
||||
section is extracted into a ".php" file (with the same name besides
|
||||
the extension) and gets executed.
|
||||
When an argument is given or TESTS environment variable is set, the
|
||||
GLOB is expanded by the shell and any file with extension "*.phpt" is
|
||||
@@ -77,9 +77,9 @@ Examples:
|
||||
|
||||
[Test results]
|
||||
--------------
|
||||
Test results are printed to standard output. If there is a failed test,
|
||||
Test results are printed to standard output. If there is a failed test,
|
||||
the "run-tests.php" script saves the result, the expected result and the
|
||||
code executed to the test script directory. For example, if
|
||||
code executed to the test script directory. For example, if
|
||||
ext/myext/tests/myext.phpt fails to pass, the following files are created:
|
||||
|
||||
ext/myext/tests/myext.php - actual test file executed
|
||||
@@ -151,20 +151,20 @@ advised to test for non-zero, rather then a specific value.
|
||||
|
||||
[Creating new test files]
|
||||
-------------------------
|
||||
Writing test file is very easy if you are used to PHP.
|
||||
Writing test file is very easy if you are used to PHP.
|
||||
See the HOWTO at http://qa.php.net/write-test.php
|
||||
|
||||
|
||||
[How to help us]
|
||||
----------------
|
||||
If you find bug in PHP, you can submit bug report AND test script
|
||||
If you find bug in PHP, you can submit bug report AND test script
|
||||
for us. You don't have to write complete script, just give us test
|
||||
script with following format. Please test the script and make sure
|
||||
you write the correct ACTUAL OUTPUT and EXPECTED OUTPUT before you
|
||||
submit.
|
||||
|
||||
<?php
|
||||
/*
|
||||
/*
|
||||
Bug #12345
|
||||
substr() bug. Do not return expected string.
|
||||
|
||||
@@ -179,138 +179,3 @@ $str = "XYZABCD";
|
||||
echo substr($str,3,7);
|
||||
|
||||
?>
|
||||
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
This is an addendum to README.TESTING with additional information
|
||||
specific to server-tests.php.
|
||||
|
||||
server-tests.php is backward compatible with tests developed for
|
||||
the original run-tests.php script. server-tests is *not* used by
|
||||
'make test'. server-tests was developed to provide support for
|
||||
testing PHP under it's primary environment, HTTP, and can run the
|
||||
PHP tests under any of the SAPI modules that are direct executables,
|
||||
or are accessible via HTTP.
|
||||
|
||||
[New features]
|
||||
----------------
|
||||
* Command line interface:
|
||||
You can run 'php server-tests.php -h' to get all the possible options.
|
||||
* Configuration file:
|
||||
the -c argument will allow you to use a configuration file. This is
|
||||
handy if you are testing multiple environments and need various options
|
||||
depending on the environment.
|
||||
see server-tests-config.php for details.
|
||||
* CGI Emulation:
|
||||
Will emulate a CGI environment when testing with the cgi sapi executable.
|
||||
* HTTP testing:
|
||||
can be configured to run test scripts through an HTTP server running
|
||||
on localhost. localhost is required since either the web server must
|
||||
alias a directory to the php source directory, or the test scripts
|
||||
must be copied to a directory under the web server
|
||||
(see config options TEST_WEB_BASE_URL, TEST_BASE_PATH, and TEST_WEB_EXT)
|
||||
* New sections supported for test files (see below)
|
||||
|
||||
When running tests over http, tests that require ini settings different that what
|
||||
the web server runs under will be skipped. Since the test harness defines a number
|
||||
of ini settings by default, the web server may require special configuration to
|
||||
make testing work.
|
||||
|
||||
[Example Usage]
|
||||
----------------
|
||||
Some (but not all!) examples of usage:
|
||||
|
||||
1. run tests from the php source directory
|
||||
php server-tests.php -p /path/to/php-cli
|
||||
|
||||
2. run tests using cgi emulation
|
||||
php server-tests.php -p /path/to/php-cgi
|
||||
|
||||
3. run tests over http, copying test files into document root
|
||||
php server-tests.php -w -u http://localhost/test -m /path/to/htdocs/test
|
||||
|
||||
4. run tests over http, php sources have been aliased in web server
|
||||
php server-tests.php -w -u http://localhost/test
|
||||
|
||||
5. run tests using configuration file
|
||||
php server-tests.php -c /path/to/server-tests-config.php
|
||||
|
||||
6. run tests using configuration file, but overriding some settings:
|
||||
(config file must be first)
|
||||
php server-tests.php -c /path/to/server-tests-config.php -w -t 3 -d /path/to/testdir
|
||||
|
||||
NOTE: configuration as described in README.TESTING still works.
|
||||
|
||||
[New Test Sections]
|
||||
----------------
|
||||
In addition to the traditional test sections
|
||||
(see http://qa.php.net/write-test.php), several new sections are available
|
||||
under server-tests.
|
||||
|
||||
--POST--
|
||||
This is not a new section, but not multipart posts are supported for testing
|
||||
file uploads, or other types of POST data.
|
||||
|
||||
--CGI--
|
||||
This section takes no value. It merely provides a simple marker for tests
|
||||
that MUST be run as CGI, even if there is no --POST-- or --GET-- sections
|
||||
in the test file.
|
||||
|
||||
--DESCRIPTION--
|
||||
Not used for anything, just a section for documenting the test
|
||||
|
||||
--ENV--
|
||||
This section get's eval()'d to help build an environment for the
|
||||
execution of the test. This can be used to change environment
|
||||
vars that are used for CGI emulation, or simply to set env vars
|
||||
for cli testing. A full example looks like:
|
||||
|
||||
--ENV--
|
||||
return <<<END
|
||||
PATH_TRANSLATED=$filename
|
||||
PATH_INFO=$scriptname
|
||||
SCRIPT_NAME=$scriptname
|
||||
END;
|
||||
|
||||
Some variables are made easily available for use in this section, they
|
||||
include:
|
||||
$filename full native path to file, will become PATH_TRANSLATED
|
||||
$filepath =dirname($filename)
|
||||
$scriptname this is what will become SCRIPT_NAME unless you override it
|
||||
$docroot the equivalent of DOCUMENT_ROOT under Apache
|
||||
$cwd the directory that the test is being initiated from
|
||||
$this->conf all server-tests configuration vars
|
||||
$this->env all environment variables that will get passed to the test
|
||||
|
||||
|
||||
--REQUEST--
|
||||
This section is also eval'd, and is similar in nature to --ENV--. However,
|
||||
this section is used to build the url used in an HTTP request. Valid values
|
||||
to set in this section would include:
|
||||
SCRIPT_NAME The initial part of the request url
|
||||
PATH_INFO The pathinfo part of a request url
|
||||
FRAGMENT The fragment section of a url (after #)
|
||||
QUERY_STRING The query part of a url (after ?)
|
||||
|
||||
--REQUEST--
|
||||
return <<<END
|
||||
PATH_INFO=/path/info
|
||||
END;
|
||||
|
||||
--HEADERS--
|
||||
This section is also eval'd. It is used to provide additional headers sent
|
||||
in an HTTP request, such as content type for multipart posts, cookies, etc.
|
||||
|
||||
--HEADERS--
|
||||
return <<<END
|
||||
Content-Type=multipart/form-data; boundary=---------------------------240723202011929
|
||||
Content-Length=100
|
||||
END;
|
||||
|
||||
--EXPECTHEADERS--
|
||||
This section can be used to define what headers are required to be
|
||||
received back from a request, and is checked in addition to the
|
||||
regular expect sections. For example:
|
||||
|
||||
--EXPECTHEADERS--
|
||||
Status: 404
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
This is an addendum to README.TESTING with additional information
|
||||
specific to server-tests.php.
|
||||
|
||||
server-tests.php is backward compatible with tests developed for
|
||||
the original run-tests.php script. server-tests is *not* used by
|
||||
'make test'. server-tests was developed to provide support for
|
||||
testing PHP under it's primary environment, HTTP, and can run the
|
||||
PHP tests under any of the SAPI modules that are direct executables,
|
||||
or are accessible via HTTP.
|
||||
|
||||
[New features]
|
||||
----------------
|
||||
* Command line interface:
|
||||
You can run 'php server-tests.php -h' to get all the possible options.
|
||||
* Configuration file:
|
||||
the -c argument will allow you to use a configuration file. This is
|
||||
handy if you are testing multiple environments and need various options
|
||||
depending on the environment.
|
||||
see server-tests-config.php for details.
|
||||
* CGI Emulation:
|
||||
Will emulate a CGI environment when testing with the cgi sapi executable.
|
||||
* HTTP testing:
|
||||
can be configured to run test scripts through an HTTP server running
|
||||
on localhost. localhost is required since either the web server must
|
||||
alias a directory to the php source directory, or the test scripts
|
||||
must be copied to a directory under the web server
|
||||
(see config options TEST_WEB_BASE_URL, TEST_BASE_PATH, and TEST_WEB_EXT)
|
||||
* New sections supported for test files (see below)
|
||||
|
||||
When running tests over http, tests that require ini settings different that what
|
||||
the web server runs under will be skipped. Since the test harness defines a number
|
||||
of ini settings by default, the web server may require special configuration to
|
||||
make testing work.
|
||||
|
||||
[Example Usage]
|
||||
----------------
|
||||
Some (but not all!) examples of usage:
|
||||
|
||||
1. run tests from the php source directory
|
||||
php server-tests.php -p /path/to/php-cli
|
||||
|
||||
2. run tests using cgi emulation
|
||||
php server-tests.php -p /path/to/php-cgi
|
||||
|
||||
3. run tests over http, copying test files into document root
|
||||
php server-tests.php -w -u http://localhost/test -m /path/to/htdocs/test
|
||||
|
||||
4. run tests over http, php sources have been aliased in web server
|
||||
php server-tests.php -w -u http://localhost/test
|
||||
|
||||
5. run tests using configuration file
|
||||
php server-tests.php -c /path/to/server-tests-config.php
|
||||
|
||||
6. run tests using configuration file, but overriding some settings:
|
||||
(config file must be first)
|
||||
php server-tests.php -c /path/to/server-tests-config.php -w -t 3 -d /path/to/testdir
|
||||
|
||||
NOTE: configuration as described in README.TESTING still works.
|
||||
|
||||
[New Test Sections]
|
||||
----------------
|
||||
In addition to the traditional test sections
|
||||
(see http://qa.php.net/write-test.php), several new sections are available
|
||||
under server-tests.
|
||||
|
||||
--POST--
|
||||
This is not a new section, but not multipart posts are supported for testing
|
||||
file uploads, or other types of POST data.
|
||||
|
||||
--CGI--
|
||||
This section takes no value. It merely provides a simple marker for tests
|
||||
that MUST be run as CGI, even if there is no --POST-- or --GET-- sections
|
||||
in the test file.
|
||||
|
||||
--DESCRIPTION--
|
||||
Not used for anything, just a section for documenting the test
|
||||
|
||||
--ENV--
|
||||
This section get's eval()'d to help build an environment for the
|
||||
execution of the test. This can be used to change environment
|
||||
vars that are used for CGI emulation, or simply to set env vars
|
||||
for cli testing. A full example looks like:
|
||||
|
||||
--ENV--
|
||||
return <<<END
|
||||
PATH_TRANSLATED=$filename
|
||||
PATH_INFO=$scriptname
|
||||
SCRIPT_NAME=$scriptname
|
||||
END;
|
||||
|
||||
Some variables are made easily available for use in this section, they
|
||||
include:
|
||||
$filename full native path to file, will become PATH_TRANSLATED
|
||||
$filepath =dirname($filename)
|
||||
$scriptname this is what will become SCRIPT_NAME unless you override it
|
||||
$docroot the equivalent of DOCUMENT_ROOT under Apache
|
||||
$cwd the directory that the test is being initiated from
|
||||
$this->conf all server-tests configuration vars
|
||||
$this->env all environment variables that will get passed to the test
|
||||
|
||||
|
||||
--REQUEST--
|
||||
This section is also eval'd, and is similar in nature to --ENV--. However,
|
||||
this section is used to build the url used in an HTTP request. Valid values
|
||||
to set in this section would include:
|
||||
SCRIPT_NAME The initial part of the request url
|
||||
PATH_INFO The pathinfo part of a request url
|
||||
FRAGMENT The fragment section of a url (after #)
|
||||
QUERY_STRING The query part of a url (after ?)
|
||||
|
||||
--REQUEST--
|
||||
return <<<END
|
||||
PATH_INFO=/path/info
|
||||
END;
|
||||
|
||||
--HEADERS--
|
||||
This section is also eval'd. It is used to provide additional headers sent
|
||||
in an HTTP request, such as content type for multipart posts, cookies, etc.
|
||||
|
||||
--HEADERS--
|
||||
return <<<END
|
||||
Content-Type=multipart/form-data; boundary=---------------------------240723202011929
|
||||
Content-Length=100
|
||||
END;
|
||||
|
||||
--EXPECTHEADERS--
|
||||
This section can be used to define what headers are required to be
|
||||
received back from a request, and is checked in addition to the
|
||||
regular expect sections. For example:
|
||||
|
||||
--EXPECTHEADERS--
|
||||
Status: 404
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
The Win32 Build System.
|
||||
|
||||
See https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
|
||||
See http://wiki.php.net/internals/windows/stepbystepbuild
|
||||
|
||||
vim:tw=78:sw=1:ts=1:et
|
||||
|
||||
@@ -86,6 +86,7 @@ PHP_MINFO_FUNCTION(my_input_filter)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row( 2, "My Input Filter Support", "enabled" );
|
||||
php_info_print_table_row( 2, "Revision", "$Id$");
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
- Improve the lock in ts_resource_ex() in order to cover less code.
|
||||
This can probably be done by more careful hash table access
|
||||
+97
-83
@@ -94,12 +94,7 @@ static FILE *tsrm_error_file;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(GNUPTH)
|
||||
static pth_key_t tls_key;
|
||||
# define tsrm_tls_set(what) pth_key_setdata(tls_key, (void*)(what))
|
||||
# define tsrm_tls_get() pth_key_getdata(tls_key)
|
||||
|
||||
#elif defined(PTHREADS)
|
||||
#if defined(PTHREADS)
|
||||
/* Thread local storage */
|
||||
static pthread_key_t tls_key;
|
||||
# define tsrm_tls_set(what) pthread_setspecific(tls_key, (void*)(what))
|
||||
@@ -115,6 +110,11 @@ static DWORD tls_key;
|
||||
# define tsrm_tls_set(what) TlsSetValue(tls_key, (void*)(what))
|
||||
# define tsrm_tls_get() TlsGetValue(tls_key)
|
||||
|
||||
#elif defined(BETHREADS)
|
||||
static int32 tls_key;
|
||||
# define tsrm_tls_set(what) tls_set(tls_key, (void*)(what))
|
||||
# define tsrm_tls_get() (tsrm_tls_entry*)tls_get(tls_key)
|
||||
|
||||
#else
|
||||
# define tsrm_tls_set(what)
|
||||
# define tsrm_tls_get() NULL
|
||||
@@ -125,10 +125,9 @@ TSRM_TLS uint8_t in_main_thread = 0;
|
||||
|
||||
/* Startup TSRM (call once for the entire process) */
|
||||
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename)
|
||||
{/*{{{*/
|
||||
{
|
||||
#if defined(GNUPTH)
|
||||
pth_init();
|
||||
pth_key_create(&tls_key, 0);
|
||||
#elif defined(PTHREADS)
|
||||
pthread_key_create( &tls_key, 0 );
|
||||
#elif defined(TSRM_ST)
|
||||
@@ -136,6 +135,8 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
|
||||
st_key_create(&tls_key, 0);
|
||||
#elif defined(TSRM_WIN32)
|
||||
tls_key = TlsAlloc();
|
||||
#elif defined(BETHREADS)
|
||||
tls_key = tls_allocate();
|
||||
#endif
|
||||
|
||||
/* ensure singleton */
|
||||
@@ -165,12 +166,12 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
|
||||
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Started up TSRM, %d expected threads, %d expected resources", expected_threads, expected_resources));
|
||||
return 1;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/* Shutdown TSRM (call once for the entire process) */
|
||||
TSRM_API void tsrm_shutdown(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!in_main_thread) {
|
||||
@@ -226,12 +227,12 @@ TSRM_API void tsrm_shutdown(void)
|
||||
tsrm_new_thread_begin_handler = NULL;
|
||||
tsrm_new_thread_end_handler = NULL;
|
||||
tsrm_shutdown_handler = NULL;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/* allocates a new thread-safe-resource id */
|
||||
TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
|
||||
{/*{{{*/
|
||||
{
|
||||
int i;
|
||||
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Obtaining a new resource id, %d bytes", size));
|
||||
@@ -244,15 +245,13 @@ TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate
|
||||
|
||||
/* store the new resource type in the resource sizes table */
|
||||
if (resource_types_table_size < id_count) {
|
||||
tsrm_resource_type *_tmp;
|
||||
_tmp = (tsrm_resource_type *) realloc(resource_types_table, sizeof(tsrm_resource_type)*id_count);
|
||||
if (!_tmp) {
|
||||
resource_types_table = (tsrm_resource_type *) realloc(resource_types_table, sizeof(tsrm_resource_type)*id_count);
|
||||
if (!resource_types_table) {
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Unable to allocate storage for resource"));
|
||||
*rsrc_id = 0;
|
||||
return 0;
|
||||
}
|
||||
resource_types_table = _tmp;
|
||||
resource_types_table_size = id_count;
|
||||
}
|
||||
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].size = size;
|
||||
@@ -284,11 +283,11 @@ TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate
|
||||
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully allocated new resource id %d", *rsrc_id));
|
||||
return *rsrc_id;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_T thread_id)
|
||||
{/*{{{*/
|
||||
{
|
||||
int i;
|
||||
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Creating data structures for thread %x", thread_id));
|
||||
@@ -324,12 +323,12 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/* fetches the requested resource for the current thread */
|
||||
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
{/*{{{*/
|
||||
{
|
||||
THREAD_T thread_id;
|
||||
int hash_value;
|
||||
tsrm_tls_entry *thread_resources;
|
||||
@@ -387,12 +386,12 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
* changes to the structure as we read it.
|
||||
*/
|
||||
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
/* frees an interpreter context. You are responsible for making sure that
|
||||
* it is not linked into the TSRM hash, and not marked as the current interpreter */
|
||||
void tsrm_free_interpreter_context(void *context)
|
||||
{/*{{{*/
|
||||
{
|
||||
tsrm_tls_entry *next, *thread_resources = (tsrm_tls_entry*)context;
|
||||
int i;
|
||||
|
||||
@@ -411,10 +410,10 @@ void tsrm_free_interpreter_context(void *context)
|
||||
free(thread_resources);
|
||||
thread_resources = next;
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
void *tsrm_set_interpreter_context(void *new_ctx)
|
||||
{/*{{{*/
|
||||
{
|
||||
tsrm_tls_entry *current;
|
||||
|
||||
current = tsrm_tls_get();
|
||||
@@ -427,12 +426,12 @@ void *tsrm_set_interpreter_context(void *new_ctx)
|
||||
|
||||
/* return old context, so caller can restore it when they're done */
|
||||
return current;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/* allocates a new interpreter context */
|
||||
void *tsrm_new_interpreter_context(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
tsrm_tls_entry *new_ctx, *current;
|
||||
THREAD_T thread_id;
|
||||
|
||||
@@ -446,12 +445,12 @@ void *tsrm_new_interpreter_context(void)
|
||||
/* switch back to the context that was in use prior to our creation
|
||||
* of the new one */
|
||||
return tsrm_set_interpreter_context(current);
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/* frees all resources allocated for the current thread */
|
||||
void ts_free_thread(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
tsrm_tls_entry *thread_resources;
|
||||
int i;
|
||||
THREAD_T thread_id = tsrm_thread_id();
|
||||
@@ -488,12 +487,12 @@ void ts_free_thread(void)
|
||||
thread_resources = thread_resources->next;
|
||||
}
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/* frees all resources allocated for all threads except current */
|
||||
void ts_free_worker_threads(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
tsrm_tls_entry *thread_resources;
|
||||
int i;
|
||||
THREAD_T thread_id = tsrm_thread_id();
|
||||
@@ -534,12 +533,12 @@ void ts_free_worker_threads(void)
|
||||
}
|
||||
}
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/* deallocates all occurrences of a given id */
|
||||
void ts_free_id(ts_rsrc_id id)
|
||||
{/*{{{*/
|
||||
{
|
||||
int i;
|
||||
int j = TSRM_UNSHUFFLE_RSRC_ID(id);
|
||||
|
||||
@@ -568,7 +567,7 @@ void ts_free_id(ts_rsrc_id id)
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully freed resource id %d", id));
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -579,22 +578,28 @@ void ts_free_id(ts_rsrc_id id)
|
||||
|
||||
/* Obtain the current thread id */
|
||||
TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
#ifdef TSRM_WIN32
|
||||
return GetCurrentThreadId();
|
||||
#elif defined(GNUPTH)
|
||||
return pth_self();
|
||||
#elif defined(PTHREADS)
|
||||
return pthread_self();
|
||||
#elif defined(NSAPI)
|
||||
return systhread_current();
|
||||
#elif defined(PI3WEB)
|
||||
return PIThread_getCurrent();
|
||||
#elif defined(TSRM_ST)
|
||||
return st_thread_self();
|
||||
#elif defined(BETHREADS)
|
||||
return find_thread(NULL);
|
||||
#endif
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/* Allocate a mutex */
|
||||
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
MUTEX_T mutexp;
|
||||
#ifdef TSRM_WIN32
|
||||
mutexp = malloc(sizeof(CRITICAL_SECTION));
|
||||
@@ -605,19 +610,27 @@ TSRM_API MUTEX_T tsrm_mutex_alloc(void)
|
||||
#elif defined(PTHREADS)
|
||||
mutexp = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
|
||||
pthread_mutex_init(mutexp,NULL);
|
||||
#elif defined(NSAPI)
|
||||
mutexp = crit_init();
|
||||
#elif defined(PI3WEB)
|
||||
mutexp = PIPlatform_allocLocalMutex();
|
||||
#elif defined(TSRM_ST)
|
||||
mutexp = st_mutex_new();
|
||||
#elif defined(BETHREADS)
|
||||
mutexp = (beos_ben*)malloc(sizeof(beos_ben));
|
||||
mutexp->ben = 0;
|
||||
mutexp->sem = create_sem(1, "PHP sempahore");
|
||||
#endif
|
||||
#ifdef THR_DEBUG
|
||||
printf("Mutex created thread: %d\n",mythreadid());
|
||||
#endif
|
||||
return( mutexp );
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/* Free a mutex */
|
||||
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
{/*{{{*/
|
||||
{
|
||||
if (mutexp) {
|
||||
#ifdef TSRM_WIN32
|
||||
DeleteCriticalSection(mutexp);
|
||||
@@ -627,14 +640,21 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
#elif defined(PTHREADS)
|
||||
pthread_mutex_destroy(mutexp);
|
||||
free(mutexp);
|
||||
#elif defined(NSAPI)
|
||||
crit_terminate(mutexp);
|
||||
#elif defined(PI3WEB)
|
||||
PISync_delete(mutexp);
|
||||
#elif defined(TSRM_ST)
|
||||
st_mutex_destroy(mutexp);
|
||||
#elif defined(BETHREADS)
|
||||
delete_sem(mutexp->sem);
|
||||
free(mutexp);
|
||||
#endif
|
||||
}
|
||||
#ifdef THR_DEBUG
|
||||
printf("Mutex freed thread: %d\n",mythreadid());
|
||||
#endif
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -642,7 +662,7 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
A return value of 0 indicates success
|
||||
*/
|
||||
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
|
||||
{/*{{{*/
|
||||
{
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex locked thread: %ld", tsrm_thread_id()));
|
||||
#ifdef TSRM_WIN32
|
||||
EnterCriticalSection(mutexp);
|
||||
@@ -654,10 +674,19 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
|
||||
return -1;
|
||||
#elif defined(PTHREADS)
|
||||
return pthread_mutex_lock(mutexp);
|
||||
#elif defined(NSAPI)
|
||||
crit_enter(mutexp);
|
||||
return 0;
|
||||
#elif defined(PI3WEB)
|
||||
return PISync_lock(mutexp);
|
||||
#elif defined(TSRM_ST)
|
||||
return st_mutex_lock(mutexp);
|
||||
#elif defined(BETHREADS)
|
||||
if (atomic_add(&mutexp->ben, 1) != 0)
|
||||
return acquire_sem(mutexp->sem);
|
||||
return 0;
|
||||
#endif
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -665,7 +694,7 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
|
||||
A return value of 0 indicates success
|
||||
*/
|
||||
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
|
||||
{/*{{{*/
|
||||
{
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex unlocked thread: %ld", tsrm_thread_id()));
|
||||
#ifdef TSRM_WIN32
|
||||
LeaveCriticalSection(mutexp);
|
||||
@@ -677,17 +706,26 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
|
||||
return -1;
|
||||
#elif defined(PTHREADS)
|
||||
return pthread_mutex_unlock(mutexp);
|
||||
#elif defined(NSAPI)
|
||||
crit_exit(mutexp);
|
||||
return 0;
|
||||
#elif defined(PI3WEB)
|
||||
return PISync_unlock(mutexp);
|
||||
#elif defined(TSRM_ST)
|
||||
return st_mutex_unlock(mutexp);
|
||||
#elif defined(BETHREADS)
|
||||
if (atomic_add(&mutexp->ben, -1) != 1)
|
||||
return release_sem(mutexp->sem);
|
||||
return 0;
|
||||
#endif
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
/*
|
||||
Changes the signal mask of the calling thread
|
||||
*/
|
||||
#ifdef HAVE_SIGPROCMASK
|
||||
TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset)
|
||||
{/*{{{*/
|
||||
{
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Changed sigmask in thread: %ld", tsrm_thread_id()));
|
||||
/* TODO: add support for other APIs */
|
||||
#ifdef PTHREADS
|
||||
@@ -695,35 +733,35 @@ TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset)
|
||||
#else
|
||||
return sigprocmask(how, set, oldset);
|
||||
#endif
|
||||
}/*}}}*/
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler)
|
||||
{/*{{{*/
|
||||
{
|
||||
void *retval = (void *) tsrm_new_thread_begin_handler;
|
||||
|
||||
tsrm_new_thread_begin_handler = new_thread_begin_handler;
|
||||
return retval;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler)
|
||||
{/*{{{*/
|
||||
{
|
||||
void *retval = (void *) tsrm_new_thread_end_handler;
|
||||
|
||||
tsrm_new_thread_end_handler = new_thread_end_handler;
|
||||
return retval;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
TSRM_API void *tsrm_set_shutdown_handler(tsrm_shutdown_func_t shutdown_handler)
|
||||
{/*{{{*/
|
||||
{
|
||||
void *retval = (void *) tsrm_shutdown_handler;
|
||||
|
||||
tsrm_shutdown_handler = shutdown_handler;
|
||||
return retval;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -732,7 +770,7 @@ TSRM_API void *tsrm_set_shutdown_handler(tsrm_shutdown_func_t shutdown_handler)
|
||||
|
||||
#if TSRM_DEBUG
|
||||
int tsrm_error(int level, const char *format, ...)
|
||||
{/*{{{*/
|
||||
{
|
||||
if (level<=tsrm_error_level) {
|
||||
va_list args;
|
||||
int size;
|
||||
@@ -747,12 +785,12 @@ int tsrm_error(int level, const char *format, ...)
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void tsrm_error_set(int level, char *debug_filename)
|
||||
{/*{{{*/
|
||||
{
|
||||
tsrm_error_level = level;
|
||||
|
||||
#if TSRM_DEBUG
|
||||
@@ -769,40 +807,16 @@ void tsrm_error_set(int level, char *debug_filename)
|
||||
tsrm_error_file = stderr;
|
||||
}
|
||||
#endif
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API void *tsrm_get_ls_cache(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
return tsrm_tls_get();
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API uint8_t tsrm_is_main_thread(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
return in_main_thread;
|
||||
}/*}}}*/
|
||||
|
||||
TSRM_API const char *tsrm_api_name(void)
|
||||
{/*{{{*/
|
||||
#if defined(GNUPTH)
|
||||
return "GNU Pth";
|
||||
#elif defined(PTHREADS)
|
||||
return "POSIX Threads";
|
||||
#elif defined(TSRM_ST)
|
||||
return "State Threads";
|
||||
#elif defined(TSRM_WIN32)
|
||||
return "Windows Threads";
|
||||
#else
|
||||
return "Unknown";
|
||||
#endif
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
#endif /* ZTS */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
+16
-19
@@ -69,9 +69,22 @@ typedef int ts_rsrc_id;
|
||||
#elif defined(PTHREADS)
|
||||
# define THREAD_T pthread_t
|
||||
# define MUTEX_T pthread_mutex_t *
|
||||
#elif defined(NSAPI)
|
||||
# define THREAD_T SYS_THREAD
|
||||
# define MUTEX_T CRITICAL
|
||||
#elif defined(PI3WEB)
|
||||
# define THREAD_T PIThread *
|
||||
# define MUTEX_T PISync *
|
||||
#elif defined(TSRM_ST)
|
||||
# define THREAD_T st_thread_t
|
||||
# define MUTEX_T st_mutex_t
|
||||
#elif defined(BETHREADS)
|
||||
# define THREAD_T thread_id
|
||||
typedef struct {
|
||||
sem_id sem;
|
||||
int32 ben;
|
||||
} beos_ben;
|
||||
# define MUTEX_T beos_ben *
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
@@ -143,16 +156,11 @@ TSRM_API void tsrm_free_interpreter_context(void *context);
|
||||
|
||||
TSRM_API void *tsrm_get_ls_cache(void);
|
||||
TSRM_API uint8_t tsrm_is_main_thread(void);
|
||||
TSRM_API const char *tsrm_api_name(void);
|
||||
|
||||
#if defined(__cplusplus) && __cplusplus > 199711L
|
||||
# define TSRM_TLS thread_local
|
||||
#ifdef TSRM_WIN32
|
||||
# define TSRM_TLS __declspec(thread)
|
||||
#else
|
||||
# ifdef TSRM_WIN32
|
||||
# define TSRM_TLS __declspec(thread)
|
||||
# else
|
||||
# define TSRM_TLS __thread
|
||||
# endif
|
||||
# define TSRM_TLS __thread
|
||||
#endif
|
||||
|
||||
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
|
||||
@@ -169,10 +177,8 @@ TSRM_API const char *tsrm_api_name(void);
|
||||
#define TSRMLS_CACHE_DEFINE() TSRM_TLS void *TSRMLS_CACHE = NULL;
|
||||
#if ZEND_DEBUG
|
||||
#define TSRMLS_CACHE_UPDATE() TSRMLS_CACHE = tsrm_get_ls_cache()
|
||||
#define TSRMLS_CACHE_RESET()
|
||||
#else
|
||||
#define TSRMLS_CACHE_UPDATE() if (!TSRMLS_CACHE) TSRMLS_CACHE = tsrm_get_ls_cache()
|
||||
#define TSRMLS_CACHE_RESET() TSRMLS_CACHE = NULL
|
||||
#endif
|
||||
#define TSRMLS_CACHE _tsrm_ls_cache
|
||||
|
||||
@@ -210,12 +216,3 @@ TSRM_API const char *tsrm_api_name(void);
|
||||
#endif /* ZTS */
|
||||
|
||||
#endif /* TSRM_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
+45
-40
@@ -103,47 +103,52 @@ dnl -threads gcc (HP-UX)
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_CHECK],[
|
||||
|
||||
save_CFLAGS=$CFLAGS
|
||||
save_LIBS=$LIBS
|
||||
PTHREADS_ASSIGN_VARS
|
||||
PTHREADS_CHECK_COMPILE
|
||||
LIBS=$save_LIBS
|
||||
CFLAGS=$save_CFLAGS
|
||||
|
||||
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
|
||||
ac_cv_pthreads_cflags=
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
|
||||
ac_save=$CFLAGS
|
||||
CFLAGS="$CFLAGS $flag"
|
||||
PTHREADS_CHECK_COMPILE
|
||||
CFLAGS=$ac_save
|
||||
if test "$pthreads_checked" = "yes"; then
|
||||
ac_cv_pthreads_cflags=$flag
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK(for pthreads_lib, ac_cv_pthreads_lib,[
|
||||
ac_cv_pthreads_lib=
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
for lib in pthread pthreads c_r; do
|
||||
ac_save=$LIBS
|
||||
LIBS="$LIBS -l$lib"
|
||||
PTHREADS_CHECK_COMPILE
|
||||
LIBS=$ac_save
|
||||
if test "$pthreads_checked" = "yes"; then
|
||||
ac_cv_pthreads_lib=$lib
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
if test "x$ac_cv_pthreads_cflags" != "x" -o "x$ac_cv_pthreads_lib" != "x"; then
|
||||
if test "$beos_threads" = "1"; then
|
||||
pthreads_working="yes"
|
||||
ac_cv_pthreads_cflags=""
|
||||
else
|
||||
save_CFLAGS=$CFLAGS
|
||||
save_LIBS=$LIBS
|
||||
PTHREADS_ASSIGN_VARS
|
||||
PTHREADS_CHECK_COMPILE
|
||||
LIBS=$save_LIBS
|
||||
CFLAGS=$save_CFLAGS
|
||||
|
||||
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
|
||||
ac_cv_pthreads_cflags=
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
|
||||
ac_save=$CFLAGS
|
||||
CFLAGS="$CFLAGS $flag"
|
||||
PTHREADS_CHECK_COMPILE
|
||||
CFLAGS=$ac_save
|
||||
if test "$pthreads_checked" = "yes"; then
|
||||
ac_cv_pthreads_cflags=$flag
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK(for pthreads_lib, ac_cv_pthreads_lib,[
|
||||
ac_cv_pthreads_lib=
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
for lib in pthread pthreads c_r; do
|
||||
ac_save=$LIBS
|
||||
LIBS="$LIBS -l$lib"
|
||||
PTHREADS_CHECK_COMPILE
|
||||
LIBS=$ac_save
|
||||
if test "$pthreads_checked" = "yes"; then
|
||||
ac_cv_pthreads_lib=$lib
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
if test "x$ac_cv_pthreads_cflags" != "x" -o "x$ac_cv_pthreads_lib" != "x"; then
|
||||
pthreads_working="yes"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$pthreads_working" = "yes"; then
|
||||
|
||||
+12
-8
@@ -77,15 +77,19 @@ sinclude(threads.m4)
|
||||
AC_DEFUN([TSRM_CHECK_PTHREADS],[
|
||||
|
||||
PTHREADS_CHECK
|
||||
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
|
||||
|
||||
if test "$beos_threads" = "1"; then
|
||||
AC_DEFINE(BETHREADS, 1, Whether to use native BeOS threads)
|
||||
else
|
||||
if test "$pthreads_working" != "yes"; then
|
||||
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
|
||||
fi
|
||||
|
||||
AC_DEFINE(PTHREADS, 1, Whether to use Pthreads)
|
||||
|
||||
AC_MSG_CHECKING(for POSIX threads)
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
||||
AC_DEFINE(PTHREADS, 1, Whether to use Pthreads)
|
||||
|
||||
AC_MSG_CHECKING(for POSIX threads)
|
||||
AC_MSG_RESULT(yes)
|
||||
])
|
||||
|
||||
AC_DEFUN([TSRM_THREADS_CHECKS],[
|
||||
|
||||
@@ -6,18 +6,10 @@
|
||||
|
||||
#define HAVE_UTIME 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_REALPATH 1
|
||||
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <crtdbg.h>
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
@@ -69,12 +69,3 @@ char *alloca ();
|
||||
#endif
|
||||
|
||||
#endif /* TSRM_CONFIG_COMMON_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
+4
-13
@@ -4,7 +4,7 @@
|
||||
#include "tsrm_strtok_r.h"
|
||||
|
||||
static inline int in_character_class(char ch, const char *delim)
|
||||
{/*{{{*/
|
||||
{
|
||||
while (*delim) {
|
||||
if (*delim == ch) {
|
||||
return 1;
|
||||
@@ -12,10 +12,10 @@ static inline int in_character_class(char ch, const char *delim)
|
||||
delim++;
|
||||
}
|
||||
return 0;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API char *tsrm_strtok_r(char *s, const char *delim, char **last)
|
||||
{/*{{{*/
|
||||
{
|
||||
char *token;
|
||||
|
||||
if (s == NULL) {
|
||||
@@ -41,7 +41,7 @@ TSRM_API char *tsrm_strtok_r(char *s, const char *delim, char **last)
|
||||
*last = s + 1;
|
||||
}
|
||||
return token;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -61,12 +61,3 @@ main()
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
+199
-178
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2018 The PHP Group |
|
||||
| Copyright (c) 1997-2017 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -42,7 +42,7 @@ static tsrm_win32_globals win32_globals;
|
||||
#endif
|
||||
|
||||
static void tsrm_win32_ctor(tsrm_win32_globals *globals)
|
||||
{/*{{{*/
|
||||
{
|
||||
#ifdef ZTS
|
||||
TSRMLS_CACHE_UPDATE();
|
||||
#endif
|
||||
@@ -61,10 +61,10 @@ TSRMLS_CACHE_UPDATE();
|
||||
*/
|
||||
globals->impersonation_token = INVALID_HANDLE_VALUE;
|
||||
globals->impersonation_token_sid = NULL;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
static void tsrm_win32_dtor(tsrm_win32_globals *globals)
|
||||
{/*{{{*/
|
||||
{
|
||||
shm_pair *ptr;
|
||||
|
||||
if (globals->process) {
|
||||
@@ -89,26 +89,26 @@ static void tsrm_win32_dtor(tsrm_win32_globals *globals)
|
||||
if (globals->impersonation_token_sid) {
|
||||
free(globals->impersonation_token_sid);
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API void tsrm_win32_startup(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
#ifdef ZTS
|
||||
ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor);
|
||||
#else
|
||||
tsrm_win32_ctor(&win32_globals);
|
||||
#endif
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API void tsrm_win32_shutdown(void)
|
||||
{/*{{{*/
|
||||
{
|
||||
#ifndef ZTS
|
||||
tsrm_win32_dtor(&win32_globals);
|
||||
#endif
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
char * tsrm_win32_get_path_sid_key(const char *pathname, size_t pathname_len, size_t *key_len)
|
||||
{/*{{{*/
|
||||
{
|
||||
PSID pSid = TWG(impersonation_token_sid);
|
||||
char *ptcSid = NULL;
|
||||
char *bucket_key = NULL;
|
||||
@@ -139,11 +139,11 @@ char * tsrm_win32_get_path_sid_key(const char *pathname, size_t pathname_len, si
|
||||
|
||||
LocalFree(ptcSid);
|
||||
return bucket_key;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
PSID tsrm_win32_get_token_sid(HANDLE hToken)
|
||||
{/*{{{*/
|
||||
{
|
||||
DWORD dwLength = 0;
|
||||
PTOKEN_USER pTokenUser = NULL;
|
||||
DWORD sid_len;
|
||||
@@ -190,10 +190,10 @@ Finished:
|
||||
HeapFree(GetProcessHeap(), 0, (LPVOID)pTokenUser);
|
||||
}
|
||||
return NULL;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
{/*{{{*/
|
||||
{
|
||||
time_t t;
|
||||
HANDLE thread_token = NULL;
|
||||
PSID token_sid;
|
||||
@@ -207,175 +207,198 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
BOOL fAccess = FALSE;
|
||||
|
||||
realpath_cache_bucket * bucket = NULL;
|
||||
char real_path[MAXPATHLEN] = {0};
|
||||
|
||||
if(!IS_ABSOLUTE_PATH(pathname, strlen(pathname)+1)) {
|
||||
if(tsrm_realpath(pathname, real_path) == NULL) {
|
||||
SET_ERRNO_FROM_WIN32_CODE(ERROR_FILE_NOT_FOUND);
|
||||
return -1;
|
||||
}
|
||||
pathname = real_path;
|
||||
}
|
||||
char * real_path = NULL;
|
||||
|
||||
PHP_WIN32_IOUTIL_INIT_W(pathname)
|
||||
if (!pathw) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Either access call failed, or the mode was asking for a specific check.*/
|
||||
int ret = php_win32_ioutil_access_w(pathw, mode);
|
||||
if (0 > ret || X_OK == mode || F_OK == mode) {
|
||||
if (mode == 1 /*X_OK*/) {
|
||||
DWORD type;
|
||||
int ret;
|
||||
|
||||
ret = GetBinaryTypeW(pathw, &type) ? 0 : -1;
|
||||
|
||||
PHP_WIN32_IOUTIL_CLEANUP_W()
|
||||
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
if(!IS_ABSOLUTE_PATH(pathname, strlen(pathname)+1)) {
|
||||
real_path = (char *)malloc(MAXPATHLEN);
|
||||
if(tsrm_realpath(pathname, real_path) == NULL) {
|
||||
goto Finished;
|
||||
}
|
||||
pathname = real_path;
|
||||
PHP_WIN32_IOUTIL_REINIT_W(pathname);
|
||||
}
|
||||
|
||||
if(php_win32_ioutil_access(pathname, mode)) {
|
||||
PHP_WIN32_IOUTIL_CLEANUP_W()
|
||||
free(real_path);
|
||||
return errno;
|
||||
}
|
||||
|
||||
/* If only existence check is made, return now */
|
||||
if (mode == 0) {
|
||||
PHP_WIN32_IOUTIL_CLEANUP_W()
|
||||
free(real_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Only in NTS when impersonate==1 (aka FastCGI) */
|
||||
|
||||
/*
|
||||
AccessCheck() requires an impersonation token. We first get a primary
|
||||
token and then create a duplicate impersonation token. The
|
||||
impersonation token is not actually assigned to the thread, but is
|
||||
used in the call to AccessCheck. Thus, this function itself never
|
||||
impersonates, but does use the identity of the thread. If the thread
|
||||
was impersonating already, this function uses that impersonation context.
|
||||
*/
|
||||
if(!OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, &thread_token)) {
|
||||
if (GetLastError() == ERROR_NO_TOKEN) {
|
||||
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &thread_token)) {
|
||||
TWG(impersonation_token) = NULL;
|
||||
goto Finished;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* token_sid will be freed in tsrmwin32_dtor */
|
||||
token_sid = tsrm_win32_get_token_sid(thread_token);
|
||||
if (!token_sid) {
|
||||
if (TWG(impersonation_token_sid)) {
|
||||
free(TWG(impersonation_token_sid));
|
||||
}
|
||||
TWG(impersonation_token_sid) = NULL;
|
||||
goto Finished;
|
||||
}
|
||||
|
||||
/* Different identity, we need a new impersontated token as well */
|
||||
if (!TWG(impersonation_token_sid) || !EqualSid(token_sid, TWG(impersonation_token_sid))) {
|
||||
if (TWG(impersonation_token_sid)) {
|
||||
free(TWG(impersonation_token_sid));
|
||||
}
|
||||
TWG(impersonation_token_sid) = token_sid;
|
||||
|
||||
/* Duplicate the token as impersonated token */
|
||||
if (!DuplicateToken(thread_token, SecurityImpersonation, &TWG(impersonation_token))) {
|
||||
goto Finished;
|
||||
}
|
||||
} else {
|
||||
/* we already have it, free it then */
|
||||
free(token_sid);
|
||||
}
|
||||
|
||||
if (CWDG(realpath_cache_size_limit)) {
|
||||
t = time(0);
|
||||
bucket = realpath_cache_lookup(pathname, strlen(pathname), t);
|
||||
if(bucket == NULL && !real_path[0]) {
|
||||
/* We used the pathname directly. Call tsrm_realpath */
|
||||
/* so that entry is created in realpath cache */
|
||||
if(tsrm_realpath(pathname, real_path) != NULL) {
|
||||
pathname = real_path;
|
||||
bucket = realpath_cache_lookup(pathname, strlen(pathname), t);
|
||||
PHP_WIN32_IOUTIL_REINIT_W(pathname);
|
||||
/*
|
||||
AccessCheck() requires an impersonation token. We first get a primary
|
||||
token and then create a duplicate impersonation token. The
|
||||
impersonation token is not actually assigned to the thread, but is
|
||||
used in the call to AccessCheck. Thus, this function itself never
|
||||
impersonates, but does use the identity of the thread. If the thread
|
||||
was impersonating already, this function uses that impersonation context.
|
||||
*/
|
||||
if(!OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, &thread_token)) {
|
||||
if (GetLastError() == ERROR_NO_TOKEN) {
|
||||
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &thread_token)) {
|
||||
TWG(impersonation_token) = NULL;
|
||||
goto Finished;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Do a full access check because access() will only check read-only attribute */
|
||||
if(mode == 0 || mode > 6) {
|
||||
if(bucket != NULL && bucket->is_rvalid) {
|
||||
fAccess = bucket->is_readable;
|
||||
/* token_sid will be freed in tsrmwin32_dtor */
|
||||
token_sid = tsrm_win32_get_token_sid(thread_token);
|
||||
if (!token_sid) {
|
||||
if (TWG(impersonation_token_sid)) {
|
||||
free(TWG(impersonation_token_sid));
|
||||
}
|
||||
TWG(impersonation_token_sid) = NULL;
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_READ;
|
||||
} else if(mode <= 2) {
|
||||
if(bucket != NULL && bucket->is_wvalid) {
|
||||
fAccess = bucket->is_writable;
|
||||
|
||||
/* Different identity, we need a new impersontated token as well */
|
||||
if (!TWG(impersonation_token_sid) || !EqualSid(token_sid, TWG(impersonation_token_sid))) {
|
||||
if (TWG(impersonation_token_sid)) {
|
||||
free(TWG(impersonation_token_sid));
|
||||
}
|
||||
TWG(impersonation_token_sid) = token_sid;
|
||||
|
||||
/* Duplicate the token as impersonated token */
|
||||
if (!DuplicateToken(thread_token, SecurityImpersonation, &TWG(impersonation_token))) {
|
||||
goto Finished;
|
||||
}
|
||||
} else {
|
||||
/* we already have it, free it then */
|
||||
free(token_sid);
|
||||
}
|
||||
|
||||
if (CWDG(realpath_cache_size_limit)) {
|
||||
t = time(0);
|
||||
bucket = realpath_cache_lookup(pathname, strlen(pathname), t);
|
||||
if(bucket == NULL && real_path == NULL) {
|
||||
/* We used the pathname directly. Call tsrm_realpath */
|
||||
/* so that entry is created in realpath cache */
|
||||
real_path = (char *)malloc(MAXPATHLEN);
|
||||
if(tsrm_realpath(pathname, real_path) != NULL) {
|
||||
pathname = real_path;
|
||||
bucket = realpath_cache_lookup(pathname, strlen(pathname), t);
|
||||
PHP_WIN32_IOUTIL_REINIT_W(pathname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Do a full access check because access() will only check read-only attribute */
|
||||
if(mode == 0 || mode > 6) {
|
||||
if(bucket != NULL && bucket->is_rvalid) {
|
||||
fAccess = bucket->is_readable;
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_READ;
|
||||
} else if(mode <= 2) {
|
||||
if(bucket != NULL && bucket->is_wvalid) {
|
||||
fAccess = bucket->is_writable;
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_WRITE;
|
||||
} else if(mode <= 4) {
|
||||
if(bucket != NULL && bucket->is_rvalid) {
|
||||
fAccess = bucket->is_readable;
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_READ|FILE_FLAG_BACKUP_SEMANTICS;
|
||||
} else { // if(mode <= 6)
|
||||
if(bucket != NULL && bucket->is_rvalid && bucket->is_wvalid) {
|
||||
fAccess = bucket->is_readable & bucket->is_writable;
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_READ | FILE_GENERIC_WRITE;
|
||||
}
|
||||
|
||||
if(TWG(impersonation_token) == NULL) {
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_WRITE;
|
||||
} else if(mode <= 4) {
|
||||
if(bucket != NULL && bucket->is_rvalid) {
|
||||
fAccess = bucket->is_readable;
|
||||
|
||||
/* Get size of security buffer. Call is expected to fail */
|
||||
if(GetFileSecurityW(pathw, sec_info, NULL, 0, &sec_desc_length)) {
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_READ|FILE_FLAG_BACKUP_SEMANTICS;
|
||||
} else { // if(mode <= 6)
|
||||
if(bucket != NULL && bucket->is_rvalid && bucket->is_wvalid) {
|
||||
fAccess = bucket->is_readable & bucket->is_writable;
|
||||
|
||||
psec_desc = (BYTE *)malloc(sec_desc_length);
|
||||
if(psec_desc == NULL ||
|
||||
!GetFileSecurityW(pathw, sec_info, (PSECURITY_DESCRIPTOR)psec_desc, sec_desc_length, &sec_desc_length)) {
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_READ | FILE_GENERIC_WRITE;
|
||||
}
|
||||
|
||||
if(TWG(impersonation_token) == NULL) {
|
||||
goto Finished;
|
||||
}
|
||||
MapGenericMask(&desired_access, &gen_map);
|
||||
|
||||
/* Get size of security buffer. Call is expected to fail */
|
||||
if(GetFileSecurityW(pathw, sec_info, NULL, 0, &sec_desc_length)) {
|
||||
goto Finished;
|
||||
}
|
||||
|
||||
psec_desc = (BYTE *)malloc(sec_desc_length);
|
||||
if(psec_desc == NULL ||
|
||||
!GetFileSecurityW(pathw, sec_info, (PSECURITY_DESCRIPTOR)psec_desc, sec_desc_length, &sec_desc_length)) {
|
||||
goto Finished;
|
||||
}
|
||||
|
||||
MapGenericMask(&desired_access, &gen_map);
|
||||
|
||||
if(!AccessCheck((PSECURITY_DESCRIPTOR)psec_desc, TWG(impersonation_token), desired_access, &gen_map, &privilege_set, &priv_set_length, &granted_access, &fAccess)) {
|
||||
goto Finished_Impersonate;
|
||||
}
|
||||
|
||||
/* Keep the result in realpath_cache */
|
||||
if(bucket != NULL) {
|
||||
if(desired_access == (FILE_GENERIC_READ|FILE_FLAG_BACKUP_SEMANTICS)) {
|
||||
bucket->is_rvalid = 1;
|
||||
bucket->is_readable = fAccess;
|
||||
if(!AccessCheck((PSECURITY_DESCRIPTOR)psec_desc, TWG(impersonation_token), desired_access, &gen_map, &privilege_set, &priv_set_length, &granted_access, &fAccess)) {
|
||||
goto Finished_Impersonate;
|
||||
}
|
||||
else if(desired_access == FILE_GENERIC_WRITE) {
|
||||
bucket->is_wvalid = 1;
|
||||
bucket->is_writable = fAccess;
|
||||
} else if (desired_access == (FILE_GENERIC_READ | FILE_GENERIC_WRITE)) {
|
||||
bucket->is_rvalid = 1;
|
||||
bucket->is_readable = fAccess;
|
||||
bucket->is_wvalid = 1;
|
||||
bucket->is_writable = fAccess;
|
||||
|
||||
/* Keep the result in realpath_cache */
|
||||
if(bucket != NULL) {
|
||||
if(desired_access == (FILE_GENERIC_READ|FILE_FLAG_BACKUP_SEMANTICS)) {
|
||||
bucket->is_rvalid = 1;
|
||||
bucket->is_readable = fAccess;
|
||||
}
|
||||
else if(desired_access == FILE_GENERIC_WRITE) {
|
||||
bucket->is_wvalid = 1;
|
||||
bucket->is_writable = fAccess;
|
||||
} else if (desired_access == (FILE_GENERIC_READ | FILE_GENERIC_WRITE)) {
|
||||
bucket->is_rvalid = 1;
|
||||
bucket->is_readable = fAccess;
|
||||
bucket->is_wvalid = 1;
|
||||
bucket->is_writable = fAccess;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Finished_Impersonate:
|
||||
if(psec_desc != NULL) {
|
||||
free(psec_desc);
|
||||
psec_desc = NULL;
|
||||
}
|
||||
if(psec_desc != NULL) {
|
||||
free(psec_desc);
|
||||
psec_desc = NULL;
|
||||
}
|
||||
|
||||
Finished:
|
||||
if(thread_token != NULL) {
|
||||
CloseHandle(thread_token);
|
||||
}
|
||||
if(thread_token != NULL) {
|
||||
CloseHandle(thread_token);
|
||||
}
|
||||
if(real_path != NULL) {
|
||||
free(real_path);
|
||||
real_path = NULL;
|
||||
}
|
||||
|
||||
PHP_WIN32_IOUTIL_CLEANUP_W()
|
||||
if(fAccess == FALSE) {
|
||||
errno = EACCES;
|
||||
return errno;
|
||||
} else {
|
||||
return 0;
|
||||
PHP_WIN32_IOUTIL_CLEANUP_W()
|
||||
if(fAccess == FALSE) {
|
||||
errno = EACCES;
|
||||
return errno;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
|
||||
static process_pair *process_get(FILE *stream)
|
||||
{/*{{{*/
|
||||
{
|
||||
process_pair *ptr;
|
||||
process_pair *newptr;
|
||||
|
||||
@@ -398,10 +421,10 @@ static process_pair *process_get(FILE *stream)
|
||||
ptr = newptr + TWG(process_size);
|
||||
TWG(process_size)++;
|
||||
return ptr;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
static shm_pair *shm_get(key_t key, void *addr)
|
||||
{/*{{{*/
|
||||
{
|
||||
shm_pair *ptr;
|
||||
shm_pair *newptr;
|
||||
|
||||
@@ -430,25 +453,24 @@ static shm_pair *shm_get(key_t key, void *addr)
|
||||
TWG(shm_size)++;
|
||||
memset(ptr, 0, sizeof(*ptr));
|
||||
return ptr;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
static HANDLE dupHandle(HANDLE fh, BOOL inherit)
|
||||
{/*{{{*/
|
||||
static HANDLE dupHandle(HANDLE fh, BOOL inherit) {
|
||||
HANDLE copy, self = GetCurrentProcess();
|
||||
if (!DuplicateHandle(self, fh, self, ©, 0, inherit, DUPLICATE_SAME_ACCESS|DUPLICATE_CLOSE_SOURCE)) {
|
||||
return NULL;
|
||||
}
|
||||
return copy;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API FILE *popen(const char *command, const char *type)
|
||||
{/*{{{*/
|
||||
{
|
||||
|
||||
return popen_ex(command, type, NULL, NULL);
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env)
|
||||
{/*{{{*/
|
||||
{
|
||||
FILE *stream = NULL;
|
||||
int fno, type_len, read, mode;
|
||||
STARTUPINFOW startup;
|
||||
@@ -592,10 +614,10 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
proc->prochnd = process.hProcess;
|
||||
proc->stream = stream;
|
||||
return stream;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API int pclose(FILE *stream)
|
||||
{/*{{{*/
|
||||
{
|
||||
DWORD termstat = 0;
|
||||
process_pair *process;
|
||||
|
||||
@@ -612,10 +634,10 @@ TSRM_API int pclose(FILE *stream)
|
||||
CloseHandle(process->prochnd);
|
||||
|
||||
return termstat;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API int shmget(key_t key, size_t size, int flags)
|
||||
{/*{{{*/
|
||||
{
|
||||
shm_pair *shm;
|
||||
char shm_segment[26], shm_info[29];
|
||||
HANDLE shm_handle, info_handle;
|
||||
@@ -695,10 +717,10 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
|
||||
}
|
||||
|
||||
return key;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
||||
{/*{{{*/
|
||||
{
|
||||
shm_pair *shm = shm_get(key, NULL);
|
||||
|
||||
if (!shm->segment) {
|
||||
@@ -718,10 +740,10 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
||||
shm->descriptor->shm_nattch++;
|
||||
|
||||
return shm->addr;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API int shmdt(const void *shmaddr)
|
||||
{/*{{{*/
|
||||
{
|
||||
shm_pair *shm = shm_get(0, (void*)shmaddr);
|
||||
|
||||
if (!shm->segment) {
|
||||
@@ -733,10 +755,9 @@ TSRM_API int shmdt(const void *shmaddr)
|
||||
shm->descriptor->shm_nattch--;
|
||||
|
||||
return UnmapViewOfFile(shm->addr) ? 0 : -1;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf)
|
||||
{/*{{{*/
|
||||
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
|
||||
shm_pair *shm = shm_get(key, NULL);
|
||||
|
||||
if (!shm->segment) {
|
||||
@@ -764,7 +785,16 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf)
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
TSRM_API char *realpath(char *orig_path, char *buffer)
|
||||
{
|
||||
int ret = GetFullPathName(orig_path, _MAX_PATH, buffer, NULL);
|
||||
if(!ret || ret > _MAX_PATH) {
|
||||
return NULL;
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
#if HAVE_UTIME
|
||||
static zend_always_inline void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* {{{ */
|
||||
@@ -822,12 +852,3 @@ TSRM_API int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */
|
||||
/* }}} */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
+3
-10
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2018 The PHP Group |
|
||||
| Copyright (c) 1997-2017 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -110,13 +110,6 @@ TSRM_API int shmget(key_t key, size_t size, int flags);
|
||||
TSRM_API void *shmat(int key, const void *shmaddr, int flags);
|
||||
TSRM_API int shmdt(const void *shmaddr);
|
||||
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
TSRM_API char *realpath(char *orig_path, char *buffer);
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
PHP 7.3 UPGRADE NOTES
|
||||
PHP 7.2 UPGRADE NOTES
|
||||
|
||||
1. Backward Incompatible Changes
|
||||
2. New Features
|
||||
@@ -19,113 +19,120 @@ PHP 7.3 UPGRADE NOTES
|
||||
1. Backward Incompatible Changes
|
||||
========================================
|
||||
|
||||
Core:
|
||||
. The ext_skel utility has been completely redesigned with new options and
|
||||
some old options removed. This is now written in PHP and has no external
|
||||
dependencies.
|
||||
. Support for BeOS has been dropped.
|
||||
. Exceptions thrown due to automatic conversion of warnings into exceptions
|
||||
in EH_THROW mode (e.g. some DateTime exceptions) no longer populate
|
||||
error_get_last() state. As such, they now work the same way as manually
|
||||
thrown exceptions.
|
||||
. TypeError now reports wrong types as `int` and `bool` instead of `integer`
|
||||
and `boolean`.
|
||||
. Due to the introduction of flexible heredoc/nowdoc syntax (see New Features
|
||||
section), doc strings that contain the ending label inside their body may
|
||||
cause syntax errors or change in interpretation. For example in
|
||||
- Core:
|
||||
. gettype() will now return "resource (closed)" instead of "unknown type" for
|
||||
closed resources.
|
||||
. is_object() will now return true for objects of class
|
||||
__PHP_Incomplete_Class.
|
||||
. Support for Netware operating systems have been removed.
|
||||
. Casting arrays to objects (with (object) or settype()) will now covert
|
||||
integer keys to string property names. This fixes the behaviour of previous
|
||||
versions, where integer keys would become inaccessible properties with
|
||||
integer names.
|
||||
. Casting objects to arrays (with (array) or settype()), and retrieving
|
||||
object properties in an array with get_object_vars(), will now convert
|
||||
numeric string property names (that is, property names of the format
|
||||
/^(0|(-?[1-9][0-9]*))$/ where PHP_INT_MIN <= n <= PHP_INT_MAX) to integer
|
||||
keys. This fixes the behaviour of previous versions, where numeric string
|
||||
property names would become inaccessible string keys.
|
||||
. Unqualified references to undefined constants now generate a Warning instead
|
||||
of a notice. They will generate an Error in a future version of PHP.
|
||||
(https://wiki.php.net/rfc/deprecate-bareword-strings)
|
||||
. Minimum supported Windows versions are Windows 7/Server 2008 R2.
|
||||
. Initial trait property value compatibility check will no longer perform
|
||||
any casts. (Bug #74269)
|
||||
|
||||
$str = <<<FOO
|
||||
abcdefg
|
||||
FOO
|
||||
FOO;
|
||||
- BCMath:
|
||||
. The bcmod() function no longer truncates fractional numbers to integers. As
|
||||
such, its behavior now follows fmod() rather than the `%` operator. For
|
||||
example `bcmod('4', '3.5')` now returns '0.5' instead of '1'.
|
||||
|
||||
the indented occurrence of "FOO" did not previously have any special
|
||||
meaning. Now it will be interpreted as the end of the heredoc string and
|
||||
the following "FOO;" will cause a syntax error. This issue can always be
|
||||
resolved by choosing an ending label that does not occur within the contents
|
||||
of the string.
|
||||
- Hash:
|
||||
. The hash_hmac(), hash_hmac_file() and hash_pbkdf2() functions no longer
|
||||
accept non-cryptographic hashes.
|
||||
|
||||
BCMath:
|
||||
. All warnings thrown by BCMath functions are now using PHP's error handling.
|
||||
Formerly some warnings have directly been written to stderr.
|
||||
. bcmul() and bcpow() now return numbers with the requested scale. Formerly,
|
||||
the returned numbers may have omitted trailing decimal zeroes.
|
||||
- JSON
|
||||
. The json_decode() option JSON_OBJECT_AS_ARRAY is used if the second
|
||||
parameter (assoc) is null. Previously JSON_OBJECT_AS_ARRAY was always
|
||||
ignored.
|
||||
|
||||
Reflection:
|
||||
. Reflection export to string now uses `int` and `bool` instead of `integer`
|
||||
and `boolean`.
|
||||
- Session:
|
||||
. Removed register_globals related code and "!" can be used as $_SESSION key name.
|
||||
. Session is made to manage session status correctly and prevents invalid operations.
|
||||
Only inappropriate codes are affected by this change. If you have problems with this,
|
||||
it means you have problem in your code.
|
||||
. Functions are made to set or return correct session status.
|
||||
session_start(), session_status(), session_regenerate_id()
|
||||
. Functions are made to return bool from null. These functions have void parameter
|
||||
and void parameter is checked.
|
||||
session_unset(), session_write_close()/session_commit(), session_abort(),
|
||||
session_reset()
|
||||
. Functions prohibit invalid operations with regard to session status and
|
||||
HTTP header status, returns correct bool return value.
|
||||
session_start(), session_set_cookie_params(), session_name(), session_module_name(),
|
||||
session_set_save_handler(), session_regenerate_id(), session_cache_limiter(),
|
||||
session_cache_expire(), session_unset(), session_destroy(),
|
||||
session_write_close()/session_commit(), session_reset()
|
||||
. INI value change by ini_set() returns update status correctly. Invalid INI modifications
|
||||
are checked and made to fail.
|
||||
session.name, session.save_path, session.cookie_lifetime, session.cookie_path,
|
||||
session.cookie_domain, session.cookie_httponly, session.cookie_secure,
|
||||
session.use_cookies, session.use_only_cookies, session.use_strict_mode,
|
||||
session.referer_check, session.cache_limiter, session.cache_expire,
|
||||
session.lazy_write, session.save_handler, session.serialize_handler,
|
||||
session.gc_probability, session.gc_divior, session.gc_maxlifetime,
|
||||
. Some E_ERRORs are changed to E_WARNING since session status is managed correctly.
|
||||
session_start()
|
||||
. Session no longer initialize $_SESSION for invalid and useless session.
|
||||
session_start()
|
||||
|
||||
SPL:
|
||||
. If an SPL autoloader throws an exception, following autoloaders will not be
|
||||
executed. Previously all autoloaders were executed and exceptions were
|
||||
chained.
|
||||
|
||||
SimpleXML:
|
||||
. Mathematic operations involving SimpleXML objects will now treat the text as
|
||||
an integer or float, whichever is more appropriate. Previously values were
|
||||
treated as integers unconditionally.
|
||||
|
||||
Standard:
|
||||
. getimagesize() and related functions now report the mime type of BMP images
|
||||
as image/bmp instead of image/x-ms-bmp, since the former has been registered
|
||||
with the IANA (see RFC 7903).
|
||||
|
||||
========================================
|
||||
2. New Features
|
||||
========================================
|
||||
|
||||
Core:
|
||||
. Implemented flexible heredoc and nowdoc syntax: The closing marker for doc
|
||||
strings is no longer required to be followed by a semicolon or newline.
|
||||
Additionally the closing marker may be indented, in which case the
|
||||
indentation will be stripped from all lines in the doc string.
|
||||
(RFC: https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes)
|
||||
. Array destructuring now supports reference assignments using the syntax
|
||||
[&$a, [$b, &$c]] = $d. The same is also supported for list().
|
||||
(RFC: https://wiki.php.net/rfc/list_reference_assignment)
|
||||
. instanceof now allows literals as the first operand,
|
||||
in which case the result is always FALSE.
|
||||
- Core:
|
||||
. It is now possible to remove argument type annotations when overriding an
|
||||
inherited method. This complies with contravariance of method argument types
|
||||
under the Liskov Substitution Principle.
|
||||
(https://wiki.php.net/rfc/parameter-no-type-variance)
|
||||
. It is now allowed to override an abstract method with another abstract
|
||||
method in a child class.
|
||||
(https://wiki.php.net/rfc/allow-abstract-function-override)
|
||||
. A trailing comma in group use statements is now allowed.
|
||||
(https://wiki.php.net/rfc/list-syntax-trailing-commas)
|
||||
|
||||
BCMath:
|
||||
. bcscale() can now also be used as getter to retrieve the current scale in use.
|
||||
- DBA:
|
||||
. Implemented support for the LMDB backend.
|
||||
|
||||
MBString:
|
||||
. Support for full case-mapping and case-folding has been added. Unlike simple
|
||||
case-mapping, full case-mapping may change the length of the string. For
|
||||
example:
|
||||
- OCI8:
|
||||
. Added Oracle Database Transparent Application Failover (TAF) callback support.
|
||||
|
||||
mb_strtoupper("Straße")
|
||||
// Produces STRAßE on PHP 7.2
|
||||
// Produces STRASSE on PHP 7.3
|
||||
- PCRE:
|
||||
. Added `J` modifier for setting PCRE_DUPNAMES.
|
||||
. Added `PREG_UNMATCHED_AS_NULL` flag to allow distinguish between unmatched
|
||||
subpatterns and empty matches by reporting NULL and "" (empty string),
|
||||
respectively.
|
||||
|
||||
The different casing mapping and folding modes are available through
|
||||
mb_convert_case():
|
||||
- SQLite3:
|
||||
. Implemented writing to BLOBs.
|
||||
|
||||
. MB_CASE_LOWER (used by mb_strtolower)
|
||||
. MB_CASE_UPPER (used by mb_strtoupper)
|
||||
. MB_CASE_TITLE
|
||||
. MB_CASE_FOLD
|
||||
. MB_CASE_LOWER_SIMPLE
|
||||
. MB_CASE_UPPER_SIMPLE
|
||||
. MB_CASE_TITLE_SIMPLE
|
||||
. MB_CASE_FOLD_SIMPLE (used by case-insensitive operations)
|
||||
- Standard:
|
||||
. Simplified password hashing API updated to support Argon2i hashes when PHP is compiled with libargon2
|
||||
(https://wiki.php.net/rfc/argon2_password_hash).
|
||||
. proc_nice() is now supported on Windows platforms.
|
||||
|
||||
Only unconditional, language agnostic full case-mapping is performed.
|
||||
. Case-insensitive string operations now use case-folding instead of case-
|
||||
mapping during comparisons. This means that more characters will be
|
||||
considered (case insensitively) equal now.
|
||||
. mb_convert_case() with MB_CASE_TITLE now performs title-case conversion
|
||||
based on the Cased and CaseIgnorable derived Unicode properties. In
|
||||
particular this also improves handling of quotes and apostophes.
|
||||
. Data tables have been updated for Unicode 10.
|
||||
. Mbstring now correctly supports strings larger than 2GB.
|
||||
. Performance of the mbstring extension has been significantly improved
|
||||
across the board. The largest improvements are in case conversion functions.
|
||||
|
||||
readline:
|
||||
. Support for the completion_append_character and completion_suppress_append
|
||||
options has been added to readline_info(). These options are only available
|
||||
if PHP is linked against libreadline (rather than libedit).
|
||||
- Zip:
|
||||
. read/write encrypted archive, relying on libzip 1.2.0,
|
||||
using new methods:
|
||||
ZipArchive::setEncryptionName($name, $method [, $password]);
|
||||
ZipArchive::setEncryptionIndex($index, $method [, $password]);
|
||||
and new constants:
|
||||
ZipArchive::EM_NONE
|
||||
ZipArchive::EM_AES_128
|
||||
ZipArchive::EM_AES_192
|
||||
ZipArchive::EM_AES_256
|
||||
. accept 'password' from zip stream context
|
||||
|
||||
========================================
|
||||
3. Changes in SAPI modules
|
||||
@@ -135,177 +142,186 @@ readline:
|
||||
4. Deprecated Functionality
|
||||
========================================
|
||||
|
||||
Intl:
|
||||
. Usage of the Normalizer::NONE form throws a deprecation warning, if PHP is linked with ICU >= 56.
|
||||
All the deprecated functionality listed in the following will be removed in
|
||||
PHP 8.0.
|
||||
|
||||
- Core:
|
||||
. The trace_errors ini directive has been deprecated.
|
||||
. The __autoload() mechanism has been deprecated, use spl_autoload_register()
|
||||
instead.
|
||||
. The (unset) cast has been deprecated. This does not affect the unset($var)
|
||||
language construct.
|
||||
. The create_function() function has been deprecated, use anonymous functions
|
||||
instead.
|
||||
. The each() function has been deprecated, use a foreach loop instead.
|
||||
|
||||
- GD:
|
||||
. png2wbmp() and jpeg2wbmp() have been deprecated.
|
||||
|
||||
- GMP:
|
||||
. The gmp_random() function has been deprecated, use gmp_random_bits() or
|
||||
gmp_random_range() instead.
|
||||
|
||||
- Intl:
|
||||
. INTL_IDNA_VARIANT_2003 has been deprecated; use INTL_IDNA_VARIANT_UTS46
|
||||
instead.
|
||||
|
||||
- Mbstring:
|
||||
. The mbstring.func_overload ini directive has been deprecated.
|
||||
|
||||
- Standard:
|
||||
. Calling parse_str() without the result argument has been deprecated.
|
||||
. Calling assert() with a string argument has been deprecated, use an ordinary
|
||||
expression instead.
|
||||
|
||||
See also: https://wiki.php.net/rfc/deprecations_php_7_2
|
||||
|
||||
========================================
|
||||
5. Changed Functions
|
||||
========================================
|
||||
|
||||
JSON:
|
||||
. A new flag has been added, JSON_THROW_ON_ERROR, which can be used with
|
||||
json_decode() or json_encode() and causes these functions to throw a
|
||||
JsonException upon an error, instead of setting the global error state that
|
||||
is retrieved with json_last_error(). JSON_PARTIAL_OUTPUT_ON_ERROR takes
|
||||
precedence over JSON_THROW_ON_ERROR.
|
||||
(RFC: https://wiki.php.net/rfc/json_throw_on_error)
|
||||
- Standard:
|
||||
. password_hash() can generate Argon2i hashes when the algorithm is set to PASSWORD_ARGON2I.
|
||||
When using PASSWORD_ARGON2I, the following cost factors may be set: 'memory_cost', 'time_cost',
|
||||
and 'threads'. These cost factors will default to 'PASSWORD_ARGON2_DEFAULT_MEMORY_COST',
|
||||
'PASSWORD_ARGON2_DEFAULT_TIME_COST', and 'PASSWORD_ARGON2_DEFAULT_THREADS' respectively if not set.
|
||||
. password_verify() can verify Argon2i hashes.
|
||||
. password_get_info() and password_needs_rehash() can accept Argon2i hashes.
|
||||
. mail()/mb_send_mail() accept array $extra_header. Array parameter is checked against RFC 2822.
|
||||
Array format is
|
||||
$extra_headers = [
|
||||
'Header-Name' => 'Header value',
|
||||
'Multiple' => ['One header', 'Another header'],
|
||||
'Multiline' = "FirstLine\r\n SecondLine",
|
||||
];
|
||||
. count() now raises a warning when an invalid parameter is passed.
|
||||
Only arrays and objects implementing the Countable interface should be passed.
|
||||
. pack() and unpack() now support float and double in both little and big endian.
|
||||
. number_format() ensures zero values never contain a negative sign.
|
||||
|
||||
Standard:
|
||||
. debug_zval_dump() was changed to display recursive arrays and objects
|
||||
in the same way as var_dump(). Now, it doesn't display them twice.
|
||||
. array_push() and array_unshift() can now also be called with a single
|
||||
argument, which is particularly convenient wrt. the spread operator.
|
||||
|
||||
PCRE:
|
||||
. preg_quote() now also escapes the '#' character.
|
||||
- XML:
|
||||
. utf8_encode() and utf8_decode() have been moved to the Standard extension
|
||||
as string functions.
|
||||
|
||||
========================================
|
||||
6. New Functions
|
||||
========================================
|
||||
|
||||
Core:
|
||||
. Added monotonic timer function hrtime([bool get_as_num]). It returns an
|
||||
array of the form [seconds, nanoseconds] with the timestamp starting at
|
||||
an unspecified point in the past. If the optional argument is passed as
|
||||
true, the return value is an integer on 64-bit systems or float on
|
||||
32-bit systems, representing the nanoseconds. The timestamp is not
|
||||
adjustable and is not related to wall clock or time of day. The timers
|
||||
are available under Linux, FreeBSD, Windows, Mac, SunOS, AIX and their
|
||||
derivatives. If no required timers are provided by a corresponding
|
||||
platform, the function returns false.
|
||||
- Core:
|
||||
. Added stream_isatty().
|
||||
. Added sapi_windows_vt100_support().
|
||||
|
||||
Date:
|
||||
. Added the DateTime::createFromImmutable() method, which mirrors
|
||||
DateTimeImmutable::createFromMutable().
|
||||
- GD:
|
||||
. Added imagesetclip() and imagegetclip().
|
||||
. Added imageopenpolygon().
|
||||
. Added imageresolution().
|
||||
. Added imagecreatefrombmp() and imagebmp().
|
||||
|
||||
GMP:
|
||||
. Added gmp_binomial(n, k) for calculating binomial coefficients.
|
||||
. Added gmp_lcm(a, b) for calculating the least common multiple.
|
||||
. Added gmp_perfect_power(a) to check if number is a perfect power.
|
||||
. Added gmp_kronecker(a, b) to compute the Kronecker symbol.
|
||||
- Mbstring:
|
||||
. Added mb_chr() and mb_ord().
|
||||
. Added mb_scurb() that scrub broken multibyte strings.
|
||||
|
||||
Intl:
|
||||
. Added void Spoofchecker::setRestrictionLevel(int $level) method, available
|
||||
when linked with ICU >= 58.1. Levels are represented as class constants
|
||||
- Spoofchecker::ASCII
|
||||
- Spoofchecker::HIGHLY_RESTRICTIVE
|
||||
- Spoofchecker::MODERATELY_RESTRICTIVE
|
||||
- Spoofchecker::MINIMALLY_RESTRICTIVE
|
||||
- Spoofchecker::UNRESTRICTIVE
|
||||
- Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE
|
||||
For the detailed documentation on the restriction levels, see
|
||||
URestrictionLevel under
|
||||
http://icu-project.org/apiref/icu4c/uspoof_8h.html
|
||||
. Added Normalizer::getRawDecomposition() and normalizer_get_raw_decomposition(),
|
||||
to retrieve the Decomposition_Mapping property of a character.
|
||||
- OCI8:
|
||||
. Added oci_register_taf_callback() and oci_disable_taf_callback() for
|
||||
Oracle Database TAF callback support.
|
||||
|
||||
OpenSSL:
|
||||
. Added openssl_pkey_derive that derives a shared secret for DH, ECDH and
|
||||
possibly other future algorithms supported by EVP_PKEY_derive.
|
||||
|
||||
Sockets:
|
||||
. Added functions to import/export the WSAPROTOCOL_INFO info struct. This
|
||||
implementation complements the already supported SCM_RIGHTS as in
|
||||
man 3 cmsg and is Windows specific. For the import/export, the default
|
||||
system securities apply for the SHM reading/writing. The socket becomes
|
||||
invalid, when the last reference to it is closed.
|
||||
- socket_wsaprotocol_info_export(resource $sock, int $pid) - exports the
|
||||
WSAPROTOCOL_INFO structure into shared memory and returns an identifier
|
||||
to be used for the import, or false on failure. The exported ID is
|
||||
only valid for the dedicated PID.
|
||||
- socket_wsaprotocol_info_import(string $id) - returns a duplicated
|
||||
socket as per the passed identifier, or false on failure.
|
||||
- socket_wsaprotocol_info_release(string $id) - releases the shared memory
|
||||
corresponding to the passed identifier.
|
||||
|
||||
Standard:
|
||||
. Added is_countable() function, to check whether a value may be passed to
|
||||
count().
|
||||
(RFC: https://wiki.php.net/rfc/is-countable)
|
||||
- Sockets:
|
||||
. Added socket_addrinfo_lookup(), socket_addrinfo_connect(),
|
||||
socket_addrinfo_bind() and socket_addrinfo_explain().
|
||||
|
||||
========================================
|
||||
7. New Classes and Interfaces
|
||||
========================================
|
||||
|
||||
JSON:
|
||||
. JsonException
|
||||
|
||||
========================================
|
||||
8. Removed Extensions and SAPIs
|
||||
========================================
|
||||
|
||||
- Mcrypt:
|
||||
. The deprecated mcrypt extension has been moved to PECL.
|
||||
. libmcrypt has not been maintained since 2007 and the continued use of this
|
||||
extension is strongly discouraged.
|
||||
. Users are advised to use alternatives such as OpenSSL or libsodium.
|
||||
|
||||
========================================
|
||||
9. Other Changes to Extensions
|
||||
========================================
|
||||
|
||||
Curl:
|
||||
. libcurl >= 7.15.5 is now required.
|
||||
- EXIF:
|
||||
. Added extended exif tag support for the following formats:
|
||||
Samsung, DJI, Panasonic, Sony, Pentax, Minolta, Sigma/Foveon,
|
||||
AGFA, Kyocera, Ricoh & Epson.
|
||||
|
||||
Filter:
|
||||
. FILTER_VALIDATE_FLOAT now also supports a `thousand` option, which
|
||||
defines the set of allowed thousand separator chars. The default (`"',."`)
|
||||
is fully backward compatible with former PHP versions.
|
||||
- GD:
|
||||
. Removed --enable-gd-native-ttf configuration option which was unused as
|
||||
of PHP 5.5.0 anyway.
|
||||
. imagegd() stores truecolor images as real truecolor images. Formerly, they
|
||||
have been converted to palette.
|
||||
. imageantialias() is now also available if compiled with a system libgd.
|
||||
|
||||
FTP:
|
||||
. Set default transfer mode to binary
|
||||
- Mbstring
|
||||
. mb_check_encoding() accepts array parameter. Both key and value
|
||||
encodings are checked recursively.
|
||||
. mb_convert_encoding() accepts array parameter. Only value encodings
|
||||
are converted recursively.
|
||||
|
||||
Intl:
|
||||
. Normalizer::NONE is deprecated, when PHP is linked with ICU >= 56
|
||||
. Introduced Normalizer::FORM_KC_CF as Normalizer::normalize() argument
|
||||
for NFKC_Casefold normalization, available when linked with ICU >= 56
|
||||
- PDO_OCI:
|
||||
. The '--with-pdo-oci' configure syntax no longer needs the vesion number of the
|
||||
Oracle Instant Client.
|
||||
|
||||
MBString:
|
||||
. The configuration option --with-libmbfl is no longer available.
|
||||
|
||||
ODBC:
|
||||
. Support for ODBCRouter has been removed.
|
||||
. Support for Birdstep has been removed.
|
||||
|
||||
ZIP:
|
||||
. Bundled libzip has been dropped,
|
||||
system library is now required.
|
||||
- pdo_sqlite
|
||||
. Use sqlite3_prepare_v2() and sqlite3_close_v2() functions instead of their
|
||||
legacy counterparts.
|
||||
|
||||
========================================
|
||||
10. New Global Constants
|
||||
========================================
|
||||
|
||||
Curl:
|
||||
. CURLOPT_REQUEST_TARGET
|
||||
- Core:
|
||||
. PHP_FLOAT_DIG number of decimal digits, that can be rounded into a
|
||||
float and back without precision loss
|
||||
. PHP_FLOAT_EPSILON smallest representable positive number x, so then
|
||||
x + 1.0 != 1.0
|
||||
. PHP_FLOAT_MIN min representable float number
|
||||
. PHP_FLOAT_MAX max representable float number
|
||||
. PHP_OS_FAMILY current operating system family
|
||||
|
||||
JSON:
|
||||
. JSON_THROW_ON_ERROR
|
||||
- Fileinfo:
|
||||
. FILEINFO_EXTENSION include list of possible file extensions
|
||||
|
||||
PGSQL:
|
||||
. Requires Postgres 9.3
|
||||
- PGSQL_DIAG_SCHEMA_NAME
|
||||
- PGSQL_DIAG_TABLE_NAME
|
||||
- PGSQL_DIAG_COLUMN_NAME
|
||||
- PGSQL_DIAG_DATATYPE_NAME
|
||||
- PGSQL_DIAG_CONSTRAINT_NAME
|
||||
. Requires Postgres 9.6
|
||||
- PGSQL_DIAG_SEVERITY_NONLOCALIZED
|
||||
- GD:
|
||||
. IMG_EFFECT_MULTIPLY
|
||||
. IMG_BMP
|
||||
|
||||
- PCRE
|
||||
. PREG_UNMATCHED_AS_NULL
|
||||
|
||||
- Standard:
|
||||
. PASSWORD_ARGON2_DEFAULT_MEMORY_COST
|
||||
. PASSWORD_ARGON2_DEFAULT_TIME_COST
|
||||
. PASSWORD_ARGON2_DEFAULT_THREADS
|
||||
. PASSWORD_ARGON2I
|
||||
|
||||
========================================
|
||||
11. Changes to INI File Handling
|
||||
========================================
|
||||
|
||||
- birdstep.max_links
|
||||
. This INI directive has been removed.
|
||||
- sql.safe_mode
|
||||
. This INI directive have been removed.
|
||||
|
||||
- opcache.inherited_hack
|
||||
. This INI directive has been removed. The value has already been ignored
|
||||
since PHP 5.3.0.
|
||||
- realpath_cache_size
|
||||
. Set to 4096k by default
|
||||
|
||||
========================================
|
||||
12. Windows Support
|
||||
========================================
|
||||
|
||||
- Core
|
||||
. File descriptors are opened in shared read/write/delete mode by default.
|
||||
This effectively maps the UNIX semantics and allows to delete files with
|
||||
handles in use. It is not 100% same, some platform differences still
|
||||
persist. After the deletion, the filename entry is blocked, until all
|
||||
the opened handles to it are closed.
|
||||
- Support for VT100 console mode
|
||||
|
||||
On systems starting with 10.0.10586, cmd.exe supports ANSI escape sequences.
|
||||
The corresponding console mode is enabled by default on CLI on suitable
|
||||
systems. As well, the function sapi_windows_vt100_support() is provided,
|
||||
to control and query the corresponding information in the scripts.
|
||||
|
||||
========================================
|
||||
13. Other Changes
|
||||
|
||||
+29
-118
@@ -1,22 +1,9 @@
|
||||
PHP 7.3 INTERNALS UPGRADE NOTES
|
||||
PHP 7.1 INTERNALS UPGRADE NOTES
|
||||
|
||||
1. Internal API changes
|
||||
a. array_init() and array_init_size()
|
||||
b. Run-time constant operand addressing
|
||||
c. Array/Object recursion protection
|
||||
d. HASH_FLAG_PERSISTENT
|
||||
e. AST and IS_CONSTANT
|
||||
f. GC_REFCOUNT()
|
||||
g. zend_get_parameters()
|
||||
h. zend_register_persistent_resource()
|
||||
i. RAND_RANGE()
|
||||
j. cast_object() with _IS_NUMBER
|
||||
k. zend_fcall_info_cache.initialized
|
||||
l. php_hrtime_current()
|
||||
m. zend_cpu_supports()
|
||||
n. IS_TYPE_COPYABLE
|
||||
o. IS_UNUSED
|
||||
p. VM instruction operands (FETCH_CLASS, FETCH_CONSTANT, CATCH)
|
||||
a. Path related functions
|
||||
b. php_win32_get_random_bytes()
|
||||
c. nice() Windows implementation
|
||||
|
||||
2. Build system changes
|
||||
a. Unix build system changes
|
||||
@@ -29,99 +16,19 @@ PHP 7.3 INTERNALS UPGRADE NOTES
|
||||
1. Internal API changes
|
||||
========================
|
||||
|
||||
a. array_init() and array_init_size() are not functions anymore.
|
||||
They don't return any values.
|
||||
a. Path related functions
|
||||
- CWD_API void realpath_cache_del(const char *path, size_t path_len);
|
||||
- CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, size_t path_len, time_t t);
|
||||
- PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *filename, size_t filename_len);
|
||||
- PHPAPI void php_stat(const char *filename, size_t filename_length, int type, zval *return_value);
|
||||
|
||||
b. In 64-bit builds PHP-7.2 and below used relative run-time constant operand
|
||||
addressing. E.g. opline->op1.constant kept an offset from start of literals
|
||||
table - op_array->literals. To speedup access op_array->literals was cached
|
||||
in execute_data->literals. So the resulting address calculated as
|
||||
EX(literals) + opline->op1.constant.
|
||||
b. php_win32_get_random_bytes()
|
||||
The internal randomness source on Windows switched to use CNG API.
|
||||
|
||||
Now at run-time literals allocated close to opcodes, and addressed
|
||||
relatively from current opline. This eliminates load of EX(literals) on
|
||||
each constant access as well as EX(literals) initialization on each call.
|
||||
c. nice() now have a Windows alternative that is implemented in win32/nice.c, using
|
||||
SetPriorityClass(). See the implementation for more in-depth details. This also
|
||||
defines HAVE_NICE.
|
||||
|
||||
As result some related macros were removed (ZEND_EX_USE_LITERALS,
|
||||
EX_LOAD_LITERALS, EX_LITERALS, RT_CONSTANT_EX, EX_CONSTANT) or changed
|
||||
(RT_CONSTANT, ZEND_PASS_TWO_UPDATE_CONSTANT, ZEND_PASS_TWO_UNDO_CONSTANT).
|
||||
This change way affect only some "system" extensions. EX_LITERALS,
|
||||
RT_CONSTANT_EX, EX_CONSTANT should be substituted by RT_CONSTANT than now
|
||||
use "opline" (instead of "op_array") as first argument.
|
||||
|
||||
c. Protection from recursion during processing circular data structures was
|
||||
refactored. HashTable.nApplyCount and IS_OBJ_APPLY_COUNT are replaced by
|
||||
single flag GC_PROTECTED. Corresponding macros Z_OBJ_APPLY_COUNT,
|
||||
Z_OBJ_INC_APPLY_COUNT, Z_OBJ_DEC_APPLY_COUNT, ZEND_HASH_GET_APPLY_COUNT,
|
||||
ZEND_HASH_INC_APPLY_COUNT, ZEND_HASH_DEC_APPLY_COUNT are replaced with
|
||||
GC_IS_RECURSIVE, GC_PROTECT_RECURSION, GC_UNPROTECT_RECURSION,
|
||||
Z_IS_RECURSIVE, Z_PROTECT_RECURSION, Z_UNPROTECT_RECURSION.
|
||||
|
||||
HASH_FLAG_APPLY_PROTECTION flag and ZEND_HASH_APPLY_PROTECTION() macro
|
||||
are removed. All mutable arrays should use recursion protection.
|
||||
Corresponding checks should be replaced by Z_REFCOUNTED() or
|
||||
!(GC_GLAGS(p) & GC_IMMUTABLE).
|
||||
|
||||
d. HASH_FLAG_PERSISTENT renamed into IS_ARRAY_PERSISTENT and moved into
|
||||
GC_FLAGS (to be consistent with IS_STR_PERSISTENT).
|
||||
|
||||
e. zend_ast_ref structure is changed to use only one allocation.
|
||||
zend_ast_copy() now returns zend_ast_ref (instead of zend_asr).
|
||||
zend_ast_destroy_and_free() is removed. ZVAL_NEW_AST() is replaced
|
||||
by ZVAL_AST().
|
||||
|
||||
IS_CONSTANT type and Z_CONST_FLAGS() are removed. Now constants are always
|
||||
represented using IS_CONSTANT_AST (ZEND_AST_CONSTANT kind). AST node
|
||||
attributes are used instead of constant flags. IS_TYPE_CONSTANT flag is
|
||||
removed, but Z_CONSTANT() macro is kept for compatibility.
|
||||
|
||||
f. GC_REFCOUNT() is turned into inline function and can't be modified direcly.
|
||||
All reference-counting operations should be done through corresponding
|
||||
macros GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF().
|
||||
|
||||
GC_REFCOUNT(p)++ should be changed into GC_ADDREF(p),
|
||||
GC_REFCOUNT(p)-- into GC_DELREF(p),
|
||||
GC_REFCOUNT(p) = 1 into GC_SET_REFCOUNT(p, 1).
|
||||
|
||||
g. The zend_get_parameters() and zend_get_parameters_ex() functions were
|
||||
removed. Instead zend_parse_parameters() should be used.
|
||||
|
||||
h. New functions zend_register_persistent_resource() or
|
||||
zend_register_persistent_resource_ex() should beused to register
|
||||
persistent resources, instead of manual insertion into EG(persistent_list).
|
||||
|
||||
i. The RANGE_RANGE() macro has been removed. php_mt_rand_range() should be
|
||||
used instead.
|
||||
|
||||
j. The cast_object() object handler now also accepts the _IS_NUMBER type. The
|
||||
handler should return either an integer or float value in this case,
|
||||
whichever is more appropriate.
|
||||
|
||||
k. zend_fcall_info_cache.initialized is removed. zend_fcall_info_cache is
|
||||
initialized if zend_fcall_info_cache.function_handler is set.
|
||||
|
||||
l. php_hrtime_current() delivers the number of nanoseconds since an uncertain
|
||||
point in the past.
|
||||
|
||||
m. zend_cpu_supports() determines if a feature is supported by current cpu.
|
||||
Also serial inline zend_cpu_supports_xxx() are added, which is designed for
|
||||
ifunc resolver function, as resolver function should not depend on any
|
||||
external function.
|
||||
|
||||
n. IS_TYPE_COPYABLE flag is removed. IS_STRING zvals didn't need to be
|
||||
duplication by zval_copy_ctor(), ZVAL_DUP() and SEPARATE_ZVAL*() macros.
|
||||
Interned strings didn't set IS_TYPE_COPYALE, so they aren't affected at
|
||||
all. Now instead of checking for IS_TYPE_COPYABLE, engine checks for
|
||||
IS_ARRAY type (it may be IS_TYPE_REFCOUNTED or not). All the related
|
||||
macros: Z_COPYABLE..., Z_IMMUTABLE... are kept for compatibility.
|
||||
|
||||
o. IS_UNUSED became zero and can't be used as a bitmask (there were no such
|
||||
usages in PHP sources).
|
||||
|
||||
p. Operands of few VM instructions were changed
|
||||
- FETCH_CLASS op1<fetch-flags>, op2<name>, result<var>
|
||||
- FETCH_CONSTANT op1<fetch-flags>, op2<name>, result<tmp>
|
||||
- CATCH ext<last-flag>, op1<name>, op2<jump_addr>, result<cv>
|
||||
|
||||
========================
|
||||
2. Build system changes
|
||||
@@ -130,19 +37,23 @@ PHP 7.3 INTERNALS UPGRADE NOTES
|
||||
a. Unix build system changes
|
||||
|
||||
b. Windows build system changes
|
||||
- ZEND_WIN32_FORCE_INLINE doesn't affect C++ anymore. zend_always_inline is
|
||||
still usable in C++, but anything else inlining related is up to
|
||||
compiler.
|
||||
- ZEND_WIN32_KEEP_INLINE was removed, it was only needed for C++
|
||||
convenience and is now default behavior with C++.
|
||||
- New configure option --enable-native-intrinsics accepts a list of the
|
||||
intrinsic optimizations to enable. It affects both the code generation
|
||||
and the explicit optimizations guarded by preprocessor macros.
|
||||
- The configure option --with-codegen-arch accepts only ia32 as a value.
|
||||
Use it, to produce builds suitable for older processors without SSE2 or
|
||||
even SSE support.
|
||||
|
||||
. Minimum supported Windows versions are Windows 7/Server 2008 R2.
|
||||
. --enable-one-shot configure option is removed, --with-mp is usable.
|
||||
. The new binary tools SDK is required for Windows builds, the
|
||||
documentation is available under https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
|
||||
. Visual Studio 2017 is utilized for the Windows builds
|
||||
. Clang build with ASAN is supported with clang 5+
|
||||
|
||||
========================
|
||||
3. Module changes
|
||||
========================
|
||||
|
||||
- Session:
|
||||
. php_session_start()/session_reset_id() return value is changed from void to int.
|
||||
It returns SUCCESS/FAILURE.
|
||||
. Session module manages session status correctly.
|
||||
|
||||
- OpenSSL:
|
||||
. Windows builds ship with OpenSSL 1.1 by default, lower versions are still supported with custom deps.
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ libZend_la_SOURCES=\
|
||||
zend_default_classes.c \
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c \
|
||||
zend_strtod.c zend_closures.c zend_float.c zend_string.c zend_signal.c \
|
||||
zend_generators.c zend_virtual_cwd.c zend_ast.c zend_smart_str.c zend_cpuinfo.c
|
||||
zend_generators.c zend_virtual_cwd.c zend_ast.c zend_smart_str.c
|
||||
|
||||
libZend_la_CFLAGS = -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1
|
||||
libZend_la_LDFLAGS =
|
||||
|
||||
@@ -100,3 +100,9 @@ zend_vm_execute.h. Debugging with original file requires --with-lines
|
||||
option. By default ZE2 uses the following command to generate executor:
|
||||
|
||||
$ php zend_vm_gen.php --with-vm-kind=CALL
|
||||
|
||||
Zend Engine II currently includes two executors during the build process, one
|
||||
is the specialized version and the other is the old one non-specialized with
|
||||
function handlers. By default Zend Engine II uses the specialized one but you
|
||||
can switch to the old executor at runtime by calling zend_vm_use_old_executor().
|
||||
|
||||
+7
-7
@@ -345,22 +345,22 @@ function strcat($n) {
|
||||
|
||||
/*****/
|
||||
|
||||
function gethrtime()
|
||||
function getmicrotime()
|
||||
{
|
||||
$hrtime = hrtime();
|
||||
return (($hrtime[0]*1000000000 + $hrtime[1]) / 1000000000);
|
||||
$t = gettimeofday();
|
||||
return ($t['sec'] + $t['usec'] / 1000000);
|
||||
}
|
||||
|
||||
function start_test()
|
||||
{
|
||||
ob_start();
|
||||
return gethrtime();
|
||||
return getmicrotime();
|
||||
}
|
||||
|
||||
function end_test($start, $name)
|
||||
{
|
||||
global $total;
|
||||
$end = gethrtime();
|
||||
$end = getmicrotime();
|
||||
ob_end_clean();
|
||||
$total += $end-$start;
|
||||
$num = number_format($end-$start,3);
|
||||
@@ -368,7 +368,7 @@ function end_test($start, $name)
|
||||
|
||||
echo $name.$pad.$num."\n";
|
||||
ob_start();
|
||||
return gethrtime();
|
||||
return getmicrotime();
|
||||
}
|
||||
|
||||
function total()
|
||||
@@ -418,5 +418,5 @@ sieve(30);
|
||||
$t = end_test($t, "sieve(30)");
|
||||
strcat(200000);
|
||||
$t = end_test($t, "strcat(200000)");
|
||||
total();
|
||||
total($t0, "Total");
|
||||
?>
|
||||
@@ -238,23 +238,23 @@ function empty_loop($n) {
|
||||
}
|
||||
}
|
||||
|
||||
function gethrtime()
|
||||
function getmicrotime()
|
||||
{
|
||||
$hrtime = hrtime();
|
||||
return (($hrtime[0]*1000000000 + $hrtime[1]) / 1000000000);
|
||||
$t = gettimeofday();
|
||||
return ($t['sec'] + $t['usec'] / 1000000);
|
||||
}
|
||||
|
||||
function start_test()
|
||||
{
|
||||
ob_start();
|
||||
return gethrtime();
|
||||
return getmicrotime();
|
||||
}
|
||||
|
||||
function end_test($start, $name, $overhead = null)
|
||||
{
|
||||
global $total;
|
||||
global $last_time;
|
||||
$end = gethrtime();
|
||||
$end = getmicrotime();
|
||||
ob_end_clean();
|
||||
$last_time = $end-$start;
|
||||
$total += $last_time;
|
||||
@@ -267,7 +267,7 @@ function end_test($start, $name, $overhead = null)
|
||||
echo $name.$pad.$num." ".$num2."\n";
|
||||
}
|
||||
ob_start();
|
||||
return gethrtime();
|
||||
return getmicrotime();
|
||||
}
|
||||
|
||||
function total()
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ Warning: define() expects at least 2 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
|
||||
Warning: define() expects parameter 3 to be bool, array given in %s on line %d
|
||||
Warning: define() expects parameter 3 to be boolean, array given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: define() expects parameter 1 to be string, array given in %s on line %d
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ var_dump(get_parent_class(1));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(false)
|
||||
string(3) "foo"
|
||||
|
||||
+4
-4
@@ -37,15 +37,15 @@ NULL
|
||||
Notice: Undefined variable: b in %s on line %d
|
||||
int(1)
|
||||
|
||||
Notice: Trying to get property '1' of non-object in %s on line %d
|
||||
Notice: Trying to get property of non-object in %s on line %d
|
||||
NULL
|
||||
|
||||
Notice: Trying to get property '1' of non-object in %s on line %d
|
||||
Notice: Trying to get property of non-object in %s on line %d
|
||||
NULL
|
||||
|
||||
Notice: Undefined variable: c in %s on line %d
|
||||
|
||||
Notice: Trying to get property '1' of non-object in %s on line %d
|
||||
Notice: Trying to get property of non-object in %s on line %d
|
||||
|
||||
Notice: Trying to get property '' of non-object in %s on line %d
|
||||
Notice: Trying to get property of non-object in %s on line %d
|
||||
NULL
|
||||
+1
-1
@@ -18,7 +18,7 @@ print "ok\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Trying to get property 'a' of non-object in %s on line %d
|
||||
Notice: Trying to get property of non-object in %s on line %d
|
||||
ok
|
||||
|
||||
Warning: Creating default object from empty value in %s on line %d
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ Notice: Undefined variable: arr in %s on line %d
|
||||
|
||||
Notice: Undefined variable: arr in %s on line %d
|
||||
|
||||
Notice: Trying to get property 'foo' of non-object in %s on line %d
|
||||
Notice: Trying to get property of non-object in %s on line %d
|
||||
|
||||
Warning: Creating default object from empty value in %s on line %d
|
||||
|
||||
|
||||
@@ -862,7 +862,7 @@ try {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
This exception severity is: 1bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
@@ -8,6 +8,6 @@ abstract class TestClass
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
|
||||
===DONE===
|
||||
@@ -32,7 +32,7 @@ echo $a->func1(),"\n";
|
||||
echo $a->func2(),"\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
var1 value
|
||||
var2 value
|
||||
in func1
|
||||
|
||||
@@ -15,7 +15,7 @@ call_user_func(array($c, 'none'));
|
||||
call_user_func(array($c, 'prot'));
|
||||
call_user_func(array($c, 'priv'));
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
In __call() for method none()
|
||||
In __call() for method prot()
|
||||
In __call() for method priv()
|
||||
@@ -29,7 +29,7 @@ var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
|
||||
@@ -20,11 +20,11 @@ var_dump($c);
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Object of class stdClass could not be converted to number in %sadd_002.php on line %d
|
||||
Notice: Object of class stdClass could not be converted to int in %sadd_002.php on line %d
|
||||
|
||||
Exception: Unsupported operand types
|
||||
|
||||
Notice: Object of class stdClass could not be converted to number in %s on line %d
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
|
||||
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
|
||||
Stack trace:
|
||||
|
||||
@@ -20,11 +20,11 @@ var_dump($c);
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Object of class stdClass could not be converted to number in %sadd_003.php on line %d
|
||||
Notice: Object of class stdClass could not be converted to int in %sadd_003.php on line %d
|
||||
|
||||
Exception: Unsupported operand types
|
||||
|
||||
Notice: Object of class stdClass could not be converted to number in %s on line %d
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
|
||||
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
|
||||
Stack trace:
|
||||
|
||||
@@ -16,7 +16,7 @@ var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
float(2834756759.1231)
|
||||
float(2834756759.1231)
|
||||
Done
|
||||
@@ -30,7 +30,7 @@ var_dump($s);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(3) "020"
|
||||
string(4) "pead"
|
||||
string(4) "pead"
|
||||
|
||||
@@ -15,7 +15,7 @@ $a = new class extends A implements B {
|
||||
};
|
||||
|
||||
var_dump($a instanceof A, $a instanceof B);
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
@@ -10,6 +10,6 @@ $foo = function() {
|
||||
$closure = Closure::bind($foo, $class, $class);
|
||||
var_dump($closure());
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
object(class@anonymous)#1 (0) {
|
||||
}
|
||||
@@ -12,5 +12,5 @@ $class = new class() {
|
||||
};
|
||||
var_dump($class->run());
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(10) "Running..."
|
||||
@@ -50,7 +50,7 @@ test2($a, $b, $c, $d, ...$array);
|
||||
var_dump($a, $b, $c, $d, $array);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(2)
|
||||
|
||||
@@ -19,6 +19,6 @@ try {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(36) "Cannot unpack array with string keys"
|
||||
string(42) "Cannot unpack Traversable with string keys"
|
||||
@@ -14,4 +14,4 @@ class Sub extends Base {
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
@@ -8,5 +8,5 @@ assert.exception=1
|
||||
assert(true);
|
||||
var_dump(true);
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
@@ -12,7 +12,7 @@ var_dump(\assert(true));
|
||||
var_dump(assert(false));
|
||||
var_dump(assert(true));
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
@@ -17,5 +17,5 @@ test();
|
||||
--EXPECTF--
|
||||
Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
|
||||
|
||||
Notice: Object of class stdClass could not be converted to number in %s on line %d
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
int(2)
|
||||
@@ -49,8 +49,8 @@ NULL
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Attempt to assign property 'foo' of non-object in %s on line %d
|
||||
Warning: Attempt to assign property of non-object in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Attempt to assign property 'foo' of non-object in %s on line %d
|
||||
Warning: Attempt to assign property of non-object in %s on line %d
|
||||
NULL
|
||||
@@ -12,7 +12,7 @@ var_dump($var1);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
int(2)
|
||||
int(2)
|
||||
Done
|
||||
@@ -12,7 +12,7 @@ var_dump($var1);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(1) "g"
|
||||
string(1) "g"
|
||||
Done
|
||||
@@ -12,7 +12,7 @@ var_dump($var1);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
NULL
|
||||
NULL
|
||||
Done
|
||||
@@ -15,7 +15,7 @@ var_dump($var2);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(5) "space"
|
||||
string(5) "space"
|
||||
string(5) "space"
|
||||
|
||||
@@ -13,7 +13,7 @@ for ($i = 0; $i < 8; $i++) {
|
||||
$h =& f();
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
string(3) "foo"
|
||||
|
||||
@@ -24,6 +24,6 @@ catch(Exception $e)
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
Objects returned by array_iterator::getIterator() must be traversable or implement interface Iterator
|
||||
===DONE===
|
||||
@@ -13,7 +13,7 @@ var_dump(class_exists('NotExistingClass'));
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
{closure}(NotExistingClass)
|
||||
bool(false)
|
||||
{closure}(NotExistingClass), done
|
||||
|
||||
@@ -5,7 +5,7 @@ Bug #26698 (Thrown exceptions while evaluting argument to pass as parameter cras
|
||||
|
||||
ini_set("report_memleaks", 0); // the exception thrown in this test results in a memory leak, which is fine
|
||||
|
||||
class ObjectOne
|
||||
class Object
|
||||
{
|
||||
function getNone()
|
||||
{
|
||||
@@ -23,7 +23,7 @@ class Proxy
|
||||
{
|
||||
try
|
||||
{
|
||||
$res = new ObjectOne();
|
||||
$res = new Object();
|
||||
$this->three($res->getNone());
|
||||
}
|
||||
catch(Exception $e)
|
||||
@@ -36,7 +36,7 @@ class Proxy
|
||||
{
|
||||
try
|
||||
{
|
||||
$res = new ObjectOne();
|
||||
$res = new Object();
|
||||
$this->three(1, $res->getNone());
|
||||
}
|
||||
catch(Exception $e)
|
||||
@@ -49,7 +49,7 @@ class Proxy
|
||||
{
|
||||
try
|
||||
{
|
||||
$res = new ObjectOne();
|
||||
$res = new Object();
|
||||
$this->three(1, 2, $res->getNone());
|
||||
}
|
||||
catch(Exception $e)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Bug #27669 (PHP 5 didn't support all possibilities for calling static methods dynamically)
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL & !E_STRICT);
|
||||
|
||||
class A {
|
||||
function hello() {
|
||||
echo "Hello World\n";
|
||||
@@ -12,6 +14,5 @@ Bug #27669 (PHP 5 didn't support all possibilities for calling static methods dy
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Deprecated: Non-static method A::hello() should not be called statically in %s on line %d
|
||||
Hello World
|
||||
===DONE===
|
||||
@@ -45,7 +45,7 @@ var_dump(ClassC::$prop);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
===INIT===
|
||||
string(1) "A"
|
||||
string(1) "C"
|
||||
|
||||
@@ -9,7 +9,7 @@ function my_error_handler($errno, $errstr, $errfile, $errline) {
|
||||
|
||||
set_error_handler('my_error_handler');
|
||||
|
||||
class ObjectOne
|
||||
class Object
|
||||
{
|
||||
public $x;
|
||||
|
||||
@@ -26,7 +26,7 @@ class Overloaded
|
||||
|
||||
function __construct($x)
|
||||
{
|
||||
$this->x = new ObjectOne($x);
|
||||
$this->x = new Object($x);
|
||||
}
|
||||
|
||||
function __get($prop)
|
||||
@@ -47,7 +47,7 @@ var_dump($y->x->x);
|
||||
var_dump($y->x->x = 3);
|
||||
var_dump($y->y = 3);
|
||||
var_dump($y->y);
|
||||
var_dump($y->z = new ObjectOne(4));
|
||||
var_dump($y->z = new Object(4));
|
||||
var_dump($y->z->x);
|
||||
$t = $y->z;
|
||||
var_dump($t->x = 5);
|
||||
@@ -56,7 +56,7 @@ var_dump($y->z->x = 6);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
object(ObjectOne)#%d (1) {
|
||||
object(Object)#%d (1) {
|
||||
["x"]=>
|
||||
int(2)
|
||||
}
|
||||
@@ -66,9 +66,9 @@ Overloaded::__set(y,3)
|
||||
int(3)
|
||||
Overloaded::__get(y)
|
||||
int(3)
|
||||
string(58) "Object of class ObjectOne could not be converted to string"
|
||||
string(55) "Object of class Object could not be converted to string"
|
||||
Overloaded::__set(z,)
|
||||
object(ObjectOne)#%d (1) {
|
||||
object(Object)#%d (1) {
|
||||
["x"]=>
|
||||
int(4)
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ if (is_callable(array('test_class','test_func4'))) {
|
||||
$object = new foo();
|
||||
$object->test();
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
test_func1
|
||||
test_func2
|
||||
test_func3
|
||||
|
||||
@@ -28,7 +28,7 @@ unset($bar);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
Foo::__construct
|
||||
Caught exception!
|
||||
===DONE===
|
||||
@@ -44,7 +44,7 @@ ok
|
||||
ok
|
||||
ok
|
||||
|
||||
Notice: Trying to get property 'wrong' of non-object in %s on line %d
|
||||
Notice: Trying to get property of non-object in %s on line %d
|
||||
ok
|
||||
|
||||
Warning: Illegal string offset 'wrong' in %s on line %d
|
||||
@@ -52,4 +52,4 @@ ok
|
||||
ok
|
||||
|
||||
Warning: Illegal string offset 'wrong' in %s on line %d
|
||||
ok
|
||||
ok
|
||||
@@ -96,7 +96,7 @@ var_dump($x->doSomethingStatic(1));
|
||||
?>
|
||||
===DONE===
|
||||
<?php exit(0); ?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
===A===
|
||||
TestB::doSomething(1)
|
||||
TestA::doSomething(2)
|
||||
|
||||
@@ -33,7 +33,7 @@ var_dump(error_reporting());
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
int(32767)
|
||||
int(32767)
|
||||
int(30719)
|
||||
|
||||
@@ -5,7 +5,7 @@ Bug #35470 (Assigning global using variable name from array doesn't function)
|
||||
$x = array("test", "55");
|
||||
global ${$x[0]};
|
||||
${$x[0]} = $x[1];
|
||||
echo "Test: $test\n";
|
||||
echo "Test: $test\n";;
|
||||
?>
|
||||
--EXPECT--
|
||||
Test: 55
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #36214 (__get method works properly only when conditional operator is used)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
class context {
|
||||
|
||||
@@ -8,7 +8,7 @@ foreach($x->a->b as &$v) {
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Attempt to modify property 'a' of non-object in %sbug36303.php on line 3
|
||||
Warning: Attempt to modify property of non-object in %sbug36303.php on line 3
|
||||
|
||||
Warning: Invalid argument supplied for foreach() in %sbug36303.php on line 3
|
||||
ok
|
||||
@@ -2,6 +2,7 @@
|
||||
Bug #40809 (Poor performance of ".=")
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL|E_STRICT);
|
||||
|
||||
$num_increments = 100;
|
||||
$num_repeats = 1000;
|
||||
|
||||
@@ -14,5 +14,5 @@ set_exception_handler("ehandle::exh");
|
||||
throw new Exception ("Whiii");
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
foo
|
||||
@@ -20,7 +20,7 @@ try_class::main ();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
Done
|
||||
|
||||
Warning: (Registered shutdown functions) Unable to call self::on_shutdown() - function does not exist in Unknown on line 0
|
||||
@@ -26,6 +26,6 @@ try {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(40) "Creating default object from empty value"
|
||||
Done
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #42819 (namespaces in indexes of constant arrays)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) print "skip SPL extension required"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
namespace foo\foo;
|
||||
@@ -301,4 +303,4 @@ Fatal error: Uncaught Error: Undefined constant 'foo\foo\unknown' in %sbug42819.
|
||||
Stack trace:
|
||||
#0 %s(%d): foo\oops()
|
||||
#1 {main}
|
||||
thrown in %sbug42819.php on line %d
|
||||
thrown in %sbug42819.php on line %d
|
||||
@@ -6,5 +6,5 @@ declare(ticks=1);
|
||||
namespace test;
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
ok
|
||||
@@ -21,5 +21,5 @@ $o = new C();
|
||||
$o->foo();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
works
|
||||
@@ -1,11 +1,12 @@
|
||||
--TEST--
|
||||
Bug #43450 (Memory leak on some functions with implicit object __toString() call)
|
||||
--SKIPIF--
|
||||
<?php if (!function_exists('memory_get_usage')) die('skip memory_get_usage() not installed'); ?>
|
||||
<?php if (!function_exists('memory_get_usage')) die('memory_get_usage() not installed'); ?>
|
||||
--INI--
|
||||
opcache.enable_cli=0
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL|E_STRICT);
|
||||
|
||||
class Foo
|
||||
{
|
||||
|
||||
@@ -28,22 +28,22 @@ var_dump($a);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--> read access:
|
||||
Notice: Trying to get property 'p' of non-object in %sbug44660.php on line 6
|
||||
Notice: Trying to get property of non-object in %sbug44660.php on line 6
|
||||
|
||||
--> direct assignment:
|
||||
Warning: Attempt to assign property 'p' of non-object in %sbug44660.php on line 9
|
||||
Warning: Attempt to assign property of non-object in %sbug44660.php on line 9
|
||||
|
||||
--> increment:
|
||||
Warning: Attempt to increment/decrement property 'p' of non-object in %sbug44660.php on line 12
|
||||
Warning: Attempt to increment/decrement property of non-object in %sbug44660.php on line 12
|
||||
|
||||
--> reference assignment:
|
||||
Warning: Attempt to modify property 'p' of non-object in %sbug44660.php on line 15
|
||||
Warning: Attempt to modify property of non-object in %sbug44660.php on line 15
|
||||
|
||||
--> reference assignment:
|
||||
Warning: Attempt to modify property 'p' of non-object in %sbug44660.php on line 18
|
||||
Warning: Attempt to modify property of non-object in %sbug44660.php on line 18
|
||||
|
||||
--> indexed assignment:
|
||||
Warning: Attempt to modify property 'p' of non-object in %sbug44660.php on line 21
|
||||
Warning: Attempt to modify property of non-object in %sbug44660.php on line 21
|
||||
|
||||
--> Confirm assignments have had no impact:
|
||||
bool(true)
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #45805 (Crash on throwing exception from error handler)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('reflection') or die('skip'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
class PHPUnit_Util_ErrorHandler
|
||||
@@ -29,9 +31,9 @@ class B {
|
||||
}
|
||||
|
||||
set_error_handler(
|
||||
array('PHPUnit_Util_ErrorHandler', 'handleError'), E_ALL
|
||||
array('PHPUnit_Util_ErrorHandler', 'handleError'), E_ALL | E_STRICT
|
||||
);
|
||||
|
||||
|
||||
$o = new B;
|
||||
$o->bar();
|
||||
?>
|
||||
|
||||
@@ -23,7 +23,7 @@ function myErrorHandler($errno, $errstr, $errfile, $errline)
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
*** Testing restore_error_handler() : error bug #46196 ***
|
||||
NULL
|
||||
bool(true)
|
||||
|
||||
@@ -13,4 +13,4 @@ new $baz();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(11) "Foo\Bar\Baz"
|
||||
%string|unicode%(11) "Foo\Bar\Baz"
|
||||
@@ -7,7 +7,7 @@ arg_separator.output=&
|
||||
var_dump(ini_set("arg_separator.output", ""));
|
||||
var_dump(ini_get("arg_separator.output"));
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
string(1) "&"
|
||||
|
||||
@@ -7,5 +7,5 @@ $a->{"a"."b"};
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: a in %sbug47109.php on line 2
|
||||
|
||||
Notice: Trying to get property 'ab' of non-object in %sbug47109.php on line 2
|
||||
Notice: Trying to get property of non-object in %sbug47109.php on line 2
|
||||
|
||||
@@ -22,5 +22,5 @@ $a = new A();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
Done
|
||||
@@ -13,5 +13,5 @@ interface a{}
|
||||
class b implements a { function f($a=1) {}}
|
||||
class c extends b {function f() {}}
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(60) "Declaration of c::f() should be compatible with b::f($a = 1)"
|
||||
@@ -28,7 +28,7 @@ $b = new B();
|
||||
$b->A();
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
B::__construct
|
||||
A::__construct
|
||||
B::A
|
||||
|
||||
@@ -49,5 +49,5 @@ $c = new C;
|
||||
$c->func('This should work!');
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(26) "A::func: This should work!"
|
||||
@@ -20,7 +20,7 @@ class B {
|
||||
try {
|
||||
$b = new B();
|
||||
} catch(Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
echo $e->getMessage() . "\n";;
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #50174 (Incorrectly matched docComment)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip SPL and reflection extensions required"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
Loaded 100 of 6816 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user