-
-
Save YNSTakeru/24230e0b92630096ce1416da40eb8438 to your computer and use it in GitHub Desktop.
phpでのmutable変数の対策
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 | |
$candidateWinnerPlayers = []; | |
foreach($this->players as $player){ | |
$candidateWinnerPlayers[] = clone($player); | |
} | |
$this->candidateWinnerPlayers = $candidateWinnerPlayers; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment