1--TEST--
2Cloning and serializing finfo is not supported
3--FILE--
4<?php
5
6$finfo = new finfo;
7var_dump($finfo->buffer("Test string"));
8try {
9    $finfo2 = clone $finfo;
10    var_dump($finfo2->buffer("Test string"));
11} catch (Error $e) {
12    echo $e->getMessage(), "\n";
13}
14try {
15    $finfo3 = unserialize(serialize($finfo));
16    var_dump($finfo3->buffer("Test string"));
17} catch (Error $e) {
18    echo $e->getMessage(), "\n";
19}
20
21?>
22--EXPECTF--
23string(%d) "%s"
24Trying to clone an uncloneable object of class finfo
25
26Warning: finfo::buffer(): The invalid fileinfo object. in %s on line %d
27bool(false)
28