History log of /php-src/ext/opcache/tests/gh8846-1.inc (Results 1 – 1 of 1)
Revision Date Author Comments
# 0600f513 10-May-2023 Ilija Tovilo

Implement delayed early binding for classes without parents

Normally, we add classes without parents (and no interfaces or traits) directly
to the class map, early binding the class. How

Implement delayed early binding for classes without parents

Normally, we add classes without parents (and no interfaces or traits) directly
to the class map, early binding the class. However, if the same class has
already been registered, we would instead just add a ZEND_DECLARE_CLASS
instruction and let the handler throw a duplicate class declaration exception.

However, with opcache, if on the next request the files are included in the
opposite order, we won't perform early binding. To fix this, create a
ZEND_DECLARE_CLASS_DELAYED instruction instead and handle classes without
parents accordingly, skipping any linking for classes that are already linked in
delayed early binding.

Fixes GH-8846

show more ...