1--TEST--
2Hash: bug #12186 - segfault when cloning a finalized context
3--FILE--
4<?php
5
6$c = hash_init('sha1');
7hash_final($c);
8
9try {
10 clone $c;
11} catch (Throwable $ex) {
12 echo $ex->getMessage() . "\n";
13}
14
15?>
16--EXPECTF--
17Cannot clone a finalized HashContext
18