summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge branch 'PHP-7.4'Nikita Popov2019-10-081-0/+3
|\ \ \ | |/ /
| * | Handle "non well formed" exception during ZPPNikita Popov2019-10-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if the "non well formed" notice was converted into an exception we'd still end up executing the function. Also drop the now unnecessary EG(exception) checks in the engine. Additionally remote a bogus exception in zend_is_callable: It should only be writing to error, but not directly throwing.
* | | Comparison cleanup:Dmitry Stogov2019-10-071-146/+45
| | | | | | | | | | | | | | | - introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval) - remove compare_objects() object handler, and keep only compare() handler
* | | Convert some notices to warningsNikita Popov2019-10-021-2/+2
| | | | | | | | | | | | Part of https://wiki.php.net/rfc/engine_warnings.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-09-261-0/+9
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-09-261-0/+9
| |\ \ | | |/
| | * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-09-261-0/+9
| | |\
| | | * Fix memory leak with ** on array operandsNikita Popov2019-09-261-0/+9
| | | |
| | | * Trim trailing whitespace in source code filesPeter Kokot2018-10-131-2/+2
| | | |
| | * | Future-proof email addressesZeev Suraski2018-11-011-3/+3
| | | |
* | | | Merge branch 'PHP-7.4'Peter Kokot2019-06-281-2/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Remove HAVE_STRCOLL check
| * | | Remove HAVE_STRCOLL checkPeter Kokot2019-06-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strcoll function is defined in the C89 standard and should be on today's systems always available via the <string.h> header. https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3 - Remove also SKIPIF strcoll check in test
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-201-0/+3
|\ \ \ \ | |/ / /
| * | | Disable float division by zero sanitizer for div_functionNikita Popov2019-06-201-0/+3
| | | | | | | | | | | | | | | | | | | | We intentionally divide by zero here and want to get IEEE-754 semantics.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-191-3/+4
|\ \ \ \ | |/ / /
| * | | Fix signed shift UBNikita Popov2019-06-191-1/+2
| | | |
| * | | Avoid overflow UB in is_numeric_stringNikita Popov2019-06-191-2/+2
| | | | | | | | | | | | | | | | | | | | We intentionally overflow the signed space here, so make this an unsigned variable and only cast to signed at the end.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-111-2/+2
|\ \ \ \ | |/ / /
| * | | Support full variance if autoloading is usedNikita Popov2019-06-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track of delayed variance obligations and check them after linking a class is otherwise finished. Obligations may either be unresolved method compatibility (because the necessecary classes aren't available yet) or open parent/interface dependencies. The latter occur because we allow the use of not fully linked classes as parents/interfaces now. An important aspect of the implementation is we do not require classes involved in variance checks to be fully linked in order for the class to be fully linked. Because the involved types do have to exist in the class table (as partially linked classes) and we do check these for correct variance, we have the guarantee that either those classes will successfully link lateron or generate an error, but there is no way to actually use them until that point and as such no possibility of violating the variance contract. This is important because it ensures that a class declaration always either errors or will produce an immediately usable class afterwards -- there are no cases where the finalization of the class declaration has to be delayed until a later time, as earlier variants of this patch did. Because variance checks deal with classes in various stages of linking, we need to use a special instanceof implementation that supports this, and also introduce finer-grained flags that tell us which parts have been linked already and which haven't. Class autoloading for variance checks is delayed into a separate stage after the class is otherwise linked and before delayed variance obligations are processed. This separation is needed to handle cases like A extends B extends C, where B is the autoload root, but C is required to check variance. This could end up loading C while the class structure of B is in an inconsistent state.
* | | | Merge branch 'PHP-7.4'Dmitry Stogov2019-06-061-1/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | * PHP-7.4: Support for exceptions thrown during "Array to string conversion" error processing Reduce over-specialization for quite seldom instructions
| * | | Support for exceptions thrown during "Array to string conversion" error ↵Dmitry Stogov2019-06-061-1/+2
| | | | | | | | | | | | | | | | processing
* | | | Merge branch 'PHP-7.4'Dmitry Stogov2019-06-061-14/+17
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Cheaper checks for exceptions thrown from __toString()
| * | | Cheaper checks for exceptions thrown from __toString()Dmitry Stogov2019-06-061-15/+18
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-051-11/+40
|\ \ \ \ | |/ / /
| * | | Allow exceptions in __toString()Nikita Popov2019-06-051-11/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
* | | | Remove get() object handlerNikita Popov2019-05-291-42/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that set() is gone, there is little point in keeping get(), as it is essentially just a different way of writing cast_object() now. Closes GH-4202.
* | | | Remove set() object handlerNikita Popov2019-05-291-24/+2
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-05-241-2/+2
|\ \ \ \ | |/ / /
| * | | Implement basic variance supportNikita Popov2019-05-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a minimal variance implementation: It does not support any cyclic type dependencies. Additionally the preloading requirements are much more restrictive than necessary. Hopefully we can relax these in the future.
* | | | Merge branch 'PHP-7.4'Dmitry Stogov2019-04-041-7/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Make is_identical() functions return zend_bool (instead of int)
| * | | Make is_identical() functions return zend_bool (instead of int)Dmitry Stogov2019-04-041-7/+2
| | | |
* | | | Refactor zend_object_handlers API to pass zend_object* and zend_string* ↵Dmitry Stogov2019-02-041-17/+19
|/ / / | | | | | | | | | insted of zval(s).
* | | Remove local variablesPeter Kokot2019-02-031-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | | Adios, yearly copyright rangesZeev Suraski2019-01-301-1/+1
| | |
* | | Update email addresses. We're still @Zend, but future proofing it...Zeev Suraski2018-11-011-3/+3
| | |
* | | Introduce get_properties_for() handlerNikita Popov2018-10-101-24/+12
| | | | | | | | | | | | | | | This handler allows getting the object properties for a particular purpose, such as array casting, serialization, etc.
* | | Remove dead code (only IS_ARRAY may relive ↵Dmitry Stogov2018-09-271-11/+9
| | | | | | | | | | | | zendi_convert_scalar_to_number()), and micro-optimization.
* | | Replace ZEND_ACC_ANON_BOUND, ZEND_ACC_UNRESOLVED_PARENT and ↵Dmitry Stogov2018-09-181-2/+2
| | | | | | | | | | | | ZEND_ACC_UNRESOLVED_INTERFACES with single ZEND_ACC_LINKED.
* | | Remove unused ZEND_FILE_LINE in i_zval_ptr_dtorNikita Popov2018-09-161-2/+2
| | |
* | | Merge branch 'PHP-7.3'Remi Collet2018-08-301-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: fix double cast to int on 32-bit
| * | Merge branch 'PHP-7.2' into PHP-7.3Remi Collet2018-08-301-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: fix double cast to int on 32-bit
| | * Merge branch 'PHP-7.1' into PHP-7.2Remi Collet2018-08-301-1/+1
| | |\ | | | | | | | | | | | | | | | | * PHP-7.1: fix double cast to int on 32-bit
| | | * fix double cast to int on 32-bitRemi Collet2018-08-301-1/+1
| | | |
| | | * year++Xinchen Hui2018-01-021-1/+1
| | | |
| | * | year++Xinchen Hui2018-01-021-1/+1
| | | |
* | | | Keep information about unresolved interfaces in ↵Dmitry Stogov2018-08-231-6/+12
|/ / / | | | | | | | | | | | | | | | | | | zend_class_entry->interface_names. Move interface implementation code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_INTERFACE and ZEND_VERIFY_ABSTRACT_CLASS opcodes.
* | | Split add/sub_function(s) into fast and slow partsDmitry Stogov2018-07-251-99/+132
| | |
* | | Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* | | API cleanup.Dmitry Stogov2018-07-231-3/+3
| | | | | | | | | | | | | | | Removed useless filename and lineno arguments, used in DEBUG build. The patch doesn't break source compatibility of public API (only binary compatibility).
* | | Removed deprecated conditionDmitry Stogov2018-07-101-1/+1
| | |