Closed as duplicate
Description
Description
Reproducible in PHP 8.3.20. Cannot be reproduced in PHP 8.3.19
The following code:
<?php
$object = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
$foo = 'websocket';
$object->{$foo} = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
$object = &$object->{$foo};
echo 'success';
Resulted in this output:
Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)
But I expected this output instead:
success
PHP Version
PHP 8.3.20 (cli) (built: Apr 14 2025 18:44:45) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.20, Copyright (c) Zend Technologies
with Zend OPcache v8.3.20, Copyright (c), by Zend Technologies
with Xdebug v3.4.2, Copyright (c) 2002-2025, by Derick Rethans
Operating System
Debian 11