xref: /PHP-8.2/Zend/tests/bug29015.phpt (revision d30cd7d7)
1--TEST--
2Bug #29015 (Incorrect behavior of member vars(non string ones)-numeric mem vars und others)
3--FILE--
4<?php
5$a = new stdClass();
6$x = "";
7$a->$x = "string('')";
8var_dump($a);
9$a->{"\0"} = 42;
10var_dump($a);
11?>
12--EXPECTF--
13object(stdClass)#1 (1) {
14  [""]=>
15  string(10) "string('')"
16}
17
18Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d
19Stack trace:
20#0 {main}
21  thrown in %s on line %d
22