summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed zend_read_static_propertyXinchen Hui2018-08-141-1/+1
|
* Fix length to copyAnatol Belski2018-07-311-1/+1
|
* 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).
* Fixed reference-counting in zend_parse_arg_str_weak()Dmitry Stogov2018-07-061-4/+5
|
* Avoid useless checks in object_init()Dmitry Stogov2018-07-061-2/+3
|
* Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized ↵Dmitry Stogov2018-07-041-1/+1
| | | | | | | 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.
* Avoid string comparisons for magic methods (all magic methods start with "__")Dmitry Stogov2018-07-021-0/+7
|
* Add zend_update_static_property_ex APINikita Popov2018-06-291-26/+21
| | | | | And cleanup the implementation to perform a normal by-value assignment.
* Add zend_read_static_property_ex APINikita Popov2018-06-291-4/+11
| | | | For symmetry with zend_read_property_ex.
* Removed INIT_OVERLOADED_CLASS... macrosDmitry Stogov2018-06-291-1/+1
|
* Fixed ZTS race condition (zend_class_entry->ce_flags of internal classes ↵Dmitry Stogov2018-06-271-52/+28
| | | | must not be modified, because internal class enties are shared between threads)
* Lazy function copying from op_cache SHM into process memoryDmitry Stogov2018-06-251-6/+7
|
* Micro-optimizationDmitry Stogov2018-06-251-24/+14
|
* Fixed bug #76509Nikita Popov2018-06-251-13/+4
| | | | | | | | | | | In PHP static properties are shared between inheriting classes, unless they are explicitly overwritten. However, because this functionality was implemented using reference, it was possible to break the implementation by reassigning the static property reference. This is fixed by switching the implementation from using references to using INDIRECTs, which cannot be affected by userland code.
* Removed "dead" code (zend_hash_update() never fails)Dmitry Stogov2018-06-011-37/+44
|
* Removed useless zval_ptr_dtor()Dmitry Stogov2018-05-291-4/+0
|
* Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-18/+18
| | | | where we sure about string persistence.
* Merge branch 'PHP-7.2'Anatol Belski2018-05-201-0/+1
|\ | | | | | | | | * PHP-7.2: Fixed bug #76337
| * Fixed bug #76337xKhorasan2018-05-201-0/+1
| |
* | Avoid useless checks, using zend_string_efree(), in cases where the string ↵Dmitry Stogov2018-05-081-9/+9
| | | | | | | | is known to be a temporary allocated zend_string.
* | zend_is_callable() improvementDmitry Stogov2018-05-031-31/+16
| |
* | Merge branch 'PHP-7.2'Nikita Popov2018-04-261-0/+1
|\ \ | |/
| * Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-04-261-0/+1
| |\
| | * Fix memory leak in zend_disable_class()shiguangqi2008@gmail.com2018-04-261-0/+1
| | |
| | * year++Xinchen Hui2018-01-021-1/+1
| | |
| * | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Add is_countable functionGabriel Caruso2018-03-111-0/+17
| | | | | | | | | | | | RFC: https://wiki.php.net/rfc/is-countable
* | | Improved ZPP to reduce amount of generated code.Dmitry Stogov2018-02-161-17/+115
| | |
* | | Use bool instead of boolean while throwing a type errorGabriel Caruso2018-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHP requires boolean typehints to be written "bool" and disallows "boolean" as an alias. This changes the error messages to match the actual type name and avoids confusing messages like "must be of type boolean, boolean given". This a followup to ce1d69a1f6dcf15d43029301059c25e5bc09a577, which implements the same change for integer->int.
* | | Use int instead of integer in type errorsGabriel Caruso2018-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
* | | A cheaper way to reset type flags.Dmitry Stogov2018-01-171-1/+1
| | |
* | | cleanupDmitry Stogov2018-01-101-3/+0
| | |
* | | Trailing whitespacesGabriel Caruso2018-01-031-5/+5
| | | | | | | | | | | | Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
* | | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is ↵Dmitry Stogov2017-12-271-6/+2
| | | | | | | | | | | | initialized if zend_fcall_info_cache.function_handler is set).
* | | Use zend_hash_find() instead of zend_hash_find_ptr() to avoid double checkDmitry Stogov2017-12-271-10/+19
| | |
* | | Add _IS_NUMBER as cast_object() target typeNikita Popov2017-12-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | convert_scalar_to_number() will now call cast_object() with an _IS_NUMBER argument, in which case the cast handler should return either an integer or floating point number, whichever is more appropriate. Previously convert_scalar_to_number() unconditionally converted objects to integers instead. Fixes bug #53033. Fixes bug #54973. Fixes bug #73108.
* | | Merge branch 'PHP-7.2'Nikita Popov2017-12-131-2/+2
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2017-12-131-2/+2
| |\ \ | | |/
| | * Fix copy-and-paste bugsLevi Morrison2017-12-131-2/+2
| | |
* | | Cleanup type conversionDmitry Stogov2017-12-071-1/+1
| | |
* | | Only functions of temporary modules have to be unregistered hereDmitry Stogov2017-11-301-1/+1
| | |
* | | Use zend_string_tolower() where it's possible (to avoid reallocations).Dmitry Stogov2017-11-301-4/+3
| | | | | | | | | | | | Allow zend_string_tolower_ex() to create parsistent strings
* | | Make sure string property/class const values are internedNikita Popov2017-11-251-0/+18
| | | | | | | | | | | | | | | This was done for user-definde class constant values, however this is also important for properties and internal classes.
* | | RC manipulation cleanup 2Xinchen Hui2017-11-021-14/+5
| | |
* | | Remove zend_get_parameters(_ex) APIsNikita Popov2017-10-301-61/+0
| | | | | | | | | | | | | | | | | | | | | zend_get_parameters_ex() has been marked as deprecated for a long time already. What zend_get_paramers() does is even more questionable under PHP7. Both functions are obsoleted by the ZPP mechanism, so I'm dropping them.
* | | Prevent reference-counting on persistent zvals (internal constants, default ↵Dmitry Stogov2017-10-301-21/+28
| | | | | | | | | | | | | | | | | | | | | properties and constants of internal classes). New macro ZVAL_COPY_OR_DUP() is used perform duplication, if necessary. This should eliminate related race-coditions in ZTS build and prevent reference-counting bugs after unclean shutdown.
* | | Extend zend_register_class_alias_ex() with additional argument to allow ↵Dmitry Stogov2017-10-271-3/+3
| | | | | | | | | | | | creating persistent or per-request aliases
* | | Extend zend_string API to avoid reallocation in zend_string_init_interned()Dmitry Stogov2017-10-191-4/+7
| | |