1--TEST--
2SplFixedArray - values should be gced after var_export then being modified
3--FILE--
4<?php
5class HasDestructor {
6    public function __destruct() {
7        echo "In destructor\n";
8    }
9}
10$array = SplFixedArray::fromArray([new HasDestructor()]);
11var_dump($array);
12echo "Replacing\n";
13$array[0] = new stdClass();
14// As of php 8.3, this will be freed before the var_dump call
15echo "Dumping again\n";
16var_dump($array);
17// As of php 8.3, this only contain object properties (dynamic properties and declared subclass properties)
18var_dump(get_mangled_object_vars($array));
19?>
20--EXPECT--
21object(SplFixedArray)#2 (1) {
22  [0]=>
23  object(HasDestructor)#1 (0) {
24  }
25}
26Replacing
27In destructor
28Dumping again
29object(SplFixedArray)#2 (1) {
30  [0]=>
31  object(stdClass)#3 (0) {
32  }
33}
34array(0) {
35}
36