Skip to content

Prepare for PHP 7.4: use ReflectionReference in VarCloner #31135

@nicolas-grekas

Description

@nicolas-grekas

In VarDumper's VarCloner, we use some black magic tricks to work with PHP references (called "hard references" in the code, i.e. $b = &$a).

In PHP 7.4, this will break with typed properties, because of the $cookie trick that is used to detect these references.

But PHP 7.4 has a solution: ReflectionReference

So, when PHP 7.4 is used, we can replace the current implementation by one based on ReflectionReference. That would make things both cleaner and compatible with typed-references.

While this might not be the most trivial part of the code to have a look at, the ETA of PHP 7.4 is early December. Anyone would like to give it a try?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy