php-src/ext/zlib
Nikita Popov 653e4ea1c5 Add flag to forbid dynamic property creation on internal classes
While performing resource -> object migrations, we're adding
defensive classes that are final, non-serializable and non-clonable
(unless they are, of course). This path adds a ZEND_ACC_NO_DYNAMIC_PROPERTIES
flag, that also forbids the creation of dynamic properties on these objects.
This is a subset of #3931 and targeted at internal usage only
(though may be extended to userland at some point in the future).

It's already possible to achieve this (what the removed
WeakRef/WeakMap code does), but there's some caveats: First, this
simple approach is only possible if the class has no declared
properties, otherwise it's necessary to special-case those
properties. Second, it's easy to make it overly strict, e.g. by
forbidding isset($obj->prop) as well. And finally, it requires a
lot of boilerplate code for each class.

Closes GH-5572.
2020-06-24 11:52:36 +02:00
..
tests Improve error messages of ext/zlib 2020-06-17 16:50:00 +02:00
config.w32 Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
config0.m4 Normalize comments in *nix build system m4 files 2019-05-12 18:43:03 +02:00
CREDITS
php_zlib.def extend zlib export required for the recent libpng 2017-04-23 21:33:14 +02:00
php_zlib.h Convert resources to objects in ext/zlib 2020-06-17 16:50:00 +02:00
zlib.c Add flag to forbid dynamic property creation on internal classes 2020-06-24 11:52:36 +02:00
zlib.stub.php Convert resources to objects in ext/zlib 2020-06-17 16:50:00 +02:00
zlib_arginfo.h Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
zlib_filter.c Fix #71417: fread() does not report zlib.inflate errors 2020-04-20 16:49:08 +02:00
zlib_fopen_wrapper.c Make error messages more consistent by fixing capitalization 2020-01-17 14:52:46 +01:00