mirror of
https://github.com/php/php-src.git
synced 2026-10-28 17:56:50 +08:00
Splitting the behavioural change of #23052 out into this and come up with something that is hopefully more sensible and consistent between fast and slow ZPP and the object or class_name Fast ZPP specifier.
17 lines
386 B
PHP
17 lines
386 B
PHP
--TEST--
|
|
SplFileInfo::setFileClass() throws exception for invalid class
|
|
--FILE--
|
|
<?php
|
|
|
|
$info = new SplFileInfo(__FILE__);
|
|
|
|
try {
|
|
$info->setFileClass('stdClass');
|
|
} catch (TypeError $e) {
|
|
echo $e::class, ': ', $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
TypeError: SplFileInfo::setFileClass(): Argument #1 ($class) must be a class name derived from SplFileObject, "stdClass" given
|