2005-04-29 01:40:11 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #29015 (Incorrect behavior of member vars(non string ones)-numeric mem vars und others)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$a = new stdClass();
|
|
|
|
$x = "";
|
|
|
|
$a->$x = "string('')";
|
|
|
|
var_dump($a);
|
2016-03-24 01:57:59 +08:00
|
|
|
$a->{"\0"} = 42;
|
|
|
|
var_dump($a);
|
2005-04-29 01:40:11 +08:00
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2016-03-24 01:57:59 +08:00
|
|
|
object(stdClass)#1 (1) {
|
|
|
|
[""]=>
|
|
|
|
string(10) "string('')"
|
|
|
|
}
|
|
|
|
|
2020-05-26 20:10:57 +08:00
|
|
|
Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d
|
2015-05-16 03:04:07 +08:00
|
|
|
Stack trace:
|
|
|
|
#0 {main}
|
2016-03-24 01:57:59 +08:00
|
|
|
thrown in %s on line %d
|