From 2c4596c566537d0cac1bff1e074313f8b1219c2b Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Thu, 17 Sep 2026 09:46:33 +0800 Subject: [PATCH] test(compiler): add test case for nested unset with numeric string keys - Create test for nested unset behavior with numeric string keys in empty array - Verify proper removal of numeric string keys when using unset operation - Confirm expected array structure after unset operations - Document issue #114 related to numeric string key handling --- .../basic/unset-numeric-string-key.phpt | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/compiler/basic/unset-numeric-string-key.phpt diff --git a/tests/compiler/basic/unset-numeric-string-key.phpt b/tests/compiler/basic/unset-numeric-string-key.phpt new file mode 100644 index 00000000..19103c40 --- /dev/null +++ b/tests/compiler/basic/unset-numeric-string-key.phpt @@ -0,0 +1,34 @@ +--TEST-- +Nested unset removes numeric string keys created in an empty array (#114) +--FILE-- + +--EXPECT-- +array(1) { + [1]=> + array(3) { + [1]=> + string(1) "1" + [2]=> + string(1) "2" + [3]=> + string(1) "3" + } +} +array(1) { + [1]=> + array(1) { + [3]=> + string(1) "3" + } +}