xref: /php-src/ext/ffi/tests/gh9698.phpt (revision 40ccc8ea)
1--TEST--
2GH-9698 (stream_wrapper_register crashes with FFI\CData provided as class)
3--EXTENSIONS--
4ffi
5--SKIPIF--
6<?php
7?>
8--FILE--
9<?php
10try {
11    stream_wrapper_register('badffi', 'FFI\CData');
12    file_get_contents('badffi://x');
13} catch (Throwable $exception) {
14    echo $exception->getMessage();
15}
16?>
17
18DONE
19--EXPECT--
20Attempt to assign field 'context' to uninitialized FFI\CData object
21DONE
22