xref: /PHP-7.4/ext/spl/tests/bug51374.phpt (revision c200eeeb)
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===DONE===
16--EXPECT--
17array(0) {
18}
19===DONE===
20