History log of /PHP-8.3/Zend/zend_API.c (Results 76 – 100 of 1242)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2d38f701 05-Nov-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Don't implement Stringable on traits


# 4bdb2718 05-Nov-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Don't implement Stringable on traits


# d478ae73 05-Nov-2021 Nikita Popov

Don't implement Stringable on traits

Traits do not support interfaces, so we should not implement
Stringable on them.

Also check the __toString() return type in the same way oth

Don't implement Stringable on traits

Traits do not support interfaces, so we should not implement
Stringable on them.

Also check the __toString() return type in the same way other
magic methods do, otherwise we would now miss the check in the
trait case.

show more ...

# 90b7bde6 03-Nov-2021 Dmitry Stogov

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
(ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
(packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
- sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
- zend_hash_sort_ex() may require converting packed arrays to hash.

show more ...

Revision tags: php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1
# ee510eed 01-Sep-2021 Nikita Popov

Deprecate partially supported callables

This deprecates all callables that are accepted by
call_user_func($callable) but not by $callable(). In particular:

"self::method"

Deprecate partially supported callables

This deprecates all callables that are accepted by
call_user_func($callable) but not by $callable(). In particular:

"self::method"
"parent::method"
"static::method"
["self", "method"]
["parent", "method"]
["static", "method"]
["Foo", "Bar::method"]
[new Foo, "Bar::method"]

RFC: https://wiki.php.net/rfc/deprecate_partially_supported_callables

Closes GH-7446.

show more ...

# ddaf64b5 14-Oct-2021 Dmitry Stogov

Avoid non-immutable map_ptr indirection

# 2ffa70b9 02-Sep-2021 Nikita Popov

Slightly clean up is_callable implementation

And adjust an error message to line up with the error message
used for $callable() in zend_execute.c.

# 449bb057 01-Sep-2021 Nikita Popov

Drop IS_CALLABLE_CHECK_SILENT flag

This flag was suppressing *some* but not all errors in
zend_is_callable(), and is no longer used. You can avoid errors
by omitting the error argume

Drop IS_CALLABLE_CHECK_SILENT flag

This flag was suppressing *some* but not all errors in
zend_is_callable(), and is no longer used. You can avoid errors
by omitting the error argument.

show more ...

Revision tags: php-8.1.0RC1
# 5b2ddf5a 31-Aug-2021 Nikita Popov

Export zend_use_resource_as_offset()

Use a common implementation to generate this error message, as
we do so in quite a few places dealing with array keys.

Revision tags: php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3
# cf6c354e 17-Aug-2021 Nikita Popov

Run other RSHUTDOWN handlers if one fails

Motivated by bug #81316: If one RSHUTDOWN handler fails, still
run the other ones. They may be doing something important...

# 315f4094 11-Aug-2021 Nikita Popov

Always use CE_CACHE, remove TYPE_HAS_CE (#7336)

Currently, CE_CACHE on strings is only used with opcache interned strings. This
patch extends usage to non-opcache interned strings as wel

Always use CE_CACHE, remove TYPE_HAS_CE (#7336)

Currently, CE_CACHE on strings is only used with opcache interned strings. This
patch extends usage to non-opcache interned strings as well. This means that
most type strings can now make use of CE_CACHE even if opcache is not loaded,
which allows us to remove TYPE_HAS_CE kind, and fix some discrepancies
depending on whether a type stores a resolved or non-resolved name.

There are two cases where CE_CACHE will not be used:

* When opcache is not used and a permanent interned string (that is not an
internal class name) is used as a type name during the request. In this case
we can't allocate a map_ptr index for the permanent string, as it would be
not be in the permanent map_ptr index space.
* When opcache is used but the script is not cached (e.g. eval'd code or
opcache full). If opcache is used, we can't allocate additional map_ptr
indexes at runtime, because they may conflict with indexes allocated by
opcache.

In these two cases we would end up not using CE caching for property types
(argument/return types still have the separate cache slot).

show more ...

Revision tags: php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22
# 8675380b 27-Jul-2021 Nikita Popov

Increment refcounts in mutable data copies

For mutable_data on preloaded classes, there may be refcounted
values in the constants/properties table.

# 5a7e1a7a 27-Jul-2021 Nikita Popov

Don't use IMMUTABLE flag to decide whether mutable_data is used

mutable_data may be used for IMMUTABLE classes, internal classes
and to-be-preloaded classes. Check whether the mutable_da

Don't use IMMUTABLE flag to decide whether mutable_data is used

mutable_data may be used for IMMUTABLE classes, internal classes
and to-be-preloaded classes. Check whether the mutable_data
map_ptr is set rather than only the IMMUTABLE flag.

show more ...

# a374230c 22-Jul-2021 Nikita Popov

Add support for internal enums

This adds support for internal enums with the same basic approach
as userland enums. Enum values are stored as CONSTANT_AST and
objects created during

Add support for internal enums

This adds support for internal enums with the same basic approach
as userland enums. Enum values are stored as CONSTANT_AST and
objects created during constant updating at runtime. This means
that we need to use mutable_data for internal enums.

This just adds basic support and APIs, it does not include the
stubs integration from #7212.

Closes GH-7302.

show more ...

# c4f4f1ec 23-Jul-2021 Nikita Popov

Share zval_make_interned_string() helper

The same function was defined in zend_compile.c and zend_API.c.

# 89d01154 23-Jul-2021 Nikita Popov

Remove zend_cleanup_internal_classes()

If fast_shutdown is used, then we don't need to destroy static
members at all. If fast_shutdown is not used, then we already
loop over classes

Remove zend_cleanup_internal_classes()

If fast_shutdown is used, then we don't need to destroy static
members at all. If fast_shutdown is not used, then we already
loop over classes to destroy static members and static variables
in methods.

show more ...

# 921e1052 23-Jul-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix bug #66719


# 90ee1c36 23-Jul-2021 Nikita Popov

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix bug #66719


# dfd05da9 23-Jul-2021 Nikita Popov

Fix bug #66719

While parent:: should inherit the called scope, it should only do
so if it is compatible. If there is no called scope, or it is not
a subtype of the scope, we should f

Fix bug #66719

While parent:: should inherit the called scope, it should only do
so if it is compatible. If there is no called scope, or it is not
a subtype of the scope, we should fall back to the scope.

show more ...

# 3eb97a45 22-Jul-2021 Nikita Popov

Always use separate static_members_table

When running without opcache, static_members_table is shared with
default_static_members_table. This is visible in reflection output,
because

Always use separate static_members_table

When running without opcache, static_members_table is shared with
default_static_members_table. This is visible in reflection output,
because ReflectionProperty::getDefaultValue() will return the
current value, rather than the default value.

Address this by never sharing the table, which matches the behavior
we already see under opcache.

Fixes bug #80821.

Closes GH-7299.

show more ...

Revision tags: php-8.1.0beta1
# bca1ebf5 20-Jul-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Create interned strings for internal union types
Duplicate possibly persistent string in phar metadata clone


# bd2cd261 20-Jul-2021 Nikita Popov

Create interned strings for internal union types

Just like for non-union types. These may be returned to userland
via reflection, and as such need to be interned.

# 084d49a2 19-Jul-2021 Nikita Popov

Set UNION bit for internal class union return type

Fixes assertion failure reported in:
https://github.com/php/php-src/pull/7115#issuecomment-882580767

Revision tags: php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1
# 52d3d0d8 15-Jun-2021 Nikita Popov

Add limited support for new in initializers

Add support for new expressions inside parameter default values,
static variable initializers, global constant initializers and
attribute

Add limited support for new in initializers

Add support for new expressions inside parameter default values,
static variable initializers, global constant initializers and
attribute arguments.

RFC: https://wiki.php.net/rfc/new_in_initializers

Closes GH-7153.

show more ...

# 2763f14d 08-Jul-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix constant update for shadowed private property


12345678910>>...50