summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
Commit message (Collapse)AuthorAgeFilesLines
* bump year which is missed in rev 49493a2Xinchen Hui2016-01-021-1/+1
|
* bump yearXinchen Hui2015-01-151-1/+1
|
* Fixed Bug #68104 (Segfault while pre-evaluating a disabled function)Xinchen Hui2014-10-311-9/+6
|
* DLL export several APIs needed for phpdbgAnatol Belski2014-10-121-1/+1
|
* Removed useless void* parameter and replaced with zend_bool on ↵Bob Weinand2014-04-111-3/+3
| | | | zval_update_constant* functions
* Fix bug #66015 by reverting "Removed operations on constant arrays."Bob Weinand2014-04-111-1/+0
|
* Add __debugInfo() magic methodSara Golemon2014-02-171-1/+12
| | | | | | | | | | | | | | | class Foo { private $val = 'Random, meaningless data'; public function count() { return 42; } public function __debugInfo() { return ['count' => $this->count()]; } } $f = new Foo; var_dump($f);
* Bump yearXinchen Hui2014-01-031-1/+1
|
* Save one char compareXinchen Hui2013-12-171-18/+18
|
* Removed unused "pHashFunction" argument in _zend_hash_init() and family ↵Dmitry Stogov2013-11-281-1/+1
| | | | (must be 99% source compatible)
* Merge branch 'const_scalar_exprs' into PHP-5.6Bob Weinand2013-11-281-3/+2
|\ | | | | | | | | Conflicts: Zend/zend_extensions.h
| * Whitespace fixBob Weinand2013-11-011-2/+2
| |
| * converted several switches to ifs and made more opcache friendlyBob Weinand2013-11-011-30/+26
| |
| * Working commit for constant scalar expressions (with constants).Bob Weinand2013-10-311-27/+30
| | | | | | | | Tests will follow.
* | Don't check argument types for internal functions without type hintingDmitry Stogov2013-11-281-0/+13
| |
* | export more Zend APIkrakjoe2013-11-201-3/+3
|/
* Implement variadic function syntaxNikita Popov2013-09-261-7/+3
| | | | As per RFC: https://wiki.php.net/rfc/variadics
* Provide more macros for handling of interned stringsNikita Popov2013-09-131-12/+7
| | | | | | | | | | | | | * str_erealloc behaves like erealloc for normal strings, but will use emalloc+memcpy for interned strings. * str_estrndup behaves like estrndup for normal strings, but will not copy interned strings. * str_strndup behaves like zend_strndup for normal strings, but will not copy interned strings. * str_efree_rel behaves like efree_rel for normal strings, but will not free interned strings. * str_hash will return INTERNED_HASH for interned strings and compute it using zend_hash_func for normal strings.
* Merge branch 'PHP-5.4' into PHP-5.5Dmitry Stogov2013-08-291-1/+6
|\ | | | | | | | | | | | | | | | | * PHP-5.4: Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) Conflicts: NEWS
| * Fixed bug #61759 (class_alias() should accept classes with leading ↵Dmitry Stogov2013-08-291-1/+6
| | | | | | | | backslashes). (Julien)
* | Merge branch 'PHP-5.4' into PHP-5.5Xinchen Hui2013-08-291-1/+1
|\ \ | |/
| * Avoid compiler warningXinchen Hui2013-08-291-1/+1
| |
* | Merge branch 'PHP-5.4' into PHP-5.5Xinchen Hui2013-08-291-8/+9
|\ \ | |/
| * Fix bug #65579 (Using traits with get_class_methods causes segfault).Adam Harvey2013-08-281-8/+9
| | | | | | | | | | | | | | Specifically, this checks if there are trait aliases defined in the class scope before attempting to dereference the first trait alias. This handles the case where a trait alias was used in a child trait but no aliases exist in the concrete class.
* | Merge branch 'PHP-5.4' into PHP-5.5Xinchen Hui2013-06-241-2/+2
|\ \ | |/ | | | | | | Conflicts: Zend/zend_API.c
| * Fixed bug (is_callable() triggers Fatal Error)Xinchen Hui2013-06-241-2/+2
| | | | | | | | | | This bug is also exists in 5.4, and previous fix by dsp is not complete for __callStatic stituation, see test script
| * Merge branch 'pull-request/341'Stanislav Malyshev2013-06-101-1/+1
| | | | | | | | | | * pull-request/341: (23 commits) typofixes
* | Fix #65108 (is_callable() triggers Fatal Error)David Soria Parra2013-06-241-1/+1
| | | | | | | | | | We have to check if the fcall info cache contains a pointer if we use __call, otherwise we endup in a static lookup.
* | Merge branch 'pull-request/341'Stanislav Malyshev2013-06-101-1/+1
| | | | | | | | | | * pull-request/341: (23 commits) typofixes
* | Merge branch 'PHP-5.4' into PHP-5.5Xinchen Hui2013-03-211-0/+56
|\ \ | |/
| * Fixed bug #64239 (Debug backtrace changed behavior since 5.4.10 or 5.4.11)Xinchen Hui2013-03-211-0/+56
| |
* | Merge branch 'PHP-5.4' into PHP-5.5Anatol Belski2013-03-191-1/+2
|\ \ | |/ | | | | | | * PHP-5.4: fix C90 compat
| * fix C90 compatAnatol Belski2013-03-191-1/+2
| |
* | Merge branch 'PHP-5.4' into PHP-5.5Dmitry Stogov2013-03-191-2/+36
|\ \ | |/ | | | | | | | | | | | | * PHP-5.4: Fixed bug #63976 (Parent class incorrectly using child constant in class property) Conflicts: NEWS
| * Fixed bug #63976 (Parent class incorrectly using child constant in class ↵Dmitry Stogov2013-03-191-2/+36
| | | | | | | | property)
| * Happy New YearXinchen Hui2013-01-011-1/+1
| |
* | Fix wrong macro usage and add missing NEWS entryNikita Popov2013-03-151-1/+1
| |
* | Add support for non-scalar Iterator keys in foreachNikita Popov2013-03-121-0/+34
| | | | | | | | RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
* | Merge remote-tracking branch 'cataphract/zpp_improv' into PHP-5.5Gustavo Lopes2013-01-161-14/+43
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Export zend_parse_parameter()Gustavo Lopes2013-01-091-1/+1
| | |
| * | Expose zend_parse_arg() as zend_parse_parameter()Gustavo André dos Santos Lopes2012-07-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, one wants to accept several types for a given parameter. zpp has special functionality for detecting the NULL type, since the NULL type is frequently used to skip parameters. However, supporting several types is otherwise very tedious. There are many cases where this situation arises -- for instance one may want to accept an arbitrary number of integer and expect them in an array, but allow a bare integer too; one may want to accept something that will be used as an array key (which can be either and int or a string); one may want to accept integer and double numbers. A search for IS_LONG reveals many situations where this need arises. The usual solution is to fetch the argument with 'z'/'Z', check its type, and then convert the argument, e.g. with convert_to_long_ex(). As explain in the last commit, this has different behavior and generates inconsistency. Another -- even more flawed strategy --, is to try zpp with a specific format, forcing it quiet, and if it fails retrying with another form. But because zpp changes the arguments directly in the stack (for instance, using "l" converts the zval in the stack to IS_LONG), the arguments may look different after the first zpp, leaving subtle bugs. This commit also allows more complex scenarios, for instance where the expected type of one parameter depends on other parameters.
| * | zend_parse_parameters: allow ! for non pointersGustavo André dos Santos Lopes2012-07-181-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit allows getting information about whether a certain value was a NULL value by using the ! modifier together with the l/L, d and b. Example: long l; zend_bool is_null; zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l!", &l, &is_null) For the specifiers l/L, d and b, NULL values are reported as 0, 0., or false. But sometimes one wants to distinguish NULL from those other values -- for instance, to give NULL the same effect as the argument not having been passed. The usual way this problem is handled is by fetching the parameter with 'z' or 'Z', check if it is NULL and if not use convert_to_long_ex()/convert_to_double_ex(), etc. Unfortunately, this is not equivalent. convert_to_long_ex() does a cast, while zpp() is stricter. For instance, zpp will not accept 'foo' for a long argument, and it will emit a notice when encountering '5foo'. In fact, the only way to otherwise zpp semantics (without duplicating its logic) is to fetch the raw zval from the stack and check whether it's NULL (with zpp itself or its relatives) and then run zpp again. That is not an elegant solution.
* | | Happy New YearXinchen Hui2013-01-011-1/+1
| |/ |/|
* | Fixed bug #63726 (Memleak with static properties and internal/user classes)Xinchen Hui2012-12-101-0/+2
| | | | | | | | No test scripts provided (will try to find one)
* | Merge branch 'PHP-5.3' into PHP-5.4Dmitry Stogov2012-11-201-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | * PHP-5.3: Fixed bug #63468 (wrong called method as callback with inheritance) Conflicts: NEWS
| * | Fixed bug #63468 (wrong called method as callback with inheritance)Dmitry Stogov2012-11-201-1/+1
| | |
* | | Merge branch 'PHP-5.3' into PHP-5.4Dmitry Stogov2012-09-211-1/+8
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | * PHP-5.3: Fixed bug #63111 (is_callable() lies for abstract static method) Conflicts: NEWS
| * | Fixed bug #63111 (is_callable() lies for abstract static method)Dmitry Stogov2012-09-211-1/+8
| | |
* | | Merge branch 'PHP-5.3' into PHP-5.4Xinchen Hui2012-09-151-1/+3
|\ \ \ | |/ /
| * | Fixed bug #63093 (Segfault while load extension failed in zts-build).Xinchen Hui2012-09-151-1/+3
| | |