1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
Files
archived-php-src/ext/standard/tests/directory/DirectoryClass_cannot_serialize.phpt

17 lines
316 B
PHP

--TEST--
Cannot serialize instance of Directory class constructed via Reflection.
--FILE--
<?php
$d = dir(__DIR__);
try {
$s = serialize($d);
var_dump($s);
} catch (\Throwable $e) {
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Exception: Serialization of 'Directory' is not allowed