php-src/Zend/tests/bug29015.phpt
Nikita Popov 674297c7e4 Allow empty property names
Conflicts:
	Zend/zend_compile.c
2016-05-24 18:34:17 +02:00

22 lines
420 B
PHP

--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);
$a->{"\0"} = 42;
var_dump($a);
?>
--EXPECTF--
object(stdClass)#1 (1) {
[""]=>
string(10) "string('')"
}
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d