Skip to content

Engine calls to private destructors cause errors #16077

@jnvsor

Description

@jnvsor

Description

https://3v4l.org/bKijA

While private magic method declarations result in a visibility warning, they still work when invoked by the engine as in the cases of __debugInfo (and __sleep since 8.1)

Private destructors however cause errors whenever an instance goes out of scope. The engine should always be able to invoke a destructor when destroying an instance.

PHP Version

8.4

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions