diff options
Diffstat (limited to 'ext/spl/tests/bug51374.phpt')
-rw-r--r-- | ext/spl/tests/bug51374.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/spl/tests/bug51374.phpt b/ext/spl/tests/bug51374.phpt new file mode 100644 index 000000000..a4d285322 --- /dev/null +++ b/ext/spl/tests/bug51374.phpt @@ -0,0 +1,19 @@ +--TEST-- +SPL: SplFileObject wrongly initializes objects +--FILE-- +<?php +class Foo extends SplFileObject +{ + public $bam = array(); +} +$fileInfo = new SplFileInfo('php://temp'); +$fileInfo->setFileClass('Foo'); +$file = $fileInfo->openFile('r'); + +print var_dump($file->bam); // is null or UNKNOWN:0 +?> +===DONE=== +--EXPECT-- +array(0) { +} +===DONE=== |