Created
August 15, 2023 09:11
-
-
Save brianvarskonst/9b6f949f2518c0f0973547bcc6443865 to your computer and use it in GitHub Desktop.
Manipulate private property of instantiated object or class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$clone = clone $object; | |
(function () { | |
$this->changePrivateProperty = []; | |
})->call($clone); | |
return $clone; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment