xref: /PHP-8.1/Zend/tests/bug24773.phpt (revision b2248789)
1--TEST--
2Bug #24773 (unset() of integers treated as arrays causes a crash)
3--FILE--
4<?php
5    $array = 'test';
6    unset($array["lvl1"]["lvl2"]["b"]);
7?>
8--EXPECTF--
9Fatal error: Uncaught TypeError: Cannot access offset of type string on string in %s:%d
10Stack trace:
11#0 {main}
12  thrown in %s on line %d
13