Created
February 3, 2015 02:21
-
-
Save rightgo09/e7f15062e3ce5d00f644 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| class Hoge { | |
| private $h; | |
| public function __construct(&$h) { | |
| $this->h &= $h; | |
| } | |
| public function hhh($str) { | |
| $this->h["str"] = $str; | |
| } | |
| } | |
| $k = array("str" => "string!!"); | |
| $hoge = new Hoge($k); | |
| print_r($k); | |
| $hoge->hhh("changed"); | |
| print_r($k); | |
| //Array | |
| //( | |
| // [str] => string!! | |
| //) | |
| //Array | |
| //( | |
| // [str] => changed | |
| //) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment