xref: /PHP-8.1/ext/spl/tests/bug51374.phpt (revision a555cc0b)
1--TEST--
2SPL: SplFileObject wrongly initializes objects
3--FILE--
4<?php
5class Foo extends SplFileObject
6{
7    public $bam = array();
8}
9$fileInfo = new SplFileInfo('php://temp');
10$fileInfo->setFileClass('Foo');
11$file = $fileInfo->openFile('r');
12
13print var_dump($file->bam); // is null or UNKNOWN:0
14?>
15--EXPECT--
16array(0) {
17}
18