Description
The following code:
<?php
class a extends SessionHandler {
function create_sid(): string {
return [3,6];
}
}
$c = new a;
session_set_save_handler($c);
session_start();
Actual result
A TypeError is thrown, but the debug build also reports memory leaks, for example:
=== Total 2 memory leaks detected ===
The leaks originate from allocations made by the files session handler (ps_files and its basedir string).
PHP Version
PHP 8.6.0-dev (cli) (built: Aug 5 2026 15:03:24) (NTS DEBUG)
Copyright © The PHP Group and Contributors
Zend Engine v4.6.0-dev, Copyright © Zend by Perforce
with Zend OPcache v8.6.0-dev, Copyright ©, by Zend by Perforce
Operating System
No response
Description
The following code:
Actual result
A TypeError is thrown, but the debug build also reports memory leaks, for example:
=== Total 2 memory leaks detected ===The leaks originate from allocations made by the files session handler (ps_files and its basedir string).
PHP Version
Operating System
No response