pmmp / ext-pmmpthread

Fork of https://github.com/krakjoe/pthreads with a revamped API and PHP 8.1+ support
Other
81 stars 17 forks source link

Copy mutable resolved constant data for immutable classes #124

Open dktapps opened 1 year ago

dktapps commented 1 year ago

Recently, some LB code had a problem with OPcache, because of IS_CONSTANT_AST constants being used in immutable classes. These AST were referencing constants which didn't exist on the target worker. This would have been fine (since the constants would normally be resolved during class compile (I think?), but since the classes were inherited without copying their resolved constant data, these constant references suddenly stopped working on PHP 8.1.