Created
July 24, 2012 17:26
-
-
Save niklasvh/3171344 to your computer and use it in GitHub Desktop.
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 | |
class C | |
{ | |
function __call($name, $values) | |
{ | |
$values[0][0] = 'changed'; | |
} | |
} | |
$a = array('original'); | |
$b = array('original'); | |
$hack =& $b[0]; | |
$c = new C; | |
$c->f($a); | |
$c->f($b); | |
var_dump($a, $b); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment