reuse.phpt 292 B

1234567891011121314151617
  1. --TEST--
  2. Hash: Attempt to reuse a closed hash context
  3. --FILE--
  4. <?php
  5. $h = hash_init('md5');
  6. hash_final($h);
  7. try {
  8. hash_update($h, 'foo');
  9. }
  10. catch (\Error $e) {
  11. echo $e->getMessage() . "\n";
  12. }
  13. ?>
  14. --EXPECT--
  15. hash_update(): Argument #1 ($context) must be a valid Hash Context resource