bug78762.phpt 260 B

1234567891011121314
  1. --TEST--
  2. Bug #78762 (Failing FFI::cast() may leak memory)
  3. --EXTENSIONS--
  4. ffi
  5. --FILE--
  6. <?php
  7. try {
  8. FFI::cast('char[10]', FFI::new('char[1]'));
  9. } catch (FFI\Exception $ex) {
  10. echo $ex->getMessage(), PHP_EOL;
  11. }
  12. ?>
  13. --EXPECT--
  14. attempt to cast to larger type