1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 03:32:20 +02:00
Files
archived-php-src/Zend/tests/bug75420.7.phpt
2020-02-03 22:52:20 +01:00

18 lines
313 B
PHP

--TEST--
Bug #75420.7 (Indirect modification of magic method argument)
--FILE--
<?php
class Test {
public function __set($x,$v) { $GLOBALS["name"] = 24; var_dump($x); }
}
$obj = new Test;
$name = "foo";
$name = str_repeat($name, 2);
$obj->$name = 1;
var_dump($name);
?>
--EXPECT--
string(6) "foofoo"
int(24)