1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

13552 Commits

Author SHA1 Message Date
Anatol Belski d664d1e959 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix C++11 and up compatibility for zend_finite and more
2018-07-08 20:34:58 +02:00
Anatol Belski 545a29d0cb Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix C++11 and up compatibility for zend_finite and more
2018-07-08 20:32:52 +02:00
Anatol Belski ad790bea2e Fix C++11 and up compatibility for zend_finite and more
C++11 puts isfinite, isinf, isnan and a lot of other stuff into the
std namespace. Thus, if a C++11 or newer source is compiled, these
symbols won't be available. A good solution would be to include cmath,
but depending on a particular compiler that might remove even more
stuff from the global namespace, so such a fix should only target master.
For now, just keep these defines same for C++11 and upper, as the actual
C++ code should use symbols from the std namespace anyway. This
especially concerns older GCC versions like at least 4 and 5, which are
used by default in the LTS Linux distros.
2018-07-08 20:20:08 +02:00
Nikita Popov 04e3523b7d Warn if continue is used on switch
Supersedes RFC https://wiki.php.net/rfc/continue_on_switch_deprecation
by generating a warning instead of deprecating and removing this
functionality.
2018-07-07 11:12:48 +02:00
Xinchen Hui 4c67f7e012 Forgotten one replacement 2018-07-06 19:18:06 +08:00
Xinchen Hui 9d1e9b73c5 rename ref_dtor_func to rc_dtor_func 2018-07-06 19:15:26 +08:00
Xinchen Hui f9297387f4 Rename zval_dtor_func and ref_dotr_func 2018-07-06 18:47:30 +08:00
Xinchen Hui e3355ac5ec Revert "Rename _zval_dtor_func to _ref_dtor_func"
This reverts commit a362ae6b12.
2018-07-06 18:37:45 +08:00
Xinchen Hui a362ae6b12 Rename _zval_dtor_func to _ref_dtor_func 2018-07-06 18:32:27 +08:00
Dmitry Stogov bd8e76761f Use zval_ptr_dtor() instead of zval_dtor() in in-place array/object conversion functions 2018-07-06 12:07:13 +03:00
Dmitry Stogov 41db5f73ce Fixed reference-counting in zend_parse_arg_str_weak() 2018-07-06 03:11:20 +03:00
Dmitry Stogov dcf7592076 Optimize array to object casting 2018-07-06 03:10:05 +03:00
Dmitry Stogov ca40664ad6 Conversion related optimizations 2018-07-06 01:26:43 +03:00
Dmitry Stogov 85b2bc38e1 Optimize object to array casting 2018-07-06 01:25:24 +03:00
Dmitry Stogov 8361c0a9a7 Avoid useless checks in object_init() 2018-07-06 01:24:15 +03:00
Dmitry Stogov 265c3ed6cf Fixed incorrrecr zval_dtor() usage to replace value of argument passed by reference, that may lead to memory leaks. 2018-07-05 10:57:49 +03:00
Dmitry Stogov 6c0ddcda47 Removed legacy zval_dtor() usage. It doesn't work with zvals with refcount == 0, anyway. 2018-07-05 02:28:00 +03:00
Dmitry Stogov 5898583e94 Fixed some incorrect zval_dtor() usages 2018-07-04 23:48:39 +03:00
Dmitry Stogov 3a8f26060c Argument unpacking with Traversables and non-integer keys.
Changed error message, added UPGRADING note and test.
2018-07-04 22:34:36 +03:00
Kalle Sommer Nielsen 6337af09dc Added test case for bug #76539 for master only as the behavior has been restored 2018-07-04 19:50:34 +02:00
Dmitry Stogov 4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Dmitry Stogov af341213f7 se zval_ptr_dtor_str() instead of zend_string_release_ex(Z_STR(*), 0) 2018-07-04 12:08:07 +03:00
Dmitry Stogov 5f19816f53 concat_function() micro optimization 2018-07-04 12:05:51 +03:00
Dmitry Stogov d84ef96742 SEND_UNPACK should throw exception on Traversable with non-integer keys 2018-07-04 09:35:12 +03:00
Kalle Sommer Nielsen c49f0fd9ac Fixed bug #76501 (Funny message with fatal error) 2018-07-04 03:04:31 +02:00
Dmitry Stogov 7eb045d31a API cleanup. Removed unused functions (kept compatibility macros). 2018-07-04 00:50:57 +03:00
Nikita Popov e080fb6d92 Do not continue extract()ing after an exception has been thrown
Make behavior consistent with a loop of normal assignments.

This is not a big issue now, because $this is the only case that
may generate an error. However typed references introduce additional
error conditions, which would be silenced by this kind of behavior.
2018-07-03 22:45:35 +02:00
Dmitry Stogov 004a0568f4 Eliminated REFCOUNTED checks on persistent constant operands in SEND_VAL[_EX] and QM_ASSIGN. 2018-07-03 13:10:22 +03:00
Dmitry Stogov 177c7e3a72 Merge branch 'bug63217'
* bug63217:
  Another fix for bug #63217
  Partial revert of 30156d588c
2018-07-03 12:58:50 +03:00
Dmitry Stogov 3fd97a5b1f Better hot/cold code splitting 2018-07-03 11:07:39 +03:00
Dmitry Stogov 28b03f9605 Another fix for bug #63217 2018-07-03 01:09:58 +03:00
Dmitry Stogov 57af94c8b9 Partial revert of 30156d588c 2018-07-02 20:54:44 +03:00
Rudi Theunissen 30156d588c Fixed bug #63217
Don't automatically convert literal string keys to integers on
array access, as we may be dealing with an ArrayAccess object,
rather than a plain array.
2018-07-02 16:41:59 +02:00
Dmitry Stogov 091d77f28a Avoid magic method hash lookups 2018-07-02 17:03:50 +03:00
Dmitry Stogov 43aca3118a Avoid string comparisons for magic methods (all magic methods start with "__") 2018-07-02 17:03:02 +03:00
Nikita Popov 8faa6ef30e Add test for void return type on internal function 2018-06-30 20:14:15 +02:00
Nikita Popov 7909d4532c Merge branch 'PHP-7.2' 2018-06-30 20:11:59 +02:00
Nikita Popov 0f1726e45d Merge branch 'PHP-7.1' into PHP-7.2 2018-06-30 20:11:39 +02:00
Nikita Popov 9b0df97a42 Fix handling of void return type on internal functions 2018-06-30 20:10:57 +02:00
Nikita Popov 43c533d799 Merge branch 'PHP-7.2' 2018-06-29 23:23:08 +02:00
Nikita Popov deb1bad80f Merge branch 'PHP-7.1' into PHP-7.2 2018-06-29 23:23:02 +02:00
Nikita Popov 962706d16c Fix nullable type pretty-printing 2018-06-29 23:22:41 +02:00
Nikita Popov 7ac06d66d4 Add zend_update_static_property_ex API
And cleanup the implementation to perform a normal by-value
assignment.
2018-06-29 22:56:59 +02:00
Nikita Popov 813b6fc950 Add zend_read_static_property_ex API
For symmetry with zend_read_property_ex.
2018-06-29 22:49:15 +02:00
Nikita Popov 10b484e624 Fix build
These were changed in 6e77a60a75.
2018-06-29 22:44:58 +02:00
Dmitry Stogov 6e77a60a75 Removed INIT_OVERLOADED_CLASS... macros 2018-06-29 14:41:35 +03:00
Dmitry Stogov d6ab163be8 cleanup 2018-06-29 12:35:14 +03:00
Nikita Popov 17afe6430f Fixed bug #76439 2018-06-27 14:15:56 +02:00
Dmitry Stogov 716bbd3480 Remove duplicated code (keep destroy_zend_function() for compatibility) 2018-06-27 14:54:42 +03:00
Dmitry Stogov 56450c6e65 Moved very rare exception check into a single place. 2018-06-27 13:34:15 +03:00