History log of /PHP-8.4/Zend/zend_builtin_functions.c (Results 1 – 25 of 878)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 706bcdbc 18-Sep-2024 Ilija Tovilo

Fix printing backtrace of fake generator frame

Fixes GH-15851
Closes GH-15952


# 58aa6fc8 19-May-2023 Arnaud Le Blanc

Lazy objects

RFC: https://wiki.php.net/rfc/lazy-objects

Closes GH-15019


# b6d7c011 19-Aug-2024 Ilija Tovilo

Fix virtual properties in get_class_vars() (GH-15494)

Fixes GH-15456


# 4c5767f6 16-Aug-2024 Juliette <663378+jrfnl@users.noreply.github.com>

PHP 8.4 | Exit as function: fix incorrect parameter name (#15433)

Follow up on 13483

As previously reported in https://github.com/php/php-src/pull/13483#discussion_r1718546927:

PHP 8.4 | Exit as function: fix incorrect parameter name (#15433)

Follow up on 13483

As previously reported in https://github.com/php/php-src/pull/13483#discussion_r1718546927:

> The parameter names seem to be incorrect.
>
> It should be `$status`, not `$code`.
>
> The RFC explicitly uses that parameter name in the proposal: https://wiki.php.net/rfc/exit-as-function#proposal
>
> It is also the name already used in the [manual](https://www.php.net/exit).
>
> Lastly, the parameter name `$status` better covers what can be passed: either a status _message_ or a status _code_.
> While `$code` would read pretty weird when passing a message:
> ```php
> exit(code: 'message');
> ```

This commit attempts to fix this.

Includes adding a test for exit/die using a named argument.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>

show more ...


# a79c70f5 14-Aug-2024 Gina Peter Banyard

[RFC] Convert exit (and die) from language constructs to functions (#13483)

RFC: https://wiki.php.net/rfc/exit-as-function


# 1e3d9189 09-Aug-2024 Gina Peter Banyard

ext/core: Deprecate passing E_USER_ERROR to trigger_error() (#15308)

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error


# 780a8280 14-Jul-2024 Ilija Tovilo

[RFC] Property hooks (#13455)

RFC: https://wiki.php.net/rfc/property-hooks

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>


# 6a2c5318 15-Jun-2024 Bob Weinand

Optimize observers (#13649)

Inline the lookup whether a function is observed at all.
This strategy is also used for FRAMELESS calls. If the frameless call is observed, we instead allocat

Optimize observers (#13649)

Inline the lookup whether a function is observed at all.
This strategy is also used for FRAMELESS calls. If the frameless call is observed, we instead allocate a call frame and push the arguments, to call the the function afterwards.
Doing so is still a performance benefit as opposed to executing individual INIT_FCALL+SEND_VAL ops. Thus, even if the frameless call turns out to be observed, the call overhead is slightly lower than before.
If the internal function is not observed at all, the unavoidable overhead is fetching the FLF zend_function pointer and the run-time cache needs to be inspected.

As part of this work, it turned out to be most viable to put the result operand on the ZEND_OP_DATA instead of ZEND_FRAMELESS_ICALL_3, allowing seamless interoperability with the DO_ICALL opcode.
This is a bit unusual in comparison to all other ZEND_OP_DATA usages, but seems to not pose problems overall.

There is also a small issue resolved: trampolines would always use the ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER function due to zend_observer_fcall_op_array_extension being set to -1 too late.

show more ...


# 8e62e2b8 22-May-2024 Cristian Rodríguez

Mark multple functions as static (#13864)

* Mark many functions as static

Multiple functions are missing the static qualifier.

* remove unused struct sigactions

st

Mark multple functions as static (#13864)

* Mark many functions as static

Multiple functions are missing the static qualifier.

* remove unused struct sigactions

struct sigaction act, old_term, old_quit, old_int;
all unused.

* optimizer: minXOR and maxXOR are unused

show more ...


# 49888161 16-May-2024 Tim Düsterhus

Use `zend_call_known_function()` to call `#[\SensitiveParameter]`’s constructor (#14254)

`zend_call_method_with_1_params()` causes needless overhead, due to the
capability of looking up

Use `zend_call_known_function()` to call `#[\SensitiveParameter]`’s constructor (#14254)

`zend_call_method_with_1_params()` causes needless overhead, due to the
capability of looking up the function by name. It’s also very rarely used (only
in ext/spl).

`zend_call_known_function()` is the standard methodology to call a known
function and going through `Z_OBJCE_P()` avoids the repeated hardcoding of the
CE name.

show more ...


# 1c30c5e7 18-Apr-2024 Ilija Tovilo

Print location on class redeclaration

Fixes GH-13950
Closes GH-13999


# 631bc816 06-Feb-2024 Ilija Tovilo

Implement stackless internal function calls

Co-authored-by: Dmitry Stogov <dmitry@zend.com>

Closes GH-12461


# 2cde4b2e 15-Jan-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-13097: Anonymous class reference in trigger_error / thrown Exception

Closes GH-13153.


# bedf1083 30-Nov-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Add missing NULL pointer checks related to the previous call frame


# 9b6afd88 25-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Make sure core module has number 0 (#12272)

* Make sure core module has number 0

Some places, possibly also outside PHP, assume the core extension has
module number 0. After 8a8

Make sure core module has number 0 (#12272)

* Make sure core module has number 0

Some places, possibly also outside PHP, assume the core extension has
module number 0. After 8a812c3fda this wasn't the case anymore as
reported in [1]. Fix it by changing how the next module ID is computed.

[1] https://github.com/php/php-src/pull/12246#issuecomment-1731432377

* Add assertion

* Add test

show more ...


# 8a812c3f 19-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-12215: Module entry being overwritten causes type errors in ext/dom (PHP 8.4)

When we try to load an extension multiple times, we still overwrite the
type, module number, and hand

Fix GH-12215: Module entry being overwritten causes type errors in ext/dom (PHP 8.4)

When we try to load an extension multiple times, we still overwrite the
type, module number, and handle. If the module number is used to
indicate module boundaries (e.g. in reflection and in dom, see e.g.
dom_objects_set_class_ex), then all sorts of errors can happen.

In the case of ext/dom, OP's error happens because the following
happens:
- The property handler is set up incorrectly in
dom_objects_set_class_ex() because the wrong module number is
specified. The class highest in the hierarchy is DOMNode, so the
property handler is incorrectly set to that of DOMNode instead of
DOMDocument.
- The documentElement property doesn't exist on DOMNode, it only exists
on DOMDocument, so it tries to read using zend_std_read_property().
As there is no user property called documentElement, that read
operation returns an undef value.
However, the type is still checked, resulting in the strange exception.

Solve this by changing the API such that the data is only overwritten if
it's owned data.

Closes GH-12246.

show more ...


# 11262320 09-Jul-2023 Máté Kocsis

Deprecate calling get_class() and get_parent_class() without arguments


# 1a0ef2c1 06-Jul-2023 Ilija Tovilo

Revert "Remove name field from the zend_constant struct (#10954)"

This reverts commit f42992f580343931434dff2e4b2042ff945b48a1.

Closes GH-11604


# d0731934 16-Jul-2023 Arnaud Le Blanc

Expose time spent collecting cycles in gc_status() (#11523)


# ad1b70d6 04-Jul-2023 Ilija Tovilo

Revert "Revert "Remove name field from the zend_constant struct (#10954)""

This reverts commit 9f4bd3040d2809f209d73f696b21302f311665b7.


# 9f4bd304 03-Jul-2023 Máté Kocsis

Revert "Remove name field from the zend_constant struct (#10954)"

This reverts commit f42992f580343931434dff2e4b2042ff945b48a1.

Fix GH-11423


# d5ad7510 08-Jun-2023 George Peter Banyard

More usage of known zend_str instead of C string (#11381)


# bde6f2a2 07-Jun-2023 Florian Engelhardt

Fix initial array size in `gc_status()` (#11393)

Small fix for the initial array size to reflect the number of items that will be added.


# f42992f5 03-Apr-2023 Máté Kocsis

Remove name field from the zend_constant struct (#10954)

As global constant names are case-sensitive now, we don't have to store them separately above the constant table.


# 9d5f2f13 20-Mar-2023 Ilija Tovilo

Use new ZSTR_INIT_LITERAL macro (#10879)


12345678910>>...36