Commit Graph

7640 Commits

Author SHA1 Message Date
Pierre Joye
bc7b287a61 Merge branch 'PHP-5.5'
* PHP-5.5:
  - add imageaffinematrixget and imagematrixconcat
  - add affine matrix helper for translate, scale, rotate and shear
  - fix unix build
  - add new files for interpolation
  - config.m4 sync with .w32
  - add new interpolation method   . imagescale   . imageaffine   . replace imagerotate with new generic and optimized new implementations   . imagesetinterpolationmethod, to set the default interpolation to be     used with the new functions   . add imagepalettetotruecolor
2013-03-20 12:19:46 +01:00
Pierre Joye
22159fb7b7 - add new interpolation method
. imagescale
  . imageaffine
  . replace imagerotate with new generic and optimized new implementations
  . imagesetinterpolationmethod, to set the default interpolation to be
    used with the new functions
  . add imagepalettetotruecolor
2013-03-20 07:46:59 +01:00
Anatol Belski
3b922794ab Merge branch 'PHP-5.5'
* PHP-5.5:
  fix C90 compat
2013-03-19 14:45:57 +01:00
Anatol Belski
6f0f5d5281 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix C90 compat
2013-03-19 14:44:20 +01:00
Anatol Belski
7687b8b81c fix C90 compat 2013-03-19 14:42:18 +01:00
Dmitry Stogov
b8ab827e4f Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #63976 (Parent class incorrectly using child constant in class property)
2013-03-19 17:05:36 +04:00
Dmitry Stogov
4837bdb910 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #63976 (Parent class incorrectly using child constant in class property)

Conflicts:
	NEWS
2013-03-19 17:04:35 +04:00
Dmitry Stogov
7b0993bfb4 Fixed bug #63976 (Parent class incorrectly using child constant in class property) 2013-03-19 16:59:01 +04:00
Dmitry Stogov
e72d059a0c Merge branch 'PHP-5.5'
* PHP-5.5:
  Partial fix for bug #64239
2013-03-19 15:48:22 +04:00
Dmitry Stogov
960d5be528 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Partial fix for bug #64239
2013-03-19 15:47:43 +04:00
Dmitry Stogov
984561cfa8 Partial fix for bug #64239 2013-03-19 15:45:48 +04:00
Dmitry Stogov
baa5b3ef74 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #62343 (Show class_alias In get_declared_classes())
2013-03-19 15:01:05 +04:00
Dmitry Stogov
74e11fb14c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #62343 (Show class_alias In get_declared_classes())

Conflicts:
	NEWS
2013-03-19 15:00:24 +04:00
Dmitry Stogov
84630a1109 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62343 (Show class_alias In get_declared_classes())
2013-03-19 14:59:08 +04:00
Dmitry Stogov
4a6291508d Fixed bug #62343 (Show class_alias In get_declared_classes()) 2013-03-19 14:56:53 +04:00
Dmitry Stogov
b360d26294 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #64417 (ArrayAccess::&offsetGet() in a trait causes fatal error)
2013-03-19 13:08:14 +04:00
Dmitry Stogov
ef8c8eaa95 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64417 (ArrayAccess::&offsetGet() in a trait causes fatal error)

Conflicts:
	NEWS
	Zend/zend_compile.c
2013-03-19 13:07:32 +04:00
Dmitry Stogov
e62bb03257 Fixed bug #64417 (ArrayAccess::&offsetGet() in a trait causes fatal error) 2013-03-19 12:48:23 +04:00
Dmitry Stogov
1b72240226 Merge branch 'PHP-5.5'
* PHP-5.5:
  Made test compatible with O+
2013-03-16 16:11:41 +04:00
Dmitry Stogov
e9641141aa Made test compatible with O+ 2013-03-16 16:11:00 +04:00
Nikita Popov
279285598d Merge branch 'PHP-5.5' 2013-03-15 13:49:14 +01:00
Nikita Popov
b7788c52f1 Fix wrong macro usage and add missing NEWS entry 2013-03-15 13:48:33 +01:00
Dmitry Stogov
22b0f5d829 Merge branch 'PHP-5.5'
* PHP-5.5:
  Removed redundand code
2013-03-14 14:22:51 +04:00
Dmitry Stogov
dd1c358d1b Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  fix the fix
  fix for bug  #63530 	mysqlnd_stmt::bind_one_parameter uses wrong alloc for stmt->param_bind
  Forgot to remove some now unused variables
  Add support for non-scalar Iterator keys in foreach
  fixed headers order
  - Updated to version 2013.2 (2013b)
  fixed the test
  Fixed bug #64370 (microtime(true) less than $_SERVER['REQUEST_TIME_FLOAT'])
  Disable zend_always_inline in debug build
2013-03-14 14:19:41 +04:00
Dmitry Stogov
d77c865aff Removed redundand code 2013-03-13 17:51:10 +04:00
Nikita Popov
81623d3a60 Merge branch 'PHP-5.5'
Conflicts:
	UPGRADING
	UPGRADING.INTERNALS
2013-03-12 17:29:54 +01:00
Nikita Popov
fcc6611de9 Add support for non-scalar Iterator keys in foreach
RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
2013-03-12 17:27:31 +01:00
Xinchen Hui
01e1ba8873 Merge branch 'PHP-5.5'
Conflicts:
	UPGRADING
2013-03-11 15:19:59 +08:00
Xinchen Hui
4573405c5d Merge branch 'PHP-5.4' into PHP-5.5 2013-03-11 15:16:47 +08:00
Xinchen Hui
0444708c5c Disable zend_always_inline in debug build
it will be much more easier for debuging
2013-03-11 15:15:22 +08:00
Nikita Popov
3670085d7d Merge branch 'PHP-5.5' 2013-03-09 20:22:29 +01:00
Nikita Popov
9490118fdb Fix tests after laruence unserialize change 2013-03-09 20:21:33 +01:00
Xinchen Hui
12413b1393 Merge branch 'PHP-5.5' 2013-03-09 23:12:25 +08:00
Xinchen Hui
1be745ce1b Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	ext/standard/var_unserializer.c
2013-03-09 23:10:48 +08:00
Xinchen Hui
7197f0ffcc Fixed confused exception message while user threw exception 2013-03-09 23:08:14 +08:00
Xinchen Hui
79a96d2af0 Merge branch 'PHP-5.5'
Conflicts:
	NEWS-5.5
2013-03-08 10:36:13 +08:00
Xinchen Hui
01049ca7ae Fixed bug #61025 (__invoke() visibility not honored) 2013-03-08 10:34:17 +08:00
Gustavo Lopes
46adc1603c Merge branch 'PHP-5.5'
* PHP-5.5:
  NEWS for 8718755
  Remove trailing whitespace; break long lines
  Fix rounding of zend_dval_to_lval
  Fix zend_dval_to_lval outside 64bit integers range
2013-02-23 18:07:22 +01:00
Gustavo Lopes
a86fcfbc1d Fix rounding of zend_dval_to_lval
Now rounding is always towards zero; the rounding can be though as if
occurring on the original double. Only relevant for the 32-bit long
variant.
2013-02-23 16:55:50 +00:00
Gustavo Lopes
77566edbaf Fix zend_dval_to_lval outside 64bit integers range
PHP should preserve the least significant bits when casting from double
to long. Zend.m4 contains this:

AC_DEFINE([ZEND_DVAL_TO_LVAL_CAST_OK], 1, [Define if double cast to long preserves least significant bits])

If ZEND_DVAL_TO_LVAL_CAST_OK is not defined, zend_operators.h had an
inline implementation of zend_dval_to_lval() that would do a cast to an
int64_t (when sizeof(long) == 4), then a cast to unsigned long and
finally the cast to long.

While this works well for doubles inside the range of values of the type
used in the first cast (int64_t in the 32-bit version and unsigned long
in the 64-bit version), if outside the range, it is undefined behavior
that WILL give varying and not particularly useful results.

This commit uses fmod() to first put the double in a range that can
safely be cast to unsigned long and then casts this unsigned long to
long. This last cast is implementation defined, but it's very likely
that this gives the expected result (i.e. the internal 2's complement
representation is unchanged) on all platforms that PHP supports. In any
case, the previous implementationa already had this assumption.

This alternative code path is indeed significantly slower than simply
casting the double (almost an order of magnitude), but that should not
matter because casting doubles with a very high absolute value is a
rare event.
2013-02-23 17:23:49 +01:00
Xinchen Hui
6a05c6be41 Merge branch 'PHP-5.5' 2013-02-21 18:21:19 +08:00
Xinchen Hui
f39d12c821 Merge branch 'PHP-5.4' into PHP-5.5 2013-02-21 18:20:48 +08:00
Xinchen Hui
9a44a9806c Fixed bug #64235 (Insteadof not work for class method in 5.4.11)
As we discussed with stefan, we think previous of allowing use with
classes is a bug, should be forbided, anyway, the error message should
be improved.
2013-02-21 18:18:41 +08:00
Stanislav Malyshev
4c293bfe91 Merge branch 'PHP-5.5'
* PHP-5.5:
  news for bug #49348
  fix tests
  fix bug #49348 - issue notice on get_property_ptr_ptr when used for read
2013-02-21 00:57:52 -08:00
Stanislav Malyshev
d39554ac08 Merge branch 'bug49348' into PHP-5.5
* bug49348:
  fix tests
  fix bug #49348 - issue notice on get_property_ptr_ptr when used for read
2013-02-21 00:52:46 -08:00
Stanislav Malyshev
dc6f073ce9 fix tests 2013-02-18 23:01:42 -08:00
Stanislav Malyshev
0c6d903ce7 fix bug #49348 - issue notice on get_property_ptr_ptr when used for read 2013-02-18 20:56:02 -08:00
Dmitry Stogov
d7cbc01188 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #64070 (Inheritance with Traits failed with error)
2013-02-18 16:36:25 +04:00
Dmitry Stogov
d77eb411ea Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64070 (Inheritance with Traits failed with error)

Conflicts:
	NEWS
	Zend/zend_compile.c
2013-02-18 16:20:49 +04:00
Dmitry Stogov
42437dd870 Fixed bug #64070 (Inheritance with Traits failed with error) 2013-02-18 16:07:51 +04:00
Xinchen Hui
92046b7ef1 Merge branch 'PHP-5.5' 2013-02-16 22:25:37 +08:00
Xinchen Hui
75742d57eb Exceptions triggered by undefined variable should be handled before FATAL error
this is a enhancement of the fix for bug #64135
2013-02-16 22:22:22 +08:00
Ard Biesheuvel
0fcde51c35 Merge branch 'PHP-5.5' 2013-02-13 13:52:30 +01:00
Ard Biesheuvel
65fa9f2c4b Merge branch 'PHP-5.4' into PHP-5.5 2013-02-13 13:50:53 +01:00
Ard Biesheuvel
050aae2860 Fixed bug #64197 (_Offsetof() macro used but not defined on ARM/Clang)
Updated the code to test for __ARMCC_VERSION instead of __arm, as
that is a more reliable indicator of whether the ARMCC compiler is
being used.
2013-02-13 12:22:50 +01:00
Ard Biesheuvel
7c1e19ed76 Merge branch 'PHP-5.5' 2013-02-11 14:45:17 +01:00
Ard Biesheuvel
e2453276e9 Low-level ARM optimizations
- added ARM versions of zend_mm_high_bit()/zend_mm_low_bit()
- improved safe_address()
2013-02-11 14:36:58 +01:00
Ard Biesheuvel
aa12cdc361 Improve x86 inline assembler
- added cc annotation to inline asm that clobbers the condition
  flags
- remove hardcoded constants (IS_LONG,IS_DOUBLE)
- remove hardcoded offsets (zval->value, zval->type)
2013-02-11 13:53:27 +01:00
Andrey Hristov
faa79150f6 Merge branch 'PHP-5.5'
Conflicts:
	NEWS
2013-02-11 12:07:55 +01:00
Remi Collet
dc47ec0490 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64142 (dval to lval different behavior on ppc64)
2013-02-11 09:13:27 +01:00
Remi Collet
e67a2b9e47 Fixed bug #64142 (dval to lval different behavior on ppc64)
See discussion on internals
http://marc.info/?t=136042277700003&r=1&w=2
2013-02-11 09:10:51 +01:00
Xinchen Hui
5fcae352ed Merge branch 'PHP-5.5' 2013-02-07 23:50:35 +08:00
Xinchen Hui
7948eea6f9 Forgot test script 2013-02-07 23:49:35 +08:00
Xinchen Hui
7fb07acf98 Merge branch 'PHP-5.5' 2013-02-07 23:46:15 +08:00
Xinchen Hui
290509755a Fixed bug #64135 (Exceptions from set_error_handler are not always propagated) 2013-02-07 23:44:46 +08:00
Remi Collet
9f7b121da3 Merge branch 'PHP-5.5'
* PHP-5.5:
  revert
  revert
2013-02-05 12:29:34 +01:00
Remi Collet
7b75a941ef Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  revert
2013-02-05 12:29:01 +01:00
Remi Collet
e7ce002c01 revert 2013-02-05 12:28:47 +01:00
Ard Biesheuvel
d0e0a51c4c Add ARM optimized versions of safe_address()
The function safe_address() uses inline assembler to detect
overflow in size/offset calculations, as detecting this in
plain C is a lot more work.
2013-02-05 12:14:55 +01:00
Remi Collet
c2a2f5e3ff Merge branch 'PHP-5.5'
* PHP-5.5:
  NEWS
  Fixed bug #64142 (dval to lval different behavior on ppc64)
2013-02-04 15:27:54 +01:00
Remi Collet
79956330fe Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64142 (dval to lval different behavior on ppc64)
2013-02-04 15:27:07 +01:00
Remi Collet
6533094d9e Fixed bug #64142 (dval to lval different behavior on ppc64)
On x86_64:
(long)(double)9223372036854775807+1 = -9223372036854775808
On ppc64
(long)(double)9223372036854775807-1 = 9223372036854775807
2013-02-04 15:19:32 +01:00
Nikita Popov
86ee2c60c4 Merge branch 'PHP-5.5' 2013-02-01 19:53:23 +01:00
Nikita Popov
114245c1b9 Fix bug #63830: Segfault on undefined function call in nested generator
This also reverses the destruction order of the pushed arguments to
align with how it is done everywhere else.

I'm not exactly sure whether this is the right way to fix it, but it
seems to work fine.
2013-02-01 19:53:04 +01:00
Nikita Popov
5c3c31127e Merge branch 'PHP-5.5' 2013-02-01 18:36:10 +01:00
Nikita Popov
3ee20e450f Fix segfault when cloning generator with properties
Rule of thumb: Always implement the object clone handler rather
than the object storage clone handler. Actually I think we should
drop the latter. It's nearly never usable.
2013-02-01 18:33:26 +01:00
Nikita Popov
ea56a894e8 Merge branch 'PHP-5.5' 2013-01-30 23:55:59 +01:00
Nikita Popov
8b972efe5f Fix potential segfault when finally in a generator is run during shutdown
If a generator is destroyed in a finally block it will resume the generator to run that finally
block before freeing the generator. This was done in the object storage free handler.

Running user code in the free handler isn't safe though because the free handlers may be run
during request shutdown, already after several key components have been shut down.

This is avoided by doing the finally handling in the dtor handler. These handlers are run at the
start of the shutdown sequence.
2013-01-30 23:52:02 +01:00
Jelle Zijlstra
09e73fd80e Fix build problem in C++11 2013-01-30 19:08:45 +01:00
Jelle Zijlstra
86b3643807 Fix build problem in C++11 2013-01-30 19:08:24 +01:00
Jelle Zijlstra
31468401b7 Fix build problem in C++11 2013-01-30 19:07:52 +01:00
Johannes Schlüter
ac8fcecd5c Merge branch 'PHP-5.5' 2013-01-29 19:50:44 +01:00
Johannes Schlüter
78d3e66f3a Merge branch 'PHP-5.4' into PHP-5.5 2013-01-29 19:50:14 +01:00
Johannes Schlüter
1433854681 Merge branch 'PHP-5.3' into PHP-5.4 2013-01-29 19:49:43 +01:00
Johannes Schlüter
ec53b60072 Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3 2013-01-29 19:49:13 +01:00
Johannes Schlüter
93fd9c704b Fix bug #64099 (Wrong TSRM usage in zend_register_class_alias) 2013-01-29 19:47:45 +01:00
Stanislav Malyshev
59cc4d7679 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #60833 - self, parent, static behave inconsistently case-sensitive

Conflicts:
	UPGRADING
2013-01-27 18:07:42 -08:00
Stanislav Malyshev
184db665eb fix bug #60833 - self, parent, static behave inconsistently case-sensitive 2013-01-27 18:02:51 -08:00
Gustavo Lopes
ddc98aa814 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix bug #64023 (__toString() & SplFileInfo)
2013-01-23 13:26:15 +01:00
Gustavo Lopes
fc7b054c2d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64023 (__toString() & SplFileInfo)
2013-01-23 13:24:50 +01:00
Gustavo Lopes
b8b3bb08b2 Merge branch 'bug64023' into PHP-5.4
* bug64023:
  Fix bug #64023 (__toString() & SplFileInfo)

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-01-22 12:24:33 +01:00
Gustavo Lopes
aa0adce47d Fix bug #64023 (__toString() & SplFileInfo)
Defining a __toString() method was having no effect when concatenating
the object. This was because the cast_object() handler would ignore
__toString().

Using echo() directly would actually use __toString(), but this was a
bug: the ECHO handler would try zend_std_cast_object_tostring() before
cast_object(), but cast_object() should have priority as
zend_std_cast_object_tostring() assumes an object with a
zend_class_entry.
2013-01-22 11:33:29 +01:00
Felipe Pena
6c8f9c3451 Merge branch 'PHP-5.5'
* PHP-5.5:
  - Fixed ZTS build
2013-01-18 22:15:22 -02:00
Felipe Pena
e23fca8910 - Fixed ZTS build 2013-01-18 22:15:08 -02:00
Lars Strojny
087a188702 Merge branch 'PHP-5.5' of git://github.com/php/php-src into PHP-5.5 2013-01-19 01:06:13 +01:00
Lars Strojny
b1ddfcbee3 Merge branch 'PHP-5.5' 2013-01-19 01:01:39 +01:00
Lars Strojny
8991ed016f Class Name Resolution As Scalar Via "class" Keyword 2013-01-19 01:00:47 +01:00
Stanislav Malyshev
f02373fc5a Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #63462 (Magic methods called twice for unset protected properties)
2013-01-18 13:45:40 -08:00
Stanislav Malyshev
cd619b47f3 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Fixed bug #63988 (Two Date tests fail) only for PHP-5.5
  - Fixed ZTS build
  Dereferencing process-handles no longer waits on those processes.
  revert change. now it doesn't compile again...someone should fix ext/date...
  Use two dtors thus allow allocation based on the alloc model of the connection.
  plug a leak - forgot ot use the dtor already written
  Revert "Apply the fputcsv test fix to SplFileObject_fputcsv.phpt. Mea culpa."
  Revert "Update fputcsv() to escape all characters equally."
  Add support for connect attributes, as of MySQL 5.6
  Bug #62489: dba_insert not working as expected
  UPGRADING.INTERNALS: document zend_qsort_r
  Add zend_qsort_r & use it in strtr
  NEWS for bug #63893
  Update README.PARAMETER_PARSING_API
  Export zend_parse_parameter()
  Expose zend_parse_arg() as zend_parse_parameter()
  zend_parse_parameters: allow ! for non pointers
2013-01-18 13:42:19 -08:00
Stanislav Malyshev
deeacc7106 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #63462 (Magic methods called twice for unset protected properties)
  NEWS for bug #64011. See 77ee200
  Fix bug #64011 (get_html_translation_table())
  Fix News
  Update the arguments in the prototype of fpm_socket_unix_test_connect().
  fixed build
  NEWS for bug #63893
  Fixed inconsequential bug in strtr()
  Revert "Apply the fputcsv test fix to SplFileObject_fputcsv.phpt. Mea culpa."
  Revert "Update fputcsv() to escape all characters equally."
  Remove _GNU_SOURCE, add local heap sort
  The compiler can figure this out
  Remove unused block
  strtr() with 2nd param array - optimization
  Refactoring, bugs & leaks
  Optimize strtr w/ 2nd arg array
2013-01-18 13:42:04 -08:00
Stanislav Malyshev
9e7c2e5906 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix bug #63462 (Magic methods called twice for unset protected properties)
2013-01-18 13:35:09 -08:00
Stanislav Malyshev
33b104c778 fix bug #63462 (Magic methods called twice for unset protected properties) 2013-01-18 13:29:43 -08:00
Xinchen Hui
87d5701065 Fix skipif section 2013-01-18 15:12:51 +08:00
Ard Biesheuvel
0b8ec19629 Added ARM accelerated implementations for ZEND_SIGNED_MULTIPLY_LONG()
Added inline assembler implementations:
- for 32-bit ARM, as the existing C implementation uses 64-bit
integer arithmetic, which relies on software emulation by libgcc;
- for 64-bit ARM, as the existing C implementation uses long doubles
to check for overflow before using the integer result.

Also updated my email address and fixed some whitespace
2013-01-17 18:04:05 +01:00
Ard Biesheuvel
abb12f5d7b Added test cases for ZEND_SIGNED_MULTIPLY_LONG()
Before making changes to the implementation of
ZEND_SIGNED_MULTIPLY_LONG(), add some test cases
to make sure the various implementations remain
equivalent.
2013-01-17 17:41:58 +01:00
Gustavo Lopes
979ca53734 Merge branch 'PHP-5.5'
* PHP-5.5:
  Update README.PARAMETER_PARSING_API
  Export zend_parse_parameter()
  Expose zend_parse_arg() as zend_parse_parameter()
  zend_parse_parameters: allow ! for non pointers
2013-01-16 23:37:42 +01:00
Gustavo Lopes
b8603035d0 Merge remote-tracking branch 'cataphract/zpp_improv' into PHP-5.5
See https://wiki.php.net/rfc/zpp_improv

* cataphract/zpp_improv:
  Update README.PARAMETER_PARSING_API
  Export zend_parse_parameter()
  Expose zend_parse_arg() as zend_parse_parameter()
  zend_parse_parameters: allow ! for non pointers
2013-01-16 23:37:06 +01:00
Gustavo Lopes
5466fd1866 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed inconsequential bug in strtr()
  UPGRADING.INTERNALS: document zend_qsort_r
  Add zend_qsort_r & use it in strtr
  NEWS for bug #63893
  Remove _GNU_SOURCE, add local heap sort
  The compiler can figure this out
  Remove unused block
  strtr() with 2nd param array - optimization
  Refactoring, bugs & leaks
  Optimize strtr w/ 2nd arg array
2013-01-15 21:47:33 +01:00
Gustavo Lopes
1bd193ed36 Merge remote-tracking branch 'remotes/cataphract/strtr_wu94_55' into PHP-5.5
* remotes/cataphract/strtr_wu94_55:
  Fixed inconsequential bug in strtr()
  UPGRADING.INTERNALS: document zend_qsort_r
  Add zend_qsort_r & use it in strtr
  NEWS for bug #63893
  Remove _GNU_SOURCE, add local heap sort
  The compiler can figure this out
  Remove unused block
  strtr() with 2nd param array - optimization
  Refactoring, bugs & leaks
  Optimize strtr w/ 2nd arg array
2013-01-15 21:45:22 +01:00
Andrey Hristov
c4fe37bd8c Merge branch 'PHP-5.5'
Conflicts:
	NEWS
2013-01-15 10:12:54 +01:00
Adam Harvey
be1700d467 Fix compile failure introduced by the fix for bug #46408. 2013-01-15 10:08:26 +08:00
Lars Strojny
92965b033a Bug #46408: Fix double formatting for PostgreSQL bound parameters 2013-01-14 21:23:52 +01:00
Gustavo Lopes
22390d3393 Add zend_qsort_r & use it in strtr 2013-01-14 17:24:16 +01:00
Xinchen Hui
7a31692253 Merge branch 'PHP-5.5' 2013-01-14 17:09:05 +08:00
Xinchen Hui
be07f815f2 Use zend_unmangle_property_name_ex to save strlen 2013-01-14 17:08:21 +08:00
Xinchen Hui
f6260b36dd Merge branch 'PHP-5.5' 2013-01-14 16:24:26 +08:00
Xinchen Hui
62059c16ee Fixed bug #63980 (object members get trimmed by zero bytes) 2013-01-14 16:23:22 +08:00
Stanislav Malyshev
308d817fb6 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #63982: isset() inconsistently produces a fatal error on protected property
  different OSes have different messages, and that's not what the test is about anyway
2013-01-13 17:29:06 -08:00
Stanislav Malyshev
30fd25bb49 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #63982: isset() inconsistently produces a fatal error on protected property
  different OSes have different messages, and that's not what the test is about anyway
2013-01-13 17:27:05 -08:00
Stanislav Malyshev
1a96fe0b32 fix bug #63982: isset() inconsistently produces a fatal error on protected property 2013-01-13 17:08:52 -08:00
Stanislav Malyshev
c6203da6c2 different OSes have different messages, and that's not what the test is about anyway 2013-01-13 16:58:27 -08:00
Gustavo Lopes
07590e6e45 Export zend_parse_parameter() 2013-01-09 17:00:04 +01:00
Dmitry Stogov
0132cb694d Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed compilator bug that might cause jump depended on unitialized value
2013-01-09 17:53:05 +04:00
Dmitry Stogov
c3ebd6305e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed compilator bug that might cause jump depended on unitialized value
2013-01-09 17:52:48 +04:00
Dmitry Stogov
625000ab44 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed compilator bug that might cause jump depended on unitialized value
2013-01-09 17:36:44 +04:00
Dmitry Stogov
d4650c5d69 Fixed compilator bug that might cause jump depended on unitialized value 2013-01-09 17:16:47 +04:00
Dmitry Stogov
149cc8d69d Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #63882 (zend_std_compare_objects crash on recursion)
2013-01-09 11:33:44 +04:00
Dmitry Stogov
326f896739 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #63882 (zend_std_compare_objects crash on recursion)

Conflicts:
	NEWS
2013-01-09 11:32:40 +04:00
Dmitry Stogov
f9e8678dd3 Fixed bug #63882 (zend_std_compare_objects crash on recursion) 2013-01-09 11:30:50 +04:00
Xinchen Hui
8a2208a33c Merge branch 'PHP-5.5' 2013-01-04 11:06:26 +08:00
Xinchen Hui
c4f2a20f15 Merge branch 'PHP-5.4' into PHP-5.5 2013-01-04 11:05:53 +08:00
Xinchen Hui
aff5d084a5 Merge branch 'PHP-5.3' into PHP-5.4 2013-01-04 11:03:52 +08:00
Xinchen Hui
c3e6de2227 Fixed bug #63899 (Use after scope error in zend_compile) 2013-01-04 11:02:21 +08:00
Stanislav Malyshev
6da86acfae Merge branch 'PHP-5.5'
* PHP-5.5:
  Bug #43177: If an eval() has a parse error, the overall exit status and return code should not be affected.
  fix NEWS
2013-01-01 21:21:42 -08:00
Stanislav Malyshev
80a9a80a52 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Bug #43177: If an eval() has a parse error, the overall exit status and return code should not be affected.
  fix NEWS

Conflicts:
	main/main.c
2013-01-01 21:20:35 -08:00
Stanislav Malyshev
36e19c9cab Bug #43177: If an eval() has a parse error, the overall exit status and return code should not be affected.
Without this fix, a webpage using eval() may return code 500.  That might display
fine and the 500 go unnoticed, but using AJAX or wget, the 500 will cause problems.
2013-01-01 21:18:59 -08:00
Xinchen Hui
642721b38a Merge branch 'PHP-5.5' 2013-01-01 16:39:03 +08:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
831fbcf385 Happy New Year 2013-01-01 16:23:31 +08:00
Pierrick Charron
ae5d86270f Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #63874 (Segfaul if php_strip_whitespace has heredoc)
2012-12-29 23:16:53 -05:00
Pierrick Charron
8228597ecc Fixed bug #63874 (Segfaul if php_strip_whitespace has heredoc)
T_END_HEREDOC don't carry a token value anymore since commit 4cf90e06c
Bugfix by Nikita for bug #60097
2012-12-29 23:11:37 -05:00
Pierrick Charron
663434cd76 Merge branch 'PHP-5.3' into PHP-5.4 2012-12-26 10:17:37 -05:00
Pierrick Charron
b35ffdeae1 Revert "Remove a useless memory write in zend_llist_del_element"
This reverts commit fad960a404 as
required by Stas and Christopher
2012-12-26 10:13:56 -05:00
Pierrick Charron
d87ad19683 Merge branch 'PHP-5.5'
* PHP-5.5:
  Remove a useless memory write in zend_llist_del_element
2012-12-25 20:59:38 -05:00
Pierrick Charron
5a97c30efe Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Remove a useless memory write in zend_llist_del_element
2012-12-25 20:59:20 -05:00
Pierrick Charron
c12ab5c306 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove a useless memory write in zend_llist_del_element
2012-12-25 20:57:21 -05:00
Pierrick Charron
fad960a404 Remove a useless memory write in zend_llist_del_element
The zend_llist_element *next pointer is not necessary and removing
it will also remove a write on memory
2012-12-25 20:45:24 -05:00
Dmitry Stogov
ba6317b05e Merge branch 'PHP-5.5'
* PHP-5.5:
  spelling
2012-12-25 16:24:09 +04:00
Dmitry Stogov
8e6bf9e5e5 spelling 2012-12-25 16:23:52 +04:00
Dmitry Stogov
245dbb043e Merge branch 'PHP-5.5'
* PHP-5.5:
  spelling
2012-12-25 16:22:22 +04:00
Dmitry Stogov
7625a3b3b4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  spelling
2012-12-25 16:22:07 +04:00
Dmitry Stogov
7e2629635b spelling 2012-12-25 16:21:25 +04:00
Dmitry Stogov
8728ca65c6 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed ZTS build
2012-12-25 13:39:13 +04:00
Dmitry Stogov
016f3c8610 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed ZTS build
2012-12-25 13:39:02 +04:00
Dmitry Stogov
f0b459b7c4 Fixed ZTS build 2012-12-25 13:38:14 +04:00
Dmitry Stogov
f3ea497377 Merge branch 'PHP-5.5'
* PHP-5.5:
  Removed deprecated fields
2012-12-25 10:50:35 +04:00
Dmitry Stogov
bc0425c025 Removed deprecated fields 2012-12-25 10:47:43 +04:00
Dmitry Stogov
3b17a09017 Merge branch 'PHP-5.5'
* PHP-5.5:
  Traits refactoring
2012-12-25 10:34:07 +04:00
Dmitry Stogov
b8c719c068 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Traits refactoring
2012-12-25 10:33:01 +04:00
Dmitry Stogov
3f8c729e69 Traits refactoring 2012-12-25 10:23:08 +04:00
Nikita Popov
fd25d48494 Merge branch 'PHP-5.5' 2012-12-24 00:30:26 +01:00
Nikita Popov
be7b0bc3ec Implement Generator::throw() method
Generator::throw($exception) throws an exception into the generator. The
exception is thrown at the current point of suspension within the generator.
It basically behaves as if the current yield statement were replaced with
a throw statement and the generator subsequently resumed.
2012-12-24 00:27:55 +01:00
Nikita Popov
1f4c71b760 Merge branch 'PHP-5.5' 2012-12-21 17:34:14 +01:00
Nikita Popov
14f133036c Fix crash when last yielded value is a closure
If zend_generator_close is called from within zend_generator_resume (e.g.
due to a return statement) then all the EGs will still be using the values
from the generator. That's why the stack frame has to be the last thing
that is dtored, otherwise some other dtor that is using
EG(current_execute_data) might access the already freed memory segment.
This was the case with the closure dtor.

The fix is to move the dtors for key and value to the start of the handler.
This way the stack frame is the last thing that is freed.
2012-12-21 17:28:20 +01:00
Nikita Popov
4509016309 Merge branch 'PHP-5.5' 2012-12-21 01:58:29 +01:00
Nikita Popov
ffb848b275 Fix bug #63822: Crash when using closures with ArrayAccess
op_array->T was used after the closure's op_array was already freed. This just
swaps the freeing order.
2012-12-21 01:56:37 +01:00
Nikita Popov
68730388ae Merge branch 'PHP-5.5' 2012-12-20 20:36:06 +01:00
Nikita Popov
3e78c6ad25 Do not add a ref to EX(object) on generator clone
If a ref has to be added it will be already added while walking the call
slots.
2012-12-20 20:33:18 +01:00
Nikita Popov
0e781e2309 Merge branch 'PHP-5.5' 2012-12-19 15:23:52 +01:00
Nikita Popov
2768315856 Add missing zend_do_free call
This is a followup to d53f1bf8ab. When the yield *statement* is used its
return value still needs to be freed.
2012-12-19 15:21:34 +01:00
Nikita Popov
5f7c478d53 Merge branch 'PHP-5.5' 2012-12-18 21:41:55 +01:00
Nikita Popov
d53f1bf8ab Fix leak when generator ignores sent value
When the return value of yield wasn't used it was leaked.

This is fixed by using a TMP_VAR return value instead of VAR. TMP_VARs are
automatically freed when they aren't used.
2012-12-18 21:39:02 +01:00
Xinchen Hui
210d428f99 ixed bug that exception won't be catched
Related failed test Zend/tests/bug35437.phpt (after he latest
execute_data improvement, run with non CALL vm kind)
2012-12-18 15:34:47 +08:00
Xinchen Hui
d3ec9ceb25 Revert "Fixed bug that exception won't be catched"
This reverts commit 28db07a0e3.

Unexpected vm kind change
2012-12-18 15:27:54 +08:00
Xinchen Hui
28db07a0e3 Fixed bug that exception won't be catched
related failed test Zend/tests/bug35437.phpt (after he latest
execute_data improvement, run with non CALL vm kind)
2012-12-18 15:20:58 +08:00
Xinchen Hui
72f7543668 Merge branch 'PHP-5.5' 2012-12-14 17:27:21 +08:00
Xinchen Hui
a73a6be764 Fix warning of no return in non-void function 2012-12-14 17:26:42 +08:00
Xinchen Hui
3acc729707 Merge branch 'PHP-5.5' 2012-12-14 17:23:07 +08:00
Xinchen Hui
9fb5cfdeb1 Fixed warning of no return in non-void funciton 2012-12-14 17:21:43 +08:00
Xinchen Hui
359d91a807 Add test for bug #63741 2012-12-14 16:52:56 +08:00
Xinchen Hui
a4678099a1 Add test for bug #63741 2012-12-14 16:51:34 +08:00
Dmitry Stogov
ec4ff07415 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed uninitialized EX(call)->called_scope
2012-12-14 12:11:23 +04:00
Dmitry Stogov
e65b966aac Fixed uninitialized EX(call)->called_scope 2012-12-14 12:10:29 +04:00
Johannes Schlüter
f8a2407655 Merge branch 'PHP-5.5' 2012-12-13 22:50:55 +01:00
Johannes Schlüter
2098cc7e9d Merge branch 'PHP-5.4' into PHP-5.5 2012-12-13 22:45:47 +01:00
Johannes Schlüter
ef37055c34 Merge branch 'PHP-5.3' into PHP-5.4 2012-12-13 22:40:23 +01:00
Johannes Schlüter
a11606b18f Fix Bug #63762 Sigsegv when Exception::$trace is changed by user 2012-12-13 22:39:35 +01:00
Dmitry Stogov
432902a875 Merge branch 'PHP-5.5'
* PHP-5.5:
  Removed unreachable code
2012-12-13 17:51:41 +04:00
Dmitry Stogov
d5c2da5756 Removed unreachable code 2012-12-13 17:51:04 +04:00
Dmitry Stogov
7dd16bcff4 Merge branch 'PHP-5.5'
* PHP-5.5:
  Removed unnecessary checks
2012-12-13 17:30:39 +04:00
Dmitry Stogov
438cd86378 Removed unnecessary checks 2012-12-13 17:29:30 +04:00
Dmitry Stogov
cc118f78d7 Merge branch 'PHP-5.5'
* PHP-5.5:
  Removed redundand checks from release build
2012-12-13 14:47:23 +04:00
Dmitry Stogov
ff1e1d7a8e Removed redundand checks from release build 2012-12-13 14:46:44 +04:00
Dmitry Stogov
7b84d129d7 Merge branch 'PHP-5.5'
* PHP-5.5:
  An exception thrown in try or catch block is disacarded by return statement in finally block.
2012-12-13 02:52:23 +04:00
Dmitry Stogov
6b0b4bf8eb An exception thrown in try or catch block is disacarded by return statement in finally block. 2012-12-13 02:48:51 +04:00
Dmitry Stogov
e7364e14da Merge branch 'PHP-5.5'
* PHP-5.5:
  Restored proper generators behaviour in conjunction with "finally". (Nikita)
2012-12-12 17:50:01 +04:00
Dmitry Stogov
9c96fe52d9 Restored proper generators behaviour in conjunction with "finally". (Nikita) 2012-12-12 17:47:55 +04:00
Dmitry Stogov
2025021ed5 Merge branch 'PHP-5.5'
* PHP-5.5:
  - generators API exported for extensions - improved RETURN sequence to avoid redundant check if op_array is a generator
2012-12-11 17:28:09 +04:00
Dmitry Stogov
a9a5f7aca6 - generators API exported for extensions
- improved RETURN sequence to avoid redundant check if op_array is a generator
2012-12-11 17:25:32 +04:00