2010-08-30 10:26:31 +00:00
|
|
|
$Id$
|
|
|
|
|
|
|
|
UPGRADE NOTES - PHP X.Y
|
|
|
|
|
|
|
|
1. Internal API changes
|
2013-06-17 16:27:22 +00:00
|
|
|
a. Addition of do_operation and compare object handlers
|
2010-09-17 08:42:12 +00:00
|
|
|
|
2010-11-18 10:43:01 +00:00
|
|
|
2. Build system changes
|
|
|
|
a. Unix build system changes
|
|
|
|
b. Windows build system changes
|
|
|
|
|
|
|
|
|
2010-08-30 10:26:31 +00:00
|
|
|
========================
|
|
|
|
1. Internal API changes
|
|
|
|
========================
|
|
|
|
|
2013-06-17 16:27:22 +00:00
|
|
|
a. Addition of do_operation and compare object handlers
|
|
|
|
|
|
|
|
Two new object handlers have been added:
|
|
|
|
|
|
|
|
do_operation:
|
|
|
|
typedef int (*zend_object_do_operation_t)(
|
|
|
|
zend_uchar opcode, zval *result, zval *op1, zval *op2 TSRMLS_DC
|
|
|
|
);
|
|
|
|
|
|
|
|
compare:
|
|
|
|
typedef int (*zend_object_compare_zvals_t)(
|
|
|
|
zval *result, zval *op1, zval *op2 TSRMLS_DC
|
|
|
|
);
|
|
|
|
|
|
|
|
The first handler is used to overload arithmetic operations. The first
|
|
|
|
argument specifies the opcode of the operator, result is the target zval,
|
|
|
|
op1 the first operand and op2 the second operand. For unary operations
|
|
|
|
op2 is NULL. If the handler returns FAILURE PHP falls back to the default
|
|
|
|
behavior for the operation.
|
|
|
|
|
|
|
|
The second handler is used to perform comparison operations with
|
|
|
|
non-objects. The value written into result must be an IS_LONG with value
|
|
|
|
-1 (smaller), 0 (equal) or 1 (greater). The return value is a SUCCESS/FAILURE
|
|
|
|
return code. The difference between this handler and compare_objects is
|
|
|
|
that it will be triggered for comparisons with non-objects and objects of
|
|
|
|
different types. It takes precedence over compare_objects.
|
|
|
|
|
|
|
|
Further docs in the RFC: https://wiki.php.net/rfc/operator_overloading_gmp
|
|
|
|
|
2010-11-18 10:43:01 +00:00
|
|
|
========================
|
|
|
|
2. Build system changes
|
|
|
|
========================
|
|
|
|
|
|
|
|
a. Unix build system changes
|
2012-02-22 10:08:37 +00:00
|
|
|
-
|
2010-11-18 10:43:01 +00:00
|
|
|
|
|
|
|
b. Windows build system changes
|
2013-03-23 17:09:05 +00:00
|
|
|
-
|
2010-11-18 10:43:01 +00:00
|
|
|
|