Created
July 28, 2011 07:27
-
-
Save pierrejoye/1111149 to your computer and use it in GitHub Desktop.
oopsie
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 Foo { | |
| var $foo;#, $bar; | |
| function __construct(){ | |
| $this->foo = ''; | |
| $this->bar =& $this->foo; | |
| } | |
| function dump(){ | |
| var_dump($this->foo); | |
| var_dump($this->bar); | |
| } | |
| function a($t){ | |
| #nothing here | |
| } | |
| } | |
| $f = new Foo(); | |
| $f->dump(); | |
| $f->bar .= 'bar'; | |
| $f->dump(); | |
| $f->foo .= 'foo'; | |
| $f->dump(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment