1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Files
archived-php-src/ext/hash/tests/serialize-context.phpt
=?UTF-8?q?Rouven=20We=C3=9Fling?= b7f59be9f4 Refactor HashContext into an object.
This allows better type hinting as well as potentially adding
methods in a followup diff.

Original patch by Rouven Weßling (github.com/realityking)
Heavily modified by Sara Golemon (github.com/sgolemon)
2017-01-31 19:28:35 -08:00

15 lines
299 B
PHP

--TEST--
Serialize a context
--SKIPIF--
<?php if (!extension_loaded('hash')) echo 'skip';
--FILE--
<?php
$h = hash_init('md5');
try {
var_dump(serialize($h));
} catch (Exception $e) {
echo "Exception: {$e->getMessage()}\n";
}
--EXPECTF--
Exception: Serialization of 'HashContext' is not allowed