mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Backport tests
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
--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)
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #75420.8 (Indirect modification of magic method argument)
|
||||
--FILE--
|
||||
<?php
|
||||
class Test {
|
||||
public function __set($x,$v) { $GLOBALS["obj"] = 24; var_dump($this); }
|
||||
}
|
||||
|
||||
$obj = new Test;
|
||||
$name = "foo";
|
||||
$obj->$name = 1;
|
||||
var_dump($obj);
|
||||
?>
|
||||
--EXPECT--
|
||||
object(Test)#1 (0) {
|
||||
}
|
||||
int(24)
|
||||
Reference in New Issue
Block a user