mirror of
https://github.com/php/php-src.git
synced 2024-11-23 09:54:15 +08:00
87 lines
2.9 KiB
Plaintext
87 lines
2.9 KiB
Plaintext
$Id$
|
|
|
|
UPGRADE NOTES - PHP X.Y
|
|
|
|
1. Internal API changes
|
|
a. Addition of do_operation and compare object handlers
|
|
b. return_value_ptr now always available, RETVAL_ZVAL_FAST macros
|
|
c. POST data handling
|
|
d. Arginfo changes
|
|
e. New data types
|
|
f. zend_parse_parameters() specs
|
|
g. sprintf() formats
|
|
h. HashTable API
|
|
|
|
2. Build system changes
|
|
a. Unix build system changes
|
|
b. Windows build system changes
|
|
|
|
|
|
========================
|
|
1. Internal API changes
|
|
========================
|
|
|
|
a. zend_set_memory_limit() now takes the TSRMLS_CC macro as its last argument
|
|
e. New data types
|
|
|
|
String
|
|
|
|
Besides the old way of accepting the strings with 's', the new 'S' ZPP spec
|
|
was introduced. It expects an argument of the type zend_string *. String lengths
|
|
in it do no more depend on the firm 'int' datatype. The replacement
|
|
is a platform dependent size_t datatype called php_size_t.
|
|
|
|
String length is defined as zend_size_t inside Zend and aliased as php_size_t
|
|
anywhere else. The inclusion of php.h is necessary.
|
|
|
|
Integer types
|
|
|
|
Integers do no more depend on the firm 'long' type. Instead a platform
|
|
dependent integer type is used. That datatype is defined dynamically to
|
|
guarantee the consistent 64 bit support. The zval field representing user
|
|
land integer it bound to php_int_t.
|
|
|
|
Signed integer is defined as zend_int_t, unsigned integer as zend_uint_t
|
|
inside Zend. Both are aliased as php_int_t and php_uint_t anywhere else,
|
|
respectively. The inclusion of php.h is necessary.
|
|
|
|
Other datatypes
|
|
|
|
zend_off_t - portable off_t analogue
|
|
zend_stat_t - portable 'struct stat' analogue
|
|
|
|
These datatypes are declared to be portable across platforms. Thus, direct
|
|
usage of the functions like fseek, stat, etc. as well as direct usage of
|
|
off_t and struct stat is strongly not recommended. Instead the portable
|
|
macros should be used.
|
|
|
|
zend_fseek - portable fseek equivalent
|
|
zend_ftell - portable ftell equivalent
|
|
zend_lseek - portable lseek equivalent
|
|
zend_fstat - portable fstat equivalent
|
|
zend_stat - portable stat equivalent
|
|
|
|
f. zend_parse_parameters() specs
|
|
|
|
The new spec 'S' introduced, which expects an argument of type zend_string *.
|
|
The new specs 'i' and 'I' introduced, which expect an argument of type php_int_t.
|
|
|
|
g. sprintf() formats
|
|
|
|
New printf modifier 'p' was implemented to platform independently output php_int_t,
|
|
php_uint_t and php_size_t datatypes. That modifier can be used with'd', 'u', 'x' and 'o'
|
|
printf format specs with spprintf, snprintf and the wrapping printf implementations.
|
|
%pu is sufficient for both php_uint_t and php_size_t. the code using %p spec to output
|
|
pointer address might need to be enclosed into #ifdef when it unlickily followed by 'd',
|
|
'u', 'x' or 'o'.
|
|
|
|
h. HashTable API
|
|
|
|
Datatype for array indexes was changed to php_uint_t, for string keys to zend_string *.
|
|
|
|
========================
|
|
2. Build system changes
|
|
========================
|
|
|
|
|