summaryrefslogtreecommitdiff
path: root/Zend/zend_constants.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Use better function"Nikita Popov2021-03-221-1/+1
| | | | | | | This reverts commit 9162116a854fe37ce2c07a75b5ef7d797acba0ee. This causes many "__HALT_COMPILER(); must be declared in a phar" errors in phar tests on windows.
* Fix const warningNikita Popov2021-03-221-1/+1
|
* Use better functionDmitry Stogov2021-03-221-1/+1
|
* Added Inheritance Cache.Dmitry Stogov2021-02-091-1/+1
| | | | | | | | | | This is a new transparent technology that eliminates overhead of PHP class inheritance. PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request. Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking). The patch shows 8% improvement on Symphony "Hello World" app.
* Replace zend_bool uses with boolNikita Popov2021-01-151-2/+2
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Make constant redeclaration a warningNikita Popov2020-09-211-1/+1
| | | | | | We missed the change to make this an Error exception in PHP 8, but at least elevate it to a warning, to avoid a notice -> exception jump at a later time.
* Improve type declarations for Zend APIsGeorge Peter Banyard2020-08-281-9/+6
| | | | | | | | | Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002
* Review the usage of apostrophes in error messagesMáté Kocsis2020-07-101-8/+8
| | | | Closes GH-5590
* Don't index NULL pointer when fetching non-existent constantNikita Popov2020-01-281-4/+7
|
* Add support for deprecating constantsNikita Popov2020-01-171-30/+47
| | | | | | | | | | | Internal constants can be marked as CONST_DEPRECATED, in which case accessing them will throw a deprecation warning. For now this is only supported on global constants, not class constants. Complain to me if you need to deprecate a class constant... Closes GH-5072.
* Move undefined constant error into get_constant_exNikita Popov2020-01-101-7/+13
| | | | | All the other error conditions are already handled in there, so this one should be as well.
* Constify some char* arguments or return values of ZEND_APItwosee2019-06-121-2/+2
| | | | Closes GH-4247.
* Merge branch 'PHP-7.4'Johannes Schlüter2019-02-121-1/+3
|\
| * Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-02-121-1/+3
| |\
| | * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-02-121-1/+3
| | |\
| | | * Fixed bug #75546DanielCiochiu2019-02-121-1/+3
| | | | | | | | | | | | | | | | | | | | By respecting the SILENT flag when checking the visibility of a class constant.
| | | * year++Xinchen Hui2018-01-021-1/+1
| | | |
| | * | Future-proof email addressesZeev Suraski2018-11-011-2/+2
| | | |
* | | | Merge branch 'PHP-7.4'Peter Kokot2019-02-031-11/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Remove local variables
| * | | Remove local variablesPeter Kokot2019-02-031-11/+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
| | | |
* | | | Remove bareword fallback for constantsNikita Popov2019-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Access to undefined constants will now always result in an Error exception being thrown. This required quite a few test changes, because there were many buggy tests that unintentionally used bareword fallback in combination with error suppression.
* | | | Remove support for case-insensitive constantsNikita Popov2019-01-311-127/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The only remaining case-insensitive constants are null, true and false, which are handled explicitly. In the future we may convert them from constants to reserved keywords.
* | | | Adios, yearly copyright rangesZeev Suraski2019-01-301-1/+1
|/ / /
* | | Clean up unnecessary ternary expressions and simplify some returnsGabriel Caruso2018-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | - Simplify conditions - Use ZEND_HASH_APPLY_* instead of hard-coded booleans - Use ZEND_NORMALIZE_BOOL - Drop sign in favor of ZEND_NORMALIZE_BOOL
* | | Update email addresses. We're still @Zend, but future proofing it...Zeev Suraski2018-11-011-2/+2
|/ /
* | Fixed ZTS buildKalle Sommer Nielsen2018-07-261-1/+1
| |
* | Pack zend_constant.flags and zend_constant.module_number into reserved space ↵Dmitry Stogov2018-07-261-22/+17
| | | | | | | | inside zend_constant.value.
* | 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.
* | Reduce overhead of case-insensitive constants deprecation for "fast path"Dmitry Stogov2018-07-171-50/+0
| |
* | Deprecate case-insensitive constantsNikita Popov2018-07-161-14/+78
| | | | | | | | RFC: https://wiki.php.net/rfc/case_insensitive_constant_deprecation
* | Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized ↵Dmitry Stogov2018-07-041-2/+2
| | | | | | | | | | | | | | 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.
* | API cleanup. Removed unused functions (kept compatibility macros).Dmitry Stogov2018-07-041-1/+1
| |
* | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-5/+9
| | | | | | | | where we sure about string persistence.
* | Avoid useless checks, using zend_string_efree(), in cases where the string ↵Dmitry Stogov2018-05-081-2/+2
| | | | | | | | is known to be a temporary allocated zend_string.
* | Moved IS_CONSTANT_VISITED_MARK, used for protection from recursive ↵Dmitry Stogov2018-01-181-10/+19
| | | | | | | | self-referencing class constants, from zval.u1.v.type_flags into zval.u2.access_flags.
* | year++Xinchen Hui2018-01-021-1/+1
| |
* | Use zend_hash_find() instead of zend_hash_find_ptr() to avoid double checkDmitry Stogov2017-12-271-4/+9
| |
* | Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
| |
* | Intern string constant valuesDmitry Stogov2017-12-071-1/+1
| |
* | Wrap functions necessary only for ZTS build with #ifdefDmitry Stogov2017-12-071-7/+6
| |
* | Use zend_string_equal*() API for zend_string equality check instead of ↵Dmitry Stogov2017-12-041-2/+1
| | | | | | | | direct memcmp() usage.
* | Use cheaper functionsDmitry Stogov2017-12-041-13/+17
| |
* | Intern persistent constant names in first placeDmitry Stogov2017-11-301-9/+5
| |
* | Use zend_string_tolower() where it's possible (to avoid reallocations).Dmitry Stogov2017-11-301-2/+1
| | | | | | | | Allow zend_string_tolower_ex() to create parsistent strings
* | Revert "Use zend_get_executed_filename_ex"Xinchen Hui2017-11-021-3/+5
| | | | | | | | This reverts commit 2a37625c20032d54af55a88d54d1a3a1ecc068d1.
* | Use zend_get_executed_filename_exXinchen Hui2017-11-011-5/+3
| |
* | Always use IS_CONSTANT_AST (IS_CONSTANT is removed).Dmitry Stogov2017-10-101-1/+1
|/
* further sync for vim mode linesAnatol Belski2017-07-041-0/+2
|
* shutdown_executor() refactoring (reuse opcache fast request shutdown code)Dmitry Stogov2017-06-221-24/+0
|