1--TEST--
2SplFileInfo::setFileClass() expects SplFileObject or child class
3--FILE--
4<?php
5
6class MyFileObject extends SplFileObject {}
7
8$info = new SplFileInfo(__FILE__);
9
10$info->setFileClass('MyFileObject');
11echo get_class($info->openFile()), "\n";
12
13$info->setFileClass('SplFileObject');
14echo get_class($info->openFile()), "\n";
15
16?>
17--EXPECT--
18MyFileObject
19SplFileObject
20